a11yist/db/migrate/20241108180654_drop_accounts.rb

18 lines
546 B
Ruby
Raw Permalink Normal View History

class DropAccounts < ActiveRecord::Migration[8.0]
def change
# Used by the remember me feature
drop_table :account_remember_keys, id: false do |t|
t.integer :id, primary_key: true
t.foreign_key :accounts, column: :id
t.string :key, null: false
t.datetime :deadline, null: false
end
drop_table :accounts do |t|
t.integer :status, null: false, default: 1
t.string :email, null: false
t.index :email, unique: true, where: "status IN (1, 2)"
t.string :password_hash
end
end
end