mirror of
https://github.com/lunaisnotaboy/mastodon.git
synced 2024-08-18 05:54:57 +00:00
9 lines
349 B
Ruby
9 lines
349 B
Ruby
class AddCreatedByApplicationIdToUsers < ActiveRecord::Migration[5.2]
|
|
disable_ddl_transaction!
|
|
|
|
def change
|
|
safety_assured { add_reference :users, :created_by_application, foreign_key: { to_table: 'oauth_applications', on_delete: :nullify }, index: false }
|
|
add_index :users, :created_by_application_id, algorithm: :concurrently
|
|
end
|
|
end
|