2009/8/31 zambezi <[email protected]>:
> Thanks Dhruva and Colin,
>
> I dropped the database and then recreated it.  Rake threw up an abort
> message, but still created the db.  Next I ran the migration, but rake
> still aborted with out creating the 2nd table.  I don't think it is
> the migration code, because I tried reversing the migration order
> (table incident and then table incident user).  Table incident was
> created, but Rake aborted on incident_user.
>
> --------Here are the messages
>
> on db:create db_eahv8

You just want
rake db:create
It knows the db name from database.yml

Get this working before worrying about the next bit as if this won't
work there is something fundamentally wrong.

Colin

>
> (in C:/RubyRails/rails_apps/rappEAHv8)
> rake aborted!
> Don't know how to build task 'db_eahv8'
>
> on db:migrate
>
> (in C:/RubyRails/rails_apps/rappEAHv8)
> == 1 CreateIncidentUsers: migrating
> ===========================================
> -- create_table(:incident_user)
>   -> 0.0800s
> -- add_index(:incident_user_name)
> rake aborted!
> wrong number of arguments (1 for 2)
>
> --------
> class CreateIncidentUsers < ActiveRecord::Migration
>
>  def self.up
>    create_table :incident_user do |t|
>      t.column    :incident_user_name, :string,  :null => false
>      t.column    :position,           :string
>      t.column    :phone,              :string
>      t.column    :email,              :string,  :null => false
>      t.column    :hashed_password,    :string,  :null => false
>      t.column    :salt,               :string
>      t.column    :enabled,            :boolean, :default =>
> true, :null => false
>      t.column    :last_login_at,      :datetime
>      t.timestamps
>    end
>      add_index :incident_user_name
>  end
>
>  def self.down
>    drop_table :incident_user
>  end
>
> end #end migration

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to