feat: Macros CRUD api (#5047)

This commit is contained in:
Tejaswini Chile
2022-07-19 17:37:00 +05:30
committed by GitHub
parent c4b2005425
commit 0cee42a9f9
17 changed files with 460 additions and 2 deletions

View File

@@ -0,0 +1,14 @@
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 }
t.jsonb :actions, null: false, default: '{}'
t.timestamps
t.index :account_id, name: 'index_macros_on_account_id'
end
end
end