Skip to content

Commit

Permalink
Merge pull request #663 from sj26/make-ticks-bigints
Browse files Browse the repository at this point in the history
Change tick columns to bigints
  • Loading branch information
etiennebarrie committed Jul 11, 2022
2 parents e691177 + 8703e19 commit 16afa1f
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 3 deletions.
17 changes: 17 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,17 @@
# frozen_string_literal: true

class ChangeRunsTickColumnsToBigints < ActiveRecord::Migration[6.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
6 changes: 3 additions & 3 deletions test/dummy/db/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.

ActiveRecord::Schema.define(version: 2021_12_10_152329) do
ActiveRecord::Schema.define(version: 2022_07_06_101937) do

create_table "active_storage_attachments", force: :cascade do |t|
t.string "name", null: false
Expand Down Expand Up @@ -45,8 +45,8 @@
t.datetime "started_at"
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_count", default: 0, null: false
t.bigint "tick_total"
t.string "job_id"
t.bigint "cursor"
t.string "status", default: "enqueued", null: false
Expand Down

0 comments on commit 16afa1f

Please sign in to comment.