Files
fizzy/db/migrate/20250505123008_create_commands.rb
T
2025-05-06 22:51:38 +02:00

14 lines
300 B
Ruby

class CreateCommands < ActiveRecord::Migration[8.1]
def change
create_table :commands do |t|
t.references :user, null: false, foreign_key: true, index: true
t.string :type
t.json :data, default: {}
t.timestamps
t.index %i[ user_id created_at ]
end
end
end