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.
23 lines
744 B
23 lines
744 B
# frozen_string_literal: true
|
|
|
|
# Migration 4: Update account_access roles
|
|
# Part of Winston's 4-layer data isolation foundation
|
|
class UpdateAccountAccessRoles < ActiveRecord::Migration[7.0]
|
|
def up
|
|
# Add new roles to account_access
|
|
# First, let's check if role column exists and what type it is
|
|
# Based on existing schema, we need to extend the enum
|
|
|
|
# Since account_access doesn't have a role column in the current schema,
|
|
# we need to add it first
|
|
add_column :account_accesses, :role, :string, null: false, default: 'member'
|
|
|
|
# Add index on role for performance
|
|
add_index :account_accesses, :role
|
|
end
|
|
|
|
def down
|
|
remove_index :account_accesses, :role
|
|
remove_column :account_accesses, :role
|
|
end
|
|
end |