parent
516e0a95db
commit
4fd6dac791
@ -0,0 +1,8 @@
|
|||||||
|
class AddCategoryIdToSqmCategory < ActiveRecord::Migration[6.1]
|
||||||
|
def change
|
||||||
|
add_column :sqm_categories, :category_id, :string, default: 'default-category-id', null: false
|
||||||
|
|
||||||
|
# give everything a default value
|
||||||
|
change_column_default :sqm_categories, :category_id, from: 'default-category-id', to: nil
|
||||||
|
end
|
||||||
|
end
|
||||||
@ -0,0 +1,7 @@
|
|||||||
|
class AddSubcategoryIdToSubcategory < ActiveRecord::Migration[6.1]
|
||||||
|
def change
|
||||||
|
add_column :subcategories, :subcategory_id, :string, default: 'default-subcategory-id', null: false
|
||||||
|
|
||||||
|
change_column_default :subcategories, :subcategory_id, from: 'default-subcategory-id', to: nil
|
||||||
|
end
|
||||||
|
end
|
||||||
Loading…
Reference in new issue