mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
DEV: Break up PG query in MakePasswordColumnsFromUsersReadOnly (#29167)
We are getting a lock timeout but I can't tell which statement so break it up.
This commit is contained in:
committed by
GitHub
parent
2193667e1f
commit
d90203f27f
@@ -2,10 +2,19 @@
|
||||
class MakePasswordColumnsFromUsersReadOnly < ActiveRecord::Migration[7.1]
|
||||
def up
|
||||
# remove invalid triggers/functions dependent on the columns to be dropped
|
||||
execute <<~SQL.squish
|
||||
execute <<~SQL
|
||||
DROP TRIGGER IF EXISTS users_password_sync_on_delete_password ON users;
|
||||
SQL
|
||||
|
||||
execute <<~SQL
|
||||
DROP FUNCTION IF EXISTS delete_user_password;
|
||||
SQL
|
||||
|
||||
execute <<~SQL
|
||||
DROP TRIGGER IF EXISTS users_password_sync ON users;
|
||||
SQL
|
||||
|
||||
execute <<~SQL
|
||||
DROP FUNCTION IF EXISTS mirror_user_password_data;
|
||||
SQL
|
||||
|
||||
|
||||
Reference in New Issue
Block a user