rism-digital / muscat

🗂️ A Rails application for the inventory of handwritten and printed music scores
http://muscat-project.org
34 stars 16 forks source link

DB migrate crashes with syntax error in test env #1121

Open HirschSt opened 3 years ago

HirschSt commented 3 years ago

rake db:migrate is unhappy with https://github.com/rism-digital/muscat/blob/cca3826581f4b6332ee889bd37951a41f7945619/db/migrate/20140401072119_create_catalogues.rb#L37:

`-- execute("ALTER TABLE catalogues AUTO_INCREMENT=") rake aborted! StandardError: An error has occurred, all later migrations canceled:

Mysql2::Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1: ALTER TABLE catalogues AUTO_INCREMENT= /var/lib/gems/2.5.0/gems/mysql2-0.5.3/lib/mysql2/client.rb:131:in _query' /var/lib/gems/2.5.0/gems/mysql2-0.5.3/lib/mysql2/client.rb:131:inblock in query' /var/lib/gems/2.5.0/gems/mysql2-0.5.3/lib/mysql2/client.rb:130:in handle_interrupt' /var/lib/gems/2.5.0/gems/mysql2-0.5.3/lib/mysql2/client.rb:130:inquery' /var/lib/gems/2.5.0/gems/activerecord-5.2.4.6/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:187:in block (2 levels) in execute' /var/lib/gems/2.5.0/gems/activesupport-5.2.4.6/lib/active_support/dependencies/interlock.rb:48:inblock in permit_concurrent_loads' /var/lib/gems/2.5.0/gems/activesupport-5.2.4.6/lib/active_support/concurrency/share_lock.rb:187:in yield_shares' /var/lib/gems/2.5.0/gems/activesupport-5.2.4.6/lib/active_support/dependencies/interlock.rb:47:inpermit_concurrent_loads' /var/lib/gems/2.5.0/gems/activerecord-5.2.4.6/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:186:in block in execute' /var/lib/gems/2.5.0/gems/activerecord-5.2.4.6/lib/active_record/connection_adapters/abstract_adapter.rb:581:inblock (2 levels) in log' /var/lib/gems/2.5.0/gems/activerecord-5.2.4.6/lib/active_record/connection_adapters/abstract_adapter.rb:580:in block in log' /var/lib/gems/2.5.0/gems/activesupport-5.2.4.6/lib/active_support/notifications/instrumenter.rb:23:ininstrument' /var/lib/gems/2.5.0/gems/activerecord-5.2.4.6/lib/active_record/connection_adapters/abstract_adapter.rb:571:in log' /var/lib/gems/2.5.0/gems/activerecord-5.2.4.6/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:185:inexecute' /var/lib/gems/2.5.0/gems/activerecord-5.2.4.6/lib/active_record/connection_adapters/mysql/database_statements.rb:28:in execute' /var/lib/gems/2.5.0/gems/activerecord-5.2.4.6/lib/active_record/migration.rb:871:inblock in method_missing' /var/lib/gems/2.5.0/gems/activerecord-5.2.4.6/lib/active_record/migration.rb:840:in block in say_with_time' /var/lib/gems/2.5.0/gems/activerecord-5.2.4.6/lib/active_record/migration.rb:840:insay_with_time' /var/lib/gems/2.5.0/gems/activerecord-5.2.4.6/lib/active_record/migration.rb:860:in method_missing' /var/lib/gems/2.5.0/gems/activerecord-5.2.4.6/lib/active_record/migration.rb:604:inmethod_missing' /data/rails/muscat/db/migrate/20140401072119_create_catalogues.rb:37:in up'

xhero commented 2 years ago

Did you manage to look at this? I think probably the configuration

    :publication        => 95000000,
}

is missing in application.rb

HirschSt commented 2 years ago

Thanks! Yes, I have nearly that

:publication        => 0,
}

Should I take the new value? But I think this issue can be closed.