Emi Matchu
18c7a34b8f
I considered this at first, but decided to keep it simple until it turned out to matter. Oops, it already matters, lol! I want the item search code to be able to easily tell if the series name is real or a placeholder, so we can decide whether to build the filter text in `fits:$series-$color-$species` form or `fits:alt-style-$id` form. So in this change, we keep it that `AltStyle#series_name` returns the placeholder string if none is set, but callers can explicitly ask whether it's a real series name or not. Will use this in our next change!
6 lines
228 B
Ruby
6 lines
228 B
Ruby
class ChangeDefaultForAltStylesSeriesName < ActiveRecord::Migration[7.1]
|
|
def change
|
|
change_column_null :alt_styles, :series_name, true
|
|
change_column_default :alt_styles, :series_name, from: "<New?>", to: nil
|
|
end
|
|
end
|