diff options
Diffstat (limited to 'db')
-rw-r--r-- | db/migrate/20191211235208_create_normalized_statuses.rb | 2 | ||||
-rw-r--r-- | db/migrate/20191212022020_create_sharekeys.rb | 2 | ||||
-rw-r--r-- | db/migrate/20191212022653_create_imported_statuses.rb | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/db/migrate/20191211235208_create_normalized_statuses.rb b/db/migrate/20191211235208_create_normalized_statuses.rb index d47c4feb4..19c7cd6c3 100644 --- a/db/migrate/20191211235208_create_normalized_statuses.rb +++ b/db/migrate/20191211235208_create_normalized_statuses.rb @@ -1,7 +1,7 @@ class CreateNormalizedStatuses < ActiveRecord::Migration[5.2] def up create_table :normalized_statuses do |t| - t.references :status, foreign_key: true, index: {unique: true} + t.references :status, null: false, foreign_key: {on_delete: :cascade}, index: {unique: true} t.text :text end diff --git a/db/migrate/20191212022020_create_sharekeys.rb b/db/migrate/20191212022020_create_sharekeys.rb index c0027babe..b66b7eeda 100644 --- a/db/migrate/20191212022020_create_sharekeys.rb +++ b/db/migrate/20191212022020_create_sharekeys.rb @@ -1,7 +1,7 @@ class CreateSharekeys < ActiveRecord::Migration[5.2] def up create_table :sharekeys do |t| - t.references :status, foreign_key: true, index: {unique: true} + t.references :status, null: false, foreign_key: {on_delete: :cascade}, index: {unique: true} t.string :key end diff --git a/db/migrate/20191212022653_create_imported_statuses.rb b/db/migrate/20191212022653_create_imported_statuses.rb index 3d7a9c99d..a2bf0a68d 100644 --- a/db/migrate/20191212022653_create_imported_statuses.rb +++ b/db/migrate/20191212022653_create_imported_statuses.rb @@ -1,7 +1,7 @@ class CreateImportedStatuses < ActiveRecord::Migration[5.2] def up create_table :imported_statuses do |t| - t.references :status, foreign_key: true, index: {unique: true} + t.references :status, null: false, foreign_key: {on_delete: :cascade}, index: {unique: true} t.string :origin, index: {unique: true} end |