Sha256: 3accad944439af425ca0f6cbf44b55dde11471b66e969089288a0a25bb7cbbc7
Contents?: true
Size: 1.02 KB
Versions: 33
Compression:
Stored size: 1.02 KB
Contents
class RemoveUserStatus < ActiveRecord::Migration def self.up Zena::Db.update_value('sites_users.status', :from => 'users.status', :where => 'users.id=sites_users.user_id') remove_column :users, 'status' add_column :sites_users, 'contact_id', :integer # contact page for the given site Zena::Db.update_value('sites_users.contact_id', :from => 'users.contact_id', :where => 'users.id=sites_users.user_id') remove_column :users, 'contact_id' remove_column :sites, 'admin_group_id' end def self.down add_column :users, :status, :integer Zena::Db.update_value('users.status', :from => 'sites_users.status', :where => "user.id=sites_users.user_id") add_column :users, 'contact_id', :integer # contact page for the given site Zena::Db.update_value('users.contact_id', :from => 'sites_users.contact_id', :where => "user.id=sites_users.user_id") remove_column :sites_users, 'contact_id' end end
Version data entries
33 entries across 33 versions & 1 rubygems