class CreateSystemTasks < ActiveRecord::Migration[7.0]
  def change
    create_table :system_tasks do |t|
      t.integer :user_id
      t.string :name
      t.string :task_type
      t.string :status
      t.jsonb :metadata
      t.index :task_type
      t.index :status
      t.index [:task_type, :status]

      t.timestamps
    end
  end
end
