J
Jerry Jones
Beginner alert.....
I am working on a database migration. I am adding inventory items to
the table. I have the data, but for the life of me, I cannot remember
where to make this file. I remember how to run the migration etc.
So where do I put the
class AddUserTable < ActiveRecord::Migration
def self.up
create_table :users do |table|
table.column :name, :string
table.column :login, :string
table.column assword, :string, :limit => 32
table.column :email, :string
end
end
def self.down
drop_table :users
end
end
I am working on a database migration. I am adding inventory items to
the table. I have the data, but for the life of me, I cannot remember
where to make this file. I remember how to run the migration etc.
So where do I put the
class AddUserTable < ActiveRecord::Migration
def self.up
create_table :users do |table|
table.column :name, :string
table.column :login, :string
table.column assword, :string, :limit => 32
table.column :email, :string
end
end
def self.down
drop_table :users
end
end