Chatwoot/db/migrate/20211110101046_create_automation_rules.rb

15 lines
468 B
Ruby
Raw Permalink Normal View History

2022-01-10 07:11:59 +00:00
class CreateAutomationRules < ActiveRecord::Migration[6.1]
def change
create_table :automation_rules do |t|
t.bigint :account_id, null: false
t.string :name, null: false
t.text :description
t.string :event_name, null: false
t.jsonb :conditions, null: false, default: '{}'
t.jsonb :actions, null: false, default: '{}'
t.timestamps
t.index :account_id, name: 'index_automation_rules_on_account_id'
end
end
end