Emi Matchu
e52838ba70
Just packing some serialization complexity away into its own thing, so the model code doesn't need to sweat it!
9 lines
450 B
Ruby
9 lines
450 B
Ruby
class AllowNullInItemsCachedFields < ActiveRecord::Migration[7.2]
|
|
def change
|
|
# This is a bit more compatible with ActiveRecord's `serialize` utility,
|
|
# which seems pretty insistent that empty arrays should be saved as `NULL`,
|
|
# rather than the empty string our serializer would return if called :(
|
|
change_column_null :items, :cached_compatible_body_ids, true
|
|
change_column_null :items, :cached_occupied_zone_ids, true
|
|
end
|
|
end
|