What's wrong with this ruby on rails migration?
I am trying to migrate ruby on rails application from one machine to another and when I type Rak开发者_Python百科e db:migrate it gives following error:
Mysql::Error: Table 'schema_migrations' already exists:
CREATE TABLE `schema_migrations` (`version` varchar(255) NOT NULL) ENGINE=InnoDB
what might be the possible cause..?
As mentioned by Bohdan...
or
rake db:migrate:reset
Hi try rake db:drop rake db:create rake db:migrate
In my case just dropping and creating database didn't help. Try restarting mysql server also:
/etc/init.d/mysqld restart
/etc/init.d/mysql restart
service mysqld restart
(depending on what OS you run), and then:
rake db:reset && rake db:test:clone
P.S. If you're using any preloaded like zeus or guard, try running without it.
精彩评论