class AddDomainToUsers < ActiveRecord::Migration def self.up create_table :domains do |t| t.column :name, :string, :null => false t.column :password, :text, :null => false end add_column :users, :domain_id, :integer end def self.down remove_column :users, :domain_id drop_table :domains end end