Skip to content

Commit

Permalink
Change tick columns to bigints
Browse files Browse the repository at this point in the history
  • Loading branch information
sj26 committed Jul 6, 2022
1 parent 40fdef2 commit 983bd8b
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
15 changes: 15 additions & 0 deletions db/migrate/20220706101937_change_runs_tick_columns_to_bigints.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
class ChangeRunsTickColumnsToBigints < ActiveRecord::Migration[7.0]
def up
change_table(:maintenance_tasks_runs, bulk: true) do |t|
t.change(:tick_count, :bigint)
t.change(:tick_total, :bigint)
end
end

def down
change_table(:maintenance_tasks_runs, bulk: true) do |t|
t.change(:tick_count, :integer)
t.change(:tick_total, :integer)
end
end
end
2 changes: 1 addition & 1 deletion test/dummy/db/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
t.datetime "ended_at"
t.float "time_running", default: 0.0, null: false
t.integer "tick_count", default: 0, null: false
t.integer "tick_total"
t.bigint "tick_total"
t.string "job_id"
t.bigint "cursor"
t.string "status", default: "enqueued", null: false
Expand Down

0 comments on commit 983bd8b

Please sign in to comment.