2022-07-19 12:07:00 +00:00
|
|
|
class CreateMacros < ActiveRecord::Migration[6.1]
|
|
|
|
def change
|
|
|
|
create_table :macros do |t|
|
|
|
|
t.bigint :account_id, null: false
|
|
|
|
t.string :name, null: false
|
|
|
|
t.integer :visibility, default: 0
|
|
|
|
t.references :created_by, null: false, index: true, foreign_key: { to_table: :users }
|
|
|
|
t.references :updated_by, null: false, index: true, foreign_key: { to_table: :users }
|
2022-07-26 07:11:22 +00:00
|
|
|
t.jsonb :actions, null: false, default: {}
|
2022-07-19 12:07:00 +00:00
|
|
|
t.timestamps
|
|
|
|
t.index :account_id, name: 'index_macros_on_account_id'
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|