Migration Error

When trying to migrate my db using rake I get the following error
message:

rake aborted!
No migration with version number 3

I am using sqlite3 as my database server. Any help is much
appreciated.

mpls,
If you are running rails prior to Rails version 2.0, it means that you
do not have a file like:
db/migrate/003_…

Thanks for the reply. I am using rails 2.0 and the migration file is
prefixed with 20080827011222_
When I run the following command: rake db:migrate
I get the rake aborted! No migration with version number 3.
but when I run: rake db: migrate version 0
the table is created. How do I make rake db:migrate work so I can have
version beyond 0.
Thanks

mpls wrote:

Thanks for the reply. I am using rails 2.0 and the migration file is
prefixed with 20080827011222_
When I run the following command: rake db:migrate
I get the rake aborted! No migration with version number 3.
but when I run: rake db: migrate version 0
the table is created. How do I make rake db:migrate work so I can have
version beyond 0.
Thanks

when u create db through migration there is table name schema_info
when u go threw different migration it track migration !
for further reading http://wiki.rubyonrails.com

Why does rake db:migrate fail

On Aug 26, 9:35 pm, Dharmdip R. [email protected]

Here is my full trace of the rake db:migrate:

** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute db:migrate
rake aborted!
No migration with version number 3
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/
migration.rb
:410:in migrate' c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/ migration.rb :361:indown’
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/
migration.rb
:341:in migrate' c:/ruby/lib/ruby/gems/1.8/gems/rails-2.1.0/lib/tasks/databases.rake:99 c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:546:incall’
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:546:in execute' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:541:ineach’
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:541:in execute' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:508:ininvoke_with_call_c
hain’
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:501:in
synchronize' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:501:ininvoke_with_call_c
hain’
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:494:in invoke' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1931:ininvoke_task’
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1909:in
top_level' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1909:ineach’
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1909:in
top_level' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1948:instandard_exceptio
n_handling’
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1903:in
top_level' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1881:inrun’
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1948:in
standard_exceptio n_handling' c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/lib/rake.rb:1878:inrun’
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.1/bin/rake:31
c:/ruby/bin/rake:19:in `load’
c:/ruby/bin/rake:19

Also why is the version number 3 when this is the first time I ran
rake db:migrate.

mpls: any rake db:migrate related output in development.log ?

Here is the log related to rake db:migrate:

[4;36;1mSQL (0.000000)[0m [0;1mSET NAMES ‘utf8’[0m
[4;35;1mSQL (0.000000)[0m [0mSET SQL_AUTO_IS_NULL=0[0m
[4;36;1mSQL (0.000000)[0m [0;1mSELECT version FROM
schema_migrations[0m
[4;35;1mSQL (0.000000)[0m [0mSHOW TABLES[0m
[4;36;1mSQL (0.000000)[0m [0;1mSELECT version FROM
schema_migrations[0m

mpls wrote:

Why does rake db:migrate fail

On Aug 26, 9:35�pm, Dharmdip R. [email protected]

check syntax , check database is exists or not ?
or check syntax in migration file !

and last r u able to connect db ?