whois migration files

This commit is contained in:
Oleg Hasjanov 2021-04-29 16:13:45 +03:00
parent 4d420664f6
commit 20ecd289a0
5 changed files with 125 additions and 1 deletions

View file

@ -0,0 +1,21 @@
class AddContactRequestsTable < ActiveRecord::Migration[5.0]
def change
# create_table :contact_requests do |t|
# t.integer :whois_record_id, null: false
# t.string :secret, null: false
# t.string :email, null: false
# t.string :name, null: false
# t.datetime :valid_to, null: false
# t.string :status, null: false, default: 'new'
# t.inet :ip_address
# t.timestamps null: false
# end
# add_foreign_key :contact_requests, :whois_records
# add_index :contact_requests, :secret, unique: true
# add_index :contact_requests, :email
# add_index :contact_requests, :ip_address
# add_index :contact_requests, :whois_record_id
end
end

View file

@ -0,0 +1,5 @@
class RemoveForeignKeyConstraintFromContactRequest < ActiveRecord::Migration[5.0]
def change
# remove_foreign_key :contact_requests, :whois_records
end
end

View file

@ -0,0 +1,9 @@
class RemoveWhoisRecordsBody < ActiveRecord::Migration[5.2]
def up
# remove_column :whois_records, :body
end
def down
# add_column :whois_records, :body, :text
end
end

View file

@ -0,0 +1,5 @@
class AddMessageIdToContactRequest < ActiveRecord::Migration[6.0]
def change
# add_column :contact_requests, :message_id, :string
end
end