Updated GroupCategory functionality with Groups
• Updated: - GroupCategory functionality with Groups
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
class RemoveGroupCategoriesIdFromGroup < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
safety_assured { remove_column :groups, :group_categories_id }
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,6 @@
|
||||
class AddForeignKeyToGroupForGroupCategory < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
add_column :groups, :group_category_id, :integer
|
||||
add_foreign_key :groups, :group_categories, on_delete: :nullify, validate: false
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,5 @@
|
||||
class ValidateAddForeignKeyToGroupForGroupCategory < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
validate_foreign_key :groups, :group_categories
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user