users: add is_deleted flag.

Add is_deleted flag to users table in preparation for fixing #4555.
This commit is contained in:
evazion
2022-11-06 01:28:47 -05:00
parent b43a913ad7
commit f083f29c3b
2 changed files with 21 additions and 0 deletions

View File

@@ -0,0 +1,8 @@
class AddIsDeletedToUsers < ActiveRecord::Migration[7.0]
disable_ddl_transaction!
def change
add_column :users, :is_deleted, :boolean, null: false, default: false
add_index :users, :is_deleted, where: "is_deleted = TRUE", algorithm: :concurrently
end
end