Files
MySMSAPio/db/migrate/20251019070521_create_webhook_configs.rb
2025-10-22 17:22:17 +08:00

19 lines
487 B
Ruby

class CreateWebhookConfigs < ActiveRecord::Migration[8.0]
def change
create_table :webhook_configs do |t|
t.string :name, null: false
t.string :url, null: false
t.string :event_type, null: false
t.string :secret_key
t.boolean :active, default: true
t.integer :timeout, default: 30
t.integer :retry_count, default: 3
t.timestamps
end
add_index :webhook_configs, :event_type
add_index :webhook_configs, :active
end
end