Added migration for creating Shortcuts
• Added: - migration for creating Shortcuts
This commit is contained in:
12
db/migrate/20200721215336_create_shortcuts.rb
Normal file
12
db/migrate/20200721215336_create_shortcuts.rb
Normal file
@@ -0,0 +1,12 @@
|
||||
class CreateShortcuts < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
create_table :shortcuts do |t|
|
||||
t.timestamps
|
||||
t.belongs_to :account, foreign_key: { on_delete: :cascade }, null: false
|
||||
t.bigint :shortcut_id, null: false
|
||||
t.string :shortcut_type, null: false, default: ''
|
||||
end
|
||||
|
||||
add_index :shortcuts, [:account_id, :shortcut_id, :shortcut_type], unique: true
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user