Defect #3352
closedFailing migration 105 (BuildProjectsTree)
100%
Description
I'm trying to upgrade from 0.8.0 stable to current svn trunk, but migration 105 (BuildProjectsTree) fails with "Validation failed: Identifier is invalid"
I checked the identifiers in the projects table, but couldn't find any invalid character or string length. I didn't change anything in the database by hand...
My environment:
Ruby version 1.8.7 (i386-mswin32)
RubyGems version 1.3.1
Rails version 2.2.2
Active Record version 2.2.2
Action Pack version 2.2.2
Active Resource version 2.2.2
Action Mailer version 2.2.2
Active Support version 2.2.2
Application root C:/wamp/apps/redmine_0512
Environment development
Database adapter mysql
Database schema version 104
MySQL version: 5.0.51b-community-nt
redmine: current trunk r2737
- Invoke db:migrate (first_time) * Invoke environment (first_time) * Execute environment ** Execute db:migrate
BuildProjectsTree: migrating ============================================
rake aborted!
An error has occurred, all later migrations canceled:
Validation failed: Identifier is invalid
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/validations.
rb:1021:in `save_without_dirty!'
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/dirty.rb:87:
in `save_without_transactions!'
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/transactions
.rb:150:in `save!'
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/connection_a
dapters/abstract/database_statements.rb:66:in `transaction'
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/transactions
.rb:129:in `transaction'
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/transactions
.rb:138:in `transaction'
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/transactions
.rb:150:in `save!'
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/transactions
.rb:158:in `rollback_active_record_state!'
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/transactions
.rb:150:in `save!'
C:/wamp/apps/redmine_0512/vendor/plugins/awesome_nested_set/lib/awesome_nested_s
et.rb:186:in `rebuild!'
C:/wamp/apps/redmine_0512/vendor/plugins/awesome_nested_set/lib/awesome_nested_s
et.rb:183:in `call'
C:/wamp/apps/redmine_0512/vendor/plugins/awesome_nested_set/lib/awesome_nested_s
et.rb:183:in `rebuild!'
C:/wamp/apps/redmine_0512/vendor/plugins/awesome_nested_set/lib/awesome_nested_s
et.rb:183:in `each'
C:/wamp/apps/redmine_0512/vendor/plugins/awesome_nested_set/lib/awesome_nested_s
et.rb:183:in `rebuild!'
C:/wamp/apps/redmine_0512/vendor/plugins/awesome_nested_set/lib/awesome_nested_s
et.rb:193:in `call'
C:/wamp/apps/redmine_0512/vendor/plugins/awesome_nested_set/lib/awesome_nested_s
et.rb:193:in `rebuild!'
C:/wamp/apps/redmine_0512/vendor/plugins/awesome_nested_set/lib/awesome_nested_s
et.rb:190:in `each'
C:/wamp/apps/redmine_0512/vendor/plugins/awesome_nested_set/lib/awesome_nested_s
et.rb:190:in `rebuild!'
./db/migrate//105_build_projects_tree.rb:3:in `up_without_benchmarks'
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/migration.rb
:280:in `send'
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/migration.rb
:280:in `migrate'
c:/ruby/lib/ruby/1.8/benchmark.rb:293:in `measure'
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/migration.rb
:280:in `migrate'
(DELEGATION):2:in `__send__'
(DELEGATION):2:in `migrate'
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/migration.rb
:480:in `migrate'
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/migration.rb
:556:in `call'
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/migration.rb
:556:in `ddl_transaction'
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/migration.rb
:479:in `migrate'
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/migration.rb
:466:in `each'
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/migration.rb
:466:in `migrate'
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/migration.rb
:394:in `up'
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/migration.rb
:377:in `migrate'
c:/ruby/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/tasks/databases.rake:111
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:617:in `call'
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:617:in `execute'
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:612:in `each'
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:612:in `execute'
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:578:in `invoke_with_call_c
hain'
c:/ruby/lib/ruby/1.8/monitor.rb:242:in `synchronize'
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:571:in `invoke_with_call_c
hain'
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:564:in `invoke'
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:2019:in `invoke_task'
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1997:in `top_level'
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1997:in `each'
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1997:in `top_level'
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:2036:in `standard_exceptio
n_handling'
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1991:in `top_level'
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1970:in `run'
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:2036:in `standard_exceptio
n_handling'
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1967:in `run'
c:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.3/bin/rake:31
c:/ruby/bin/rake:19:in `load'
c:/ruby/bin/rake:19
Updated by Jean-Philippe Lang over 15 years ago
Can you post all your identifiers please.
SELECT identifier FROM projects;
Updated by Michael Mohr over 15 years ago
sorry, haven't been in for a while...
SELECT identifier FROM projects:
gdsii
intranet
nubase
bde
infor
seriennr
itservice
nucontrols
bks
se-schueco
siemens
70162
datastore
auftragsverwaltung
testassistent
Updated by Jean-Philippe Lang over 15 years ago
The problem is 70162. Numeric identifiers are no longer valid indentifiers.
You can change it in your database, or wait for a patch.
Updated by Michael Mohr over 15 years ago
- Status changed from New to Resolved
- % Done changed from 0 to 100
That did the trick!
Thanks!!!
Updated by Jean-Philippe Lang over 15 years ago
- Status changed from Resolved to Closed
- Resolution set to Fixed
r2762 will prevent this error.
Thanks for the feedback.