Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $ script/generate model cd
- editing db/migrate/001_create_cds.rb
- class CreateCds < ActiveRecord::Migration
- def self.up
- create_table :cds do |t|
- t.column :title, :string
- t.column :author, :string
- t.column :description, :string
- end
- end
- def self.down
- drop_table :cds
- end
- end
- $ rake db:migrate
- $ mysql
- mysql> use mescds
- mysql> show columns from mescds;
- +------------------+
- | Tables_in_mescds |
- +------------------+
- | schema_info |
- +------------------+
- 1 row in set (0.00 sec)
- mysq> exit
- cat config/database.yml
- ....
- development:
- adapter: mysql
- database: mescds
- username: xxxxxxxx
- password: xxxxxxxx
- ....
- what did I do wrong ? No tables cds ?
Add Comment
Please, Sign In to add comment