Actions
Bug #1350
closedMysql2::Error: BLOB/TEXT column 'title' used in key specification without a key length
Description
I get this error when trying to migrate the DB for the first time (clean install)
some info in the system:
sh-3.2# /opt/comcast/platform/rubyee/bin/ruby -v ruby 1.8.7 (2011-02-18 patchlevel 334) [x86_64-linux], MBARI 0x6770, Ruby Enterprise Edition 2011.03 sh-3.2# lsb_release -a LSB Version: :core-4.0-amd64:core-4.0-ia32:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-ia32:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-ia32:printing-4.0-noarch Distributor ID: RedHatEnterpriseServer Description: Red Hat Enterprise Linux Server release 5.6 (Tikanga) Release: 5.6 Codename: Tikanga sh-3.2#
I've tried to trace the offending migration, but my rails is a little "rusty" and I haven't been able to find where the index is being created.
My config file is standard, puppet reports have not been added (trying to stand up foreman prior to dealing with puppet)
--- #:modulepath: /etc/puppet/modules/ :tftppath: tftp/ #:rrd_report_url: report/ #:ldap: true #your default puppet server - can be overridden in the host level #if none specified, plain "puppet" will be used. :puppet_server: dcavm-nb-18p.sys.comcast.net #:unattended: false #use the following setting to override the default 30 minutes puppet run interval - value must be in minutes #:puppet_interval: 60 #:document_root: /var/www
sh-3.2# RAILS_ENV=production rake db:drop (in /opt/comcast/platform/foreman/foreman) sh-3.2# RAILS_ENV=production rake db:create (in /opt/comcast/platform/foreman/foreman) sh-3.2# RAILS_ENV=production rake db:migrate --trace (in /opt/comcast/platform/foreman/foreman) ** Invoke db:migrate (first_time) ** Invoke environment (first_time) ** Execute environment ** Execute db:migrate == CreateHosts: migrating ==================================================== rake aborted! An error has occurred, all later migrations canceled: Mysql2::Error: BLOB/TEXT column 'title' used in key specification without a key length: CREATE INDEX `index_resources_on_title_and_restype` ON `resources` (`title`, `restype`) /opt/comcast/platform/foreman/foreman/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb:227:in `log' /opt/comcast/platform/rubyee/lib/ruby/gems/1.8/gems/mysql2-0.2.6/lib/active_record/connection_adapters/mysql2_adapter.rb:314:in `execute' /opt/comcast/platform/foreman/foreman/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb:292:in `add_index' /opt/comcast/platform/foreman/foreman/vendor/rails/activerecord/lib/active_record/migration.rb:352:in `send' /opt/comcast/platform/foreman/foreman/vendor/rails/activerecord/lib/active_record/migration.rb:352:in `method_missing' /opt/comcast/platform/foreman/foreman/vendor/rails/activerecord/lib/active_record/migration.rb:328:in `say_with_time' /opt/comcast/platform/rubyee/lib/ruby/1.8/benchmark.rb:293:in `measure' /opt/comcast/platform/foreman/foreman/vendor/rails/activerecord/lib/active_record/migration.rb:328:in `say_with_time' /opt/comcast/platform/foreman/foreman/vendor/rails/activerecord/lib/active_record/migration.rb:348:in `method_missing' /opt/comcast/platform/rubyee/lib/ruby/gems/1.8/gems/puppet-2.7.6/lib/puppet/rails/database/schema.rb:28:in `init' /opt/comcast/platform/foreman/foreman/vendor/rails/activerecord/lib/active_record/schema.rb:47:in `instance_eval' /opt/comcast/platform/foreman/foreman/vendor/rails/activerecord/lib/active_record/schema.rb:47:in `define' /opt/comcast/platform/rubyee/lib/ruby/gems/1.8/gems/puppet-2.7.6/lib/puppet/rails/database/schema.rb:8:in `init' /opt/comcast/platform/rubyee/lib/ruby/gems/1.8/gems/puppet-2.7.6/lib/puppet/util.rb:180:in `benchmark' /opt/comcast/platform/rubyee/lib/ruby/1.8/benchmark.rb:308:in `realtime' /opt/comcast/platform/rubyee/lib/ruby/gems/1.8/gems/puppet-2.7.6/lib/puppet/util.rb:179:in `benchmark' /opt/comcast/platform/rubyee/lib/ruby/gems/1.8/gems/puppet-2.7.6/lib/puppet/rails/database/schema.rb:4:in `init' ./db/migrate//20090714132448_create_hosts.rb:8:in `up_without_benchmarks' /opt/comcast/platform/foreman/foreman/vendor/rails/activerecord/lib/active_record/migration.rb:282:in `send' /opt/comcast/platform/foreman/foreman/vendor/rails/activerecord/lib/active_record/migration.rb:282:in `migrate' /opt/comcast/platform/rubyee/lib/ruby/1.8/benchmark.rb:293:in `measure' /opt/comcast/platform/foreman/foreman/vendor/rails/activerecord/lib/active_record/migration.rb:282:in `migrate' /opt/comcast/platform/foreman/foreman/vendor/rails/activerecord/lib/active_record/migration.rb:365:in `__send__' /opt/comcast/platform/foreman/foreman/vendor/rails/activerecord/lib/active_record/migration.rb:365:in `migrate' /opt/comcast/platform/foreman/foreman/vendor/rails/activerecord/lib/active_record/migration.rb:491:in `migrate' /opt/comcast/platform/foreman/foreman/vendor/rails/activerecord/lib/active_record/migration.rb:567:in `call' /opt/comcast/platform/foreman/foreman/vendor/rails/activerecord/lib/active_record/migration.rb:567:in `ddl_transaction' /opt/comcast/platform/foreman/foreman/vendor/rails/activerecord/lib/active_record/migration.rb:490:in `migrate' /opt/comcast/platform/foreman/foreman/vendor/rails/activerecord/lib/active_record/migration.rb:477:in `each' /opt/comcast/platform/foreman/foreman/vendor/rails/activerecord/lib/active_record/migration.rb:477:in `migrate' /opt/comcast/platform/foreman/foreman/vendor/rails/activerecord/lib/active_record/migration.rb:401:in `up' /opt/comcast/platform/foreman/foreman/vendor/rails/activerecord/lib/active_record/migration.rb:383:in `migrate' /opt/comcast/platform/foreman/foreman/vendor/rails/railties/lib/tasks/databases.rake:112 /opt/comcast/platform/rubyee/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `call' /opt/comcast/platform/rubyee/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `execute' /opt/comcast/platform/rubyee/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `each' /opt/comcast/platform/rubyee/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `execute' /opt/comcast/platform/rubyee/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:597:in `invoke_with_call_chain' /opt/comcast/platform/rubyee/lib/ruby/1.8/monitor.rb:242:in `synchronize' /opt/comcast/platform/rubyee/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in `invoke_with_call_chain' /opt/comcast/platform/rubyee/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:583:in `invoke' /opt/comcast/platform/rubyee/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2051:in `invoke_task' /opt/comcast/platform/rubyee/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level' /opt/comcast/platform/rubyee/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `each' /opt/comcast/platform/rubyee/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level' /opt/comcast/platform/rubyee/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling' /opt/comcast/platform/rubyee/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2023:in `top_level' /opt/comcast/platform/rubyee/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2001:in `run' /opt/comcast/platform/rubyee/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling' /opt/comcast/platform/rubyee/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1998:in `run' /opt/comcast/platform/rubyee/lib/ruby/gems/1.8/gems/rake-0.8.7/bin/rake:31 /opt/comcast/platform/rubyee/bin/rake:19:in `load' /opt/comcast/platform/rubyee/bin/rake:19 sh-3.2#
Actions