というわけで、再挑戦。001_create_books.rbはこんな感じ
class CreateBooks < ActiveRecord::Migration def self.up create_table :books do |t| t.column :isbn13, :string t.column :status, :integer t.column :title, :string t.column :auther, :string end end def self.down drop_table :books end end
rake!
H:\Rails\hondana>rake db:migrate -t (in H:/Rails/hondana) ** Invoke db:migrate (first_time) ** Invoke environment (first_time) ** Execute environment ** Execute db:migrate == CreateBooks: migrating ======================== -- create_table(:books) -> 2.9060s == CreateBooks: migrated (2.9060s) =============== ** Invoke db:schema:dump (first_time) ** Invoke environment ** Execute db:schema:dump
できたっぽ?
db2 => list tables for schema db2admin 表/ビュー スキーマ タイプ 作成時刻 ------------------------------- --------------- ----- -------------------------- BOOKS DB2ADMIN T 2008-05-09-18.40.50.781001 SCHEMA_INFO DB2ADMIN T 2008-05-09-18.35.36.281000 2 レコードが選択されました。
できてる。