mirror of
https://github.com/mastodon/mastodon.git
synced 2025-02-07 07:25:09 +00:00
![Eugen Rochko](/assets/img/avatar_default.png)
* Add customizable user roles * Various fixes and improvements * Add migration for old settings and fix tootctl role management
9 lines
319 B
Ruby
9 lines
319 B
Ruby
class AddRoleIdToUsers < ActiveRecord::Migration[6.1]
|
|
disable_ddl_transaction!
|
|
|
|
def change
|
|
safety_assured { add_reference :users, :role, foreign_key: { to_table: 'user_roles', on_delete: :nullify }, index: false }
|
|
add_index :users, :role_id, algorithm: :concurrently, where: 'role_id IS NOT NULL'
|
|
end
|
|
end
|