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
– 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
)
/Users/Zack/.gem/ruby/1.8/gems/activerecord-2.3.8/lib/active_record/connection_adapters/abstract_adapter.rb:221:in
log' /Users/Zack/.gem/ruby/1.8/gems/activerecord-2.3.8/lib/active_record/connection_adapters/mysql_adapter.rb:323:in
execute’
/Users/Zack/.gem/ruby/1.8/gems/activerecord-2.3.8/lib/active_record/connection_adapters/abstract/schema_statements.rb:291:in
add_index' /Users/Zack/.gem/ruby/1.8/gems/activerecord-2.3.8/lib/active_record/migration.rb:352:in
send’
/Users/Zack/.gem/ruby/1.8/gems/activerecord-2.3.8/lib/active_record/migration.rb:352:in
method_missing' /Users/Zack/.gem/ruby/1.8/gems/activerecord-2.3.8/lib/active_record/migration.rb:328:in
say_with_time’
/opt/local/lib/ruby/1.8/benchmark.rb:293:in measure' /Users/Zack/.gem/ruby/1.8/gems/activerecord-2.3.8/lib/active_record/migration.rb:328:in
say_with_time’
/Users/Zack/.gem/ruby/1.8/gems/activerecord-2.3.8/lib/active_record/migration.rb:348:in
method_missing' ./db/migrate//20100823072211_create_users.rb:21:in
up_without_benchmarks’
/Users/Zack/.gem/ruby/1.8/gems/activerecord-2.3.8/lib/active_record/migration.rb:282:in
send' /Users/Zack/.gem/ruby/1.8/gems/activerecord-2.3.8/lib/active_record/migration.rb:282:in
migrate’
/opt/local/lib/ruby/1.8/benchmark.rb:293:in measure' /Users/Zack/.gem/ruby/1.8/gems/activerecord-2.3.8/lib/active_record/migration.rb:282:in
migrate’
/Users/Zack/.gem/ruby/1.8/gems/activerecord-2.3.8/lib/active_record/migration.rb:365:in
__send__' /Users/Zack/.gem/ruby/1.8/gems/activerecord-2.3.8/lib/active_record/migration.rb:365:in
migrate’
/Users/Zack/.gem/ruby/1.8/gems/activerecord-2.3.8/lib/active_record/migration.rb:491:in
migrate' /Users/Zack/.gem/ruby/1.8/gems/activerecord-2.3.8/lib/active_record/migration.rb:567:in
call’
/Users/Zack/.gem/ruby/1.8/gems/activerecord-2.3.8/lib/active_record/migration.rb:567:in
ddl_transaction' /Users/Zack/.gem/ruby/1.8/gems/activerecord-2.3.8/lib/active_record/migration.rb:490:in
migrate’
/Users/Zack/.gem/ruby/1.8/gems/activerecord-2.3.8/lib/active_record/migration.rb:477:in
each' /Users/Zack/.gem/ruby/1.8/gems/activerecord-2.3.8/lib/active_record/migration.rb:477:in
migrate’
/Users/Zack/.gem/ruby/1.8/gems/activerecord-2.3.8/lib/active_record/migration.rb:401:in
up' /Users/Zack/.gem/ruby/1.8/gems/activerecord-2.3.8/lib/active_record/migration.rb:383:in
migrate’
/Users/Zack/.gem/ruby/1.8/gems/rails-2.3.8/lib/tasks/databases.rake:112
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in call' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in
execute’
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in each' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in
execute’
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:597:in
invoke_with_call_chain' /opt/local/lib/ruby/1.8/monitor.rb:242:in
synchronize’
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in
invoke_with_call_chain' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:583:in
invoke’
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2051:in
invoke_task' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in
top_level’
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in each' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in
top_level’
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in
standard_exception_handling' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2023:in
top_level’
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2001:in run' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in
standard_exception_handling’
/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1998:in run' /opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/bin/rake:31 /opt/local/bin/rake:19:in
load’
/opt/local/bin/rake:19