Actions
Defect #5723
closedError db:migrate with rails=2.3.8
Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Database
Target version:
-
Start date:
2010-06-22
Due date:
% Done:
0%
Estimated time:
Resolution:
Invalid
Affected version:
Description
I use environment:
Ruby version 1.8.7 (amd64-freebsd8) RubyGems version 1.3.7 Rack version 1.1 Rails version 2.3.8 Active Record version 2.3.8 Active Resource version 2.3.8 Action Mailer version 2.3.8 Active Support version 2.3.8 Application root /usr/local/www/redmine Environment production Database adapter postgresql Database schema version 20100323105501
At initial installation of base (db:migrate) there was an error:
$ RAILS_ENV=production rake db:migrate (in /usr/local/www/redmine) ...(skipped lines) == CreateWikis: migrating ==================================================== -- create_table(:wikis) NOTICE: CREATE TABLE will create implicit sequence "wikis_id_seq" for serial column "wikis.id" NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "wikis_pkey" for table "wikis" -> 0.0137s -- add_index(:wikis, :project_id, {:name=>:wikis_project_id}) rake aborted! An error has occurred, this and all later migrations canceled: undefined method `length' for :wikis_project_id:Symbol (See full trace by running task with --trace)
I have viewed a code of creation of base and have found syntax errors in add_index
and remove_index
. Options ":name" are specified with a colon, and there should be commas:
- add_index :wikis, :project_id, :name => :wikis_project_id + add_index :wikis, :project_id, :name => "wikis_project_id"
(As it is written in documentation Class ActiveRecord::Migration)
Files
Related issues
Updated by Felix Schäfer about 14 years ago
Rails 2.3.8 is unsupported as of zet, keeping open for the time we do though.
Updated by Torgny Nyblom over 13 years ago
- File 0001-Make-sure-name-in-enclosed-in-quotation-marks.patch 0001-Make-sure-name-in-enclosed-in-quotation-marks.patch added
Updated patch that covers the destruction as well as the creation of the db.
Updated by Etienne Massip over 12 years ago
- Status changed from New to Closed
- Resolution set to Invalid
Rails issue fixed with 2.3.10 (https://github.com/rails/rails/commit/8b8730e1390963a8bb3a231ed1a324862d3dc4cf).
Actions