I want to go from my version 1004 to something 4.0 flavored.
[root@chewbacca logs]#gem list --local
*** LOCAL GEMS ***
[…]
rails (1.1.4, 1.1.2, 1.1.0, 1.0.0, 0.14.4, 0.14.3.2969, 0.14.3, 0.14.2)
Web-application framework with template engine, control-flow layer,
and ORM.
I’ve copied my database over to a test database, and have the “blog”
directory set up on a test URL.
Database.yml is set up correctly to access it. At this point, the
database
version is 42.
When I access /blog/admin to do the migration, I got errors about a
missing
triggers table.
ActiveRecord::StatementInvalid (Mysql::Error: Table ‘typotest.triggers’
doesn’t exist: SELECT * FROM triggers WHERE (due_at <= ‘2006-07-29
21:00:01’) ):
/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb:120:in
`log’
Adding the table, I then got errors about a missing “due_at” field which
I
should have figured from the above error.
ActiveRecord::StatementInvalid (Mysql::Error: Unknown column ‘due_at’ in
‘where
clause’: SELECT * FROM triggers WHERE (due_at <= ‘2006-07-29 21:01:36’)
):
/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract_ad
apter.rb:120:in `log’
Adding the due_at field as a ‘datetime’ type, I can then access the
admin
page. It wants to migrate me from version 42 to 48.
Sounds good. When I click “Update database now”, the migration dies
with
Application error Typo failed to start properly"
The logs complain that triggers table exists. =) Errors are this…
ActiveRecord::StatementInvalid (Mysql::Error: Table ‘triggers’ already
exists: CREATE TABLE triggers (id
int(11) DEFAULT NULL auto_increment
PRIMARY KEY, pending_item_id
int(11), pending_item_type
varchar(255),
due_at
datetime, trigger_method
varchar(255)) ENGINE=InnoDB):
/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb:120:in
`log’
and this…
[Sat Jul 29 21:03:40 2006] [error] [client 24.149.167.195] FastCGI: comm
with server “/aaa/blog/public/dispatch.fcgi” aborted: error parsing
headers:
malformed header ‘== CreateTriggers migrating
==================================================’
I drop the triggers table and we go round again to square one.
ActiveRecord::StatementInvalid (Mysql::Error: Table ‘typotest.triggers’
doesn’t exist: SELECT * FROM triggers WHERE (due_at <= ‘2006-07-29
21:15:30’) ):
/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb:120:in
`log’
What’s a person to do to make this migrate right?