1
0
Fork 0

Merge migrations

This commit is contained in:
Alex Kotov 2019-07-22 08:54:11 +05:00
parent 407fcbcd96
commit a0d6bb53b5
Signed by: kotovalexarian
GPG key ID: 553C0EBBEB5D5F08
3 changed files with 11 additions and 17 deletions

View file

@ -70,6 +70,15 @@ class DeviseCreateUsers < ActiveRecord::Migration[5.2]
t.references :contacts_list, null: false, index: { unique: true }
end
create_table :person_comments do |t|
t.timestamps null: false
t.references :person, null: false, index: true, foreign_key: true
t.references :account, null: true, index: true, foreign_key: true
t.text :text, null: false
end
create_table :users do |t|
t.timestamps null: false

View file

@ -1,14 +0,0 @@
# frozen_string_literal: true
class CreatePersonComments < ActiveRecord::Migration[6.0]
def change
create_table :person_comments do |t|
t.timestamps null: false
t.references :person, null: false, index: true, foreign_key: true
t.references :account, null: true, index: true, foreign_key: true
t.text :text, null: false
end
end
end

View file

@ -364,8 +364,8 @@ ALTER SEQUENCE public.people_id_seq OWNED BY public.people.id;
CREATE TABLE public.person_comments (
id bigint NOT NULL,
created_at timestamp(6) without time zone NOT NULL,
updated_at timestamp(6) without time zone NOT NULL,
created_at timestamp without time zone NOT NULL,
updated_at timestamp without time zone NOT NULL,
person_id bigint NOT NULL,
account_id bigint,
text text NOT NULL
@ -1141,7 +1141,6 @@ INSERT INTO "schema_migrations" (version) VALUES
('20181129203927'),
('20181130024918'),
('20190427141639'),
('20190715210610'),
('20190718184543'),
('20190719224405'),
('20190720022446'),