Error running rake db:migrate

44 views
Skip to first unread message

Rajdeep Dua

unread,
Feb 8, 2013, 6:17:24 AM2/8/13
to choru...@googlegroups.com
Hi All,
Getting this error while trying to run rake db:migrate before i run rake db:seed.
Is this a bug in the code?

Thanks
rajdeep

==  FixSequenceNames: migrating ===============================================
-- execute("alter sequence instance_credentials_id_seq rename to instance_accounts_id_seq;")
rake aborted!
An error has occurred, this and all later migrations canceled:

ActiveRecord::JDBCError: ERROR: relation "instance_credentials_id_seq" does not exist: alter sequence instance_credentials_id_seq rename to instance_accounts_id_seq;
arjdbc/jdbc/RubyJdbcConnection.java:195:in `execute'
/Users/rajdeepd/.rvm/gems/jruby-1.7.0/gems/activerecord-jdbc-adapter-1.2.6/lib/arjdbc/jdbc/adapter.rb:292:in `_execute'
/Users/rajdeepd/.rvm/gems/jruby-1.7.0/gems/activerecord-jdbc-adapter-1.2.6/lib/arjdbc/jdbc/adapter.rb:278:in `execute'
/Users/rajdeepd/.rvm/gems/jruby-1.7.0/gems/activerecord-3.2.11/lib/active_record/connection_adapters/abstract_adapter.rb:280:in `log'
/Users/rajdeepd/.rvm/gems/jruby-1.7.0/gems/activesupport-3.2.11/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/Users/rajdeepd/.rvm/gems/jruby-1.7.0/gems/activesupport-3.2.11/lib/active_support/notifications/instrumenter.rb:19:in `instrument'
/Users/rajdeepd/.rvm/gems/jruby-1.7.0/gems/activerecord-3.2.11/lib/active_record/connection_adapters/abstract_adapter.rb:275:in `log'
/Users/rajdeepd/.rvm/gems/jruby-1.7.0/gems/activerecord-jdbc-adapter-1.2.6/lib/arjdbc/jdbc/adapter.rb:278:in `execute'
org/jruby/RubyBasicObject.java:1673:in `__send__'

Callum Stott

unread,
Feb 8, 2013, 12:56:36 PM2/8/13
to choru...@googlegroups.com
Hi Rajdeep -

So does this error show up when you are running:

rake development:init

or are you running rake db:migrate separately?  Also, have you made any changes to database.yml or database.yml.example?  We can't reproduce this problem and we believe that earlier database migrations should have created the sequence which is being renamed in the failure message.  

Thanks,

Andrew Brown & Callum Stott


--
You received this message because you are subscribed to the Google Groups "chorus-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chorus-dev+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Rajdeep Dua

unread,
Feb 9, 2013, 12:30:33 PM2/9/13
to choru...@googlegroups.com
I am getting this error while running rake development:init the first time on a fresh install too..

hholzmann

unread,
Feb 11, 2013, 6:35:05 PM2/11/13
to choru...@googlegroups.com
Hey team,

Let's move this discussion to the github issue, so that others can hopefully benefit from it as well.

Thanks!
George and Helge


On Monday, February 11, 2013 3:07:37 AM UTC-8, kacch wrote:
Hello Andrew Brown & Callum Stott,

I am also facing the same issue. When I went through all the migration files. Following are points that I marked. Please correct me if I am wrong:-

   1) Error is thrown while running db/migrate/20120716171746_fix_sequence_names.rb file which says "instance_credentials_id_seq" does not exist".

2) Before the execution of above migration file, 20120502012345_rename_instance_credentials_to_instance_account.rb is executed in which 'instance_credentials' is changed to 'instance_accounts'. Can this create any problem.

Thanks

Apurva Mayank
 
On Friday, 8 February 2013 23:26:36 UTC+5:30, cstott  wrote:

Rajdeep Dua

unread,
Feb 11, 2013, 11:55:57 PM2/11/13
to choru...@googlegroups.com
The error listed above comes only in the master branch. 
We are able to run rake development:init successfully on branch 2.2.0.5. 
Reply all
Reply to author
Forward
0 new messages