mirror of https://github.com/docusealco/docuseal
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
818 B
21 lines
818 B
class RenameAccountGroupsToPartnerships < ActiveRecord::Migration[8.0]
|
|
def change
|
|
# Rename the table
|
|
rename_table :account_groups, :partnerships
|
|
|
|
# Rename the foreign key columns in other tables
|
|
rename_column :templates, :account_group_id, :partnership_id
|
|
rename_column :template_folders, :account_group_id, :partnership_id
|
|
|
|
# Add global_partnership_id to export_locations
|
|
add_column :export_locations, :global_partnership_id, :integer
|
|
|
|
# Remove partnership relationships since both users and accounts use API context now
|
|
remove_column :users, :account_group_id, :bigint
|
|
remove_column :accounts, :account_group_id, :bigint
|
|
|
|
# Rename the external ID column to match new naming
|
|
rename_column :partnerships, :external_account_group_id, :external_partnership_id
|
|
end
|
|
end
|