diff options
author | Z.J. van de Weg <git@zjvandeweg.nl> | 2017-03-06 10:55:30 +0300 |
---|---|---|
committer | Z.J. van de Weg <git@zjvandeweg.nl> | 2017-03-06 10:55:30 +0300 |
commit | b3aae422a6adbc0e46901a0c9dde5b75b791e060 (patch) | |
tree | d93e28c1b502e777ec89f4a2af6c9ec3ec91ea3c /db/migrate/20170120131253_create_chat_teams.rb | |
parent | 28910ffddf348f98b470462a0b354234774bf4f5 (diff) |
Minor edits, incorporate review
Diffstat (limited to 'db/migrate/20170120131253_create_chat_teams.rb')
-rw-r--r-- | db/migrate/20170120131253_create_chat_teams.rb | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/db/migrate/20170120131253_create_chat_teams.rb b/db/migrate/20170120131253_create_chat_teams.rb index 699226d60c9..7995d383986 100644 --- a/db/migrate/20170120131253_create_chat_teams.rb +++ b/db/migrate/20170120131253_create_chat_teams.rb @@ -8,13 +8,11 @@ class CreateChatTeams < ActiveRecord::Migration def change create_table :chat_teams do |t| - t.integer :namespace_id, index: true + t.references :namespace, null: false, index: { unique: true }, foreign_key: { on_delete: :cascade } t.string :team_id t.string :name t.timestamps null: false end - - add_concurrent_foreign_key :chat_teams, :namespaces, column: :namespace_id end end |