mirror of
https://github.com/internetee/registry.git
synced 2025-06-06 20:55:44 +02:00
Merge pull request #1944 from internetee/1928-move-whois-db-change-management-from-rest-whois-project-to-registry
made migration from rest whois to registry
This commit is contained in:
commit
0940afd1a4
5 changed files with 57 additions and 12 deletions
21
db/migrate/20180515105348_add_contact_requests_table.rb
Normal file
21
db/migrate/20180515105348_add_contact_requests_table.rb
Normal 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
|
|
@ -0,0 +1,5 @@
|
||||||
|
class RemoveForeignKeyConstraintFromContactRequest < ActiveRecord::Migration[5.0]
|
||||||
|
def change
|
||||||
|
# remove_foreign_key :contact_requests, :whois_records
|
||||||
|
end
|
||||||
|
end
|
9
db/migrate/20181102124618_remove_whois_records_body.rb
Normal file
9
db/migrate/20181102124618_remove_whois_records_body.rb
Normal 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
|
|
@ -0,0 +1,5 @@
|
||||||
|
class AddMessageIdToContactRequest < ActiveRecord::Migration[6.0]
|
||||||
|
def change
|
||||||
|
# add_column :contact_requests, :message_id, :string
|
||||||
|
end
|
||||||
|
end
|
|
@ -541,17 +541,19 @@ ALTER SEQUENCE public.certificates_id_seq OWNED BY public.certificates.id;
|
||||||
--
|
--
|
||||||
|
|
||||||
CREATE TABLE public.contact_requests (
|
CREATE TABLE public.contact_requests (
|
||||||
id integer NOT NULL,
|
|
||||||
whois_record_id integer NOT NULL,
|
id integer NOT NULL,
|
||||||
secret character varying NOT NULL,
|
whois_record_id integer NOT NULL,
|
||||||
email character varying NOT NULL,
|
secret character varying NOT NULL,
|
||||||
name character varying NOT NULL,
|
email character varying NOT NULL,
|
||||||
valid_to timestamp without time zone NOT NULL,
|
name character varying NOT NULL,
|
||||||
status character varying DEFAULT 'new'::character varying NOT NULL,
|
valid_to timestamp without time zone NOT NULL,
|
||||||
ip_address inet,
|
status character varying DEFAULT 'new'::character varying NOT NULL,
|
||||||
created_at timestamp without time zone NOT NULL,
|
ip_address inet,
|
||||||
updated_at timestamp without time zone NOT NULL,
|
created_at timestamp without time zone NOT NULL,
|
||||||
message_id character varying
|
updated_at timestamp without time zone NOT NULL,
|
||||||
|
message_id character varying
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
@ -2639,7 +2641,6 @@ CREATE TABLE public.whois_records (
|
||||||
id integer NOT NULL,
|
id integer NOT NULL,
|
||||||
domain_id integer,
|
domain_id integer,
|
||||||
name character varying,
|
name character varying,
|
||||||
body text,
|
|
||||||
json json,
|
json json,
|
||||||
created_at timestamp without time zone NOT NULL,
|
created_at timestamp without time zone NOT NULL,
|
||||||
updated_at timestamp without time zone NOT NULL,
|
updated_at timestamp without time zone NOT NULL,
|
||||||
|
@ -4975,11 +4976,13 @@ INSERT INTO "schema_migrations" (version) VALUES
|
||||||
('20180327151906'),
|
('20180327151906'),
|
||||||
('20180331200125'),
|
('20180331200125'),
|
||||||
('20180422154642'),
|
('20180422154642'),
|
||||||
|
('20180515105348'),
|
||||||
('20180612042234'),
|
('20180612042234'),
|
||||||
('20180612042625'),
|
('20180612042625'),
|
||||||
('20180612042953'),
|
('20180612042953'),
|
||||||
('20180613030330'),
|
('20180613030330'),
|
||||||
('20180613045614'),
|
('20180613045614'),
|
||||||
|
('20180627115124'),
|
||||||
('20180713154915'),
|
('20180713154915'),
|
||||||
('20180801114403'),
|
('20180801114403'),
|
||||||
('20180808064402'),
|
('20180808064402'),
|
||||||
|
@ -5004,6 +5007,7 @@ INSERT INTO "schema_migrations" (version) VALUES
|
||||||
('20181017154143'),
|
('20181017154143'),
|
||||||
('20181017205123'),
|
('20181017205123'),
|
||||||
('20181022100114'),
|
('20181022100114'),
|
||||||
|
('20181102124618'),
|
||||||
('20181108154921'),
|
('20181108154921'),
|
||||||
('20181129150515'),
|
('20181129150515'),
|
||||||
('20181212105100'),
|
('20181212105100'),
|
||||||
|
@ -5096,6 +5100,7 @@ INSERT INTO "schema_migrations" (version) VALUES
|
||||||
('20200908131554'),
|
('20200908131554'),
|
||||||
('20200910085157'),
|
('20200910085157'),
|
||||||
('20200910102028'),
|
('20200910102028'),
|
||||||
|
('20200914073130'),
|
||||||
('20200916125326'),
|
('20200916125326'),
|
||||||
('20200917104213'),
|
('20200917104213'),
|
||||||
('20200921084356'),
|
('20200921084356'),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue