Now, this is how i used the migrate command. and it shows that the
migration is successful .
Note that the name of migration is ‘kmigrate’ while the table is
‘kusers’. “Example” is the name of the project.
== Kmigrate: migrating =====================
== Kmigrate: migrated (0.0000s) ============
== CreateKusers: migrating =================
== CreateKusers: migrated (0.0625s) ========
This is the code written in \db\migrate\create_kusers.rb file
class CreateKusers < ActiveRecord::Migration
create_table :kusers do |t|
t.string “name”, :limit =>25
t.string “address”, :limit => 50
t.integer “age”, :limit =>50
Now, now the above database should be mentioned in the schema.rb as it
is loaded at run-time when DUMPED.
but it hows an error as follows :
ActiveRecord::Schema.define(:version => 20110402024216) do
Could not dump table “kusers” because of following ArgumentError
instead of invalid date and could not dump in the schema file, it
should be able to shows the fields in of the table kusers.
other than that i possibly reverted thd migration and tried again, but
no luck !! But that does say that migration and revert functions are
working perfectly fine.