Matchu
0943e2dbba
Idk how we got into this state, or if it's environment-dependent or MySQL-version-dependent or what, but setting up the dev environment on my macOS machine is complaining that `TEXT` columns can't have default values. Well, in that case, let's just have it be a non-nullable field, and add a note to our code that missing fields *can* cause item saving to fail! (This was always true, but I'm just extra-noting it because it's becoming *more* true.)
8 lines
375 B
Ruby
8 lines
375 B
Ruby
class FixDefaultValueForItemsDescription < ActiveRecord::Migration[7.1]
|
|
def change
|
|
# Idk why, but this column's default value is specified in our schema as
|
|
# an empty string, but setting up the dev environment on my macOS machine
|
|
# is saying on latest MariaDB that this isn't allowed.
|
|
change_column_default :items, :description, from: "", to: nil
|
|
end
|
|
end
|