Im using restful authentication, and i changed the username model from
login to username. The error is Mysql::Error: Key column 'login' doesn't
exist in table: CREATE UNIQUE INDEX `index_users_on_login` Heres the
trace:
DEPRECATION WARNING: Rake tasks in
vendor/plugins/restful-authentication/tasks are deprecated. Use
lib/tasks instead. (called from
/Users/Zack/.gem/ruby/1.8/gems/rails-2.3.8/lib/tasks/rails.rb:10)
** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute db:migrate
== CreateUsers: migrating
Im using restful authentication, and i changed the username model from
login to username. The error is Mysql::Error: Key column 'login' doesn't
exist in table: CREATE UNIQUE INDEX `index_users_on_login` Heres the
trace:
If you are only just starting with Resful Authentication I would
suggest not doing this, it is generally considered not the best
nowadays. Have a look at Authlogic instead.
DEPRECATION WARNING: Rake tasks in
vendor/plugins/restful-authentication/tasks are deprecated. Use
lib/tasks instead. (called from
/Users/Zack/.gem/ruby/1.8/gems/rails-2.3.8/lib/tasks/rails.rb:10)
** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute db:migrate
== CreateUsers: migrating
-- create_table("users", {:force=>true})
-> 0.1138s
-- add_index(:users, :login, {:unique=>true})
rake aborted!
An error has occurred, all later migrations canceled:
Mysql::Error: Key column 'login' doesn't exist in table: CREATE UNIQUE
INDEX `index_users_on_login` ON `users` (`login`)
In the migration have you added the login field to the database? This
must be done before adding the index. The clue is in the error
message.