2
0
mirror of https://github.com/moebooru/moebooru synced 2025-08-30 21:45:13 +00:00
Files
moebooru/db/migrate/069_clean_up_users.rb

14 lines
431 B
Ruby
Raw Normal View History

class CleanUpUsers < ActiveRecord::Migration[5.1]
def self.up
remove_column :users, :ip_addr
remove_column :users, :tag_blacklist
remove_column :users, :login_count
end
def self.down
execute "ALTER TABLE users ADD COLUMN ip_addr inet NOT NULL"
add_column :users, :tag_blacklist, :text, :null => false, :default => ""
add_column :users, :login_count, :integer, :null => false, :default => 0
end
end