Project

General

Profile

Missing SQL commands on migrate

Added by Frederick Brier almost 13 years ago

I am trying to solve my problem with easy_agile , but believe I have narrowed it down to the migrate_plugins command not creating the easy_agile tables. Any help tracking down the problem would be greatly appreciated.

Though I am not a rails developer, I managed to see the SQL commands generated by the rake db:migrate commands with --trace. While the main Redmine db:migrate generated lots of SQL output in the production.log, the easy_agile plugin only generated 2 lines of output.

  SQL (0.2ms)   SET NAMES 'utf8'
  SQL (0.1ms)   SET SQL_AUTO_IS_NULL=0

I did notice that the easy_agile migration scripts are using the short hand version of the Rails migration classes, vs. the long hand used in the test migration directory.

/usr/local/www/redmine-1.3.0/vendor/plugins/engines/test/plugins/test_migration/db/migrate/001_create_tests.rb says:

      t.column 'name', :string

Whereas, /usr/local/www/redmine-1.3.0/vendor/plugins/easy_agile/db/migrate/20090303213012_create_iterations.rb says:
      t.string :name

Looking at multiple source, it appears that while the ruby-on-rails site documentation for 3.2.0 shows both approaches, 2.3.x already had this feature.

Executed migrate commands:

[root@ice redmine]#  rake --trace db:migrate RAILS_ENV=production
(in /usr/local/www/redmine-1.3.0)
** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute db:migrate
** Invoke db:schema:dump (first_time)
** Invoke environment
** Execute db:schema:dump
[root@ice redmine]# rake --trace db:migrate_plugins RAILS_ENV=production
(in /usr/local/www/redmine-1.3.0)
** Invoke db:migrate_plugins (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute db:migrate_plugins