1
0
Fork 0
forked from OpenNeo/impress

Fix default value for Impress 2020's modeling_logs.created_at

This commit is contained in:
Emi Matchu 2024-02-20 16:46:19 -08:00
parent 3ac9e7ce69
commit b7296d6a75
2 changed files with 14 additions and 2 deletions

View file

@ -0,0 +1,12 @@
class FixDefaultValueForModelingLogsCreatedAt < ActiveRecord::Migration[7.1]
def change
# NOTE: This isn't a field used in the Rails app; it's one used in Impress
# 2020, and when we imported the latest schema into here, the importer
# didn't correctly capture the default field it uses.
#
# So, this is just us fixing the dev environment as declared by `schema.rb`
# to match how things already are in prod!
change_column_default :modeling_logs, :created_at,
from: nil, to: -> { "CURRENT_TIMESTAMP" }
end
end

View file

@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema[7.1].define(version: 2024_02_20_230420) do
ActiveRecord::Schema[7.1].define(version: 2024_02_21_004332) do
create_table "alt_styles", charset: "utf8mb4", collation: "utf8mb4_unicode_ci", force: :cascade do |t|
t.integer "species_id", null: false
t.integer "color_id", null: false
@ -162,7 +162,7 @@ ActiveRecord::Schema[7.1].define(version: 2024_02_20_230420) do
end
create_table "modeling_logs", id: :integer, charset: "latin1", collation: "latin1_swedish_ci", force: :cascade do |t|
t.datetime "created_at", precision: nil, null: false
t.datetime "created_at", precision: nil, default: -> { "current_timestamp()" }, null: false
t.text "log_json", null: false
t.string "pet_name", limit: 128, null: false
end