mirror of
https://github.com/discourse/discourse.git
synced 2025-01-18 13:03:16 +08:00
DEV: Drop unused api_keys.key column
This completes the migration to hashed API keys which was started in 4c9ca24ccf
This commit is contained in:
parent
f1c4180ff8
commit
e8beccdaa4
16
db/post_migrate/20191219112000_remove_key_from_api_keys.rb
Normal file
16
db/post_migrate/20191219112000_remove_key_from_api_keys.rb
Normal file
|
@ -0,0 +1,16 @@
|
|||
# frozen_string_literal: true
|
||||
class RemoveKeyFromApiKeys < ActiveRecord::Migration[6.0]
|
||||
DROPPED_COLUMNS ||= {
|
||||
api_keys: %i{key}
|
||||
}
|
||||
|
||||
def up
|
||||
DROPPED_COLUMNS.each do |table, columns|
|
||||
Migration::ColumnDropper.execute_drop(table, columns)
|
||||
end
|
||||
end
|
||||
|
||||
def down
|
||||
raise ActiveRecord::IrreversibleMigration
|
||||
end
|
||||
end
|
Loading…
Reference in New Issue
Block a user