diff --git a/db/migrate/20181129203927_devise_create_users.rb b/db/migrate/20181129203927_devise_create_users.rb index c761b6b..790e80b 100644 --- a/db/migrate/20181129203927_devise_create_users.rb +++ b/db/migrate/20181129203927_devise_create_users.rb @@ -108,8 +108,12 @@ class DeviseCreateUsers < ActiveRecord::Migration[5.2] create_table :account_roles do |t| t.timestamps null: false + t.references :account, null: false - t.references :role, null: false + t.references :role, null: false + + t.datetime :deleted_at + t.datetime :expires_at t.index %i[account_id role_id], unique: true end diff --git a/db/migrate/20190202041009_add_deleted_at_to_account_roles.rb b/db/migrate/20190202041009_add_deleted_at_to_account_roles.rb deleted file mode 100644 index f00d1b0..0000000 --- a/db/migrate/20190202041009_add_deleted_at_to_account_roles.rb +++ /dev/null @@ -1,7 +0,0 @@ -# frozen_string_literal: true - -class AddDeletedAtToAccountRoles < ActiveRecord::Migration[6.0] - def change - add_column :account_roles, :deleted_at, :datetime - end -end diff --git a/db/migrate/20190208062215_add_expires_at_to_account_roles.rb b/db/migrate/20190208062215_add_expires_at_to_account_roles.rb deleted file mode 100644 index d24fc4b..0000000 --- a/db/migrate/20190208062215_add_expires_at_to_account_roles.rb +++ /dev/null @@ -1,7 +0,0 @@ -# frozen_string_literal: true - -class AddExpiresAtToAccountRoles < ActiveRecord::Migration[6.0] - def change - add_column :account_roles, :expires_at, :datetime - end -end diff --git a/db/structure.sql b/db/structure.sql index 2bc181e..cdec7c7 100644 --- a/db/structure.sql +++ b/db/structure.sql @@ -1140,8 +1140,6 @@ SET search_path TO "$user", public; INSERT INTO "schema_migrations" (version) VALUES ('20181129203927'), ('20181130024918'), -('20190202041009'), -('20190208062215'), ('20190324204513'), ('20190324210722'), ('20190324211036'),