Change Digests Distance to Bigint

This commit is contained in:
Eugene Burmakin 2025-12-27 23:49:53 +01:00
parent df26984777
commit 727a4df2e4
2 changed files with 15 additions and 2 deletions

View file

@ -0,0 +1,13 @@
# frozen_string_literal: true
class ChangeDigestsDistanceToBigint < ActiveRecord::Migration[8.0]
disable_ddl_transaction!
def up
safety_assured { change_column :digests, :distance, :bigint, null: false, default: 0 }
end
def down
safety_assured { change_column :digests, :distance, :integer, null: false, default: 0 }
end
end

4
db/schema.rb generated
View file

@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema[8.0].define(version: 2025_12_27_000001) do
ActiveRecord::Schema[8.0].define(version: 2025_12_27_223614) do
# These are extensions that must be enabled in order to support this database
enable_extension "pg_catalog.plpgsql"
enable_extension "postgis"
@ -84,7 +84,7 @@ ActiveRecord::Schema[8.0].define(version: 2025_12_27_000001) do
t.bigint "user_id", null: false
t.integer "year", null: false
t.integer "period_type", default: 0, null: false
t.integer "distance", default: 0, null: false
t.bigint "distance", default: 0, null: false
t.jsonb "toponyms", default: {}
t.jsonb "monthly_distances", default: {}
t.jsonb "time_spent_by_location", default: {}