diff --git a/db/migrate/20180515105348_add_contact_requests_table.rb b/db/migrate/20180515105348_add_contact_requests_table.rb new file mode 100644 index 000000000..582a13b82 --- /dev/null +++ b/db/migrate/20180515105348_add_contact_requests_table.rb @@ -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 diff --git a/db/migrate/20180627115124_remove_foreign_key_constraint_from_contact_request.rb b/db/migrate/20180627115124_remove_foreign_key_constraint_from_contact_request.rb new file mode 100644 index 000000000..7632efd12 --- /dev/null +++ b/db/migrate/20180627115124_remove_foreign_key_constraint_from_contact_request.rb @@ -0,0 +1,5 @@ +class RemoveForeignKeyConstraintFromContactRequest < ActiveRecord::Migration[5.0] + def change + # remove_foreign_key :contact_requests, :whois_records + end +end diff --git a/db/migrate/20181102124618_remove_whois_records_body.rb b/db/migrate/20181102124618_remove_whois_records_body.rb new file mode 100644 index 000000000..24124ebdf --- /dev/null +++ b/db/migrate/20181102124618_remove_whois_records_body.rb @@ -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 diff --git a/db/migrate/20200914073130_add_message_id_to_contact_request.rb b/db/migrate/20200914073130_add_message_id_to_contact_request.rb new file mode 100644 index 000000000..5f4254d42 --- /dev/null +++ b/db/migrate/20200914073130_add_message_id_to_contact_request.rb @@ -0,0 +1,5 @@ +class AddMessageIdToContactRequest < ActiveRecord::Migration[6.0] + def change + # add_column :contact_requests, :message_id, :string + end +end diff --git a/db/structure.sql b/db/structure.sql index c30e507e4..fc15cbe44 100644 --- a/db/structure.sql +++ b/db/structure.sql @@ -541,17 +541,19 @@ ALTER SEQUENCE public.certificates_id_seq OWNED BY public.certificates.id; -- CREATE TABLE public.contact_requests ( - id integer NOT NULL, - whois_record_id integer NOT NULL, - secret character varying NOT NULL, - email character varying NOT NULL, - name character varying NOT NULL, - valid_to timestamp without time zone NOT NULL, - status character varying DEFAULT 'new'::character varying NOT NULL, - ip_address inet, - created_at timestamp without time zone NOT NULL, - updated_at timestamp without time zone NOT NULL, - message_id character varying + + id integer NOT NULL, + whois_record_id integer NOT NULL, + secret character varying NOT NULL, + email character varying NOT NULL, + name character varying NOT NULL, + valid_to timestamp without time zone NOT NULL, + status character varying DEFAULT 'new'::character varying NOT NULL, + ip_address inet, + created_at timestamp without time zone NOT NULL, + 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, domain_id integer, name character varying, - body text, json json, created_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'), ('20180331200125'), ('20180422154642'), +('20180515105348'), ('20180612042234'), ('20180612042625'), ('20180612042953'), ('20180613030330'), ('20180613045614'), +('20180627115124'), ('20180713154915'), ('20180801114403'), ('20180808064402'), @@ -5004,6 +5007,7 @@ INSERT INTO "schema_migrations" (version) VALUES ('20181017154143'), ('20181017205123'), ('20181022100114'), +('20181102124618'), ('20181108154921'), ('20181129150515'), ('20181212105100'), @@ -5096,6 +5100,7 @@ INSERT INTO "schema_migrations" (version) VALUES ('20200908131554'), ('20200910085157'), ('20200910102028'), +('20200914073130'), ('20200916125326'), ('20200917104213'), ('20200921084356'),