Identifier too long error: Oracle 11/Redmine
Added by Matthew Rupert over 13 years ago
When I attempt my db migrate I get the error below. I'm guessing the table name is too long. Are there any solutions?
AddOpenIdAuthenticationTables: migrating ================================-- create_table(:open_id_authentication_associations, {:force=>true})
rake aborted!
An error has occurred, all later migrations canceled:
OCIError: ORA-00972: identifier is too long: CREATE TABLE "OPEN_ID_AUTHENTICATION_ASSOCIATIONS" ("ID" NUMBER NOT NULL PRIMARY KEY, "ISSUED" NUMBER, "LIFETIME" NUMBER, "HANDLE" VARCHAR2, "ASSOC_TYPE" VARCHAR2, "SERVER_URL" BLOB, "SECRET" BLOB)
/opt/redmine-1.1.2/vendor/rails/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb:219:in `log'
/usr/local/lib/ruby/gems/1.8/gems/activerecord-oracle_enhanced-adapter-1.3.2/lib/active_record/connection_adapters/oracle_enhanced_adapter.rb:1077:in `log'
/usr/local/lib/ruby/gems/1.8/gems/activerecord-oracle_enhanced-adapter-1.3.2/lib/active_record/connection_adapters/oracle_enhanced_adapter.rb:493:in `execute'
/usr/local/lib/ruby/gems/1.8/gems/activerecord-oracle_enhanced-adapter-1.3.2/lib/active_record/connection_adapters/oracle_enhanced_schema_statements.rb:84:in `create_table'
/opt/redmine-1.1.2/vendor/rails/activerecord/lib/active_record/migration.rb:352:in `send'
/opt/redmine-1.1.2/vendor/rails/activerecord/lib/active_record/migration.rb:352:in `method_missing'
/opt/redmine-1.1.2/vendor/rails/activerecord/lib/active_record/migration.rb:328:in `say_with_time'
/usr/local/lib/ruby/1.8/benchmark.rb:293:in `measure'
/opt/redmine-1.1.2/vendor/rails/activerecord/lib/active_record/migration.rb:328:in `say_with_time'
/opt/redmine-1.1.2/vendor/rails/activerecord/lib/active_record/migration.rb:348:in `method_missing'
./db/migrate//107_add_open_id_authentication_tables.rb:3:in `up_without_benchmarks'
/opt/redmine-1.1.2/vendor/rails/activerecord/lib/active_record/migration.rb:282:in `send'
/opt/redmine-1.1.2/vendor/rails/activerecord/lib/active_record/migration.rb:282:in `migrate'
/usr/local/lib/ruby/1.8/benchmark.rb:293:in `measure'
/opt/redmine-1.1.2/vendor/rails/activerecord/lib/active_record/migration.rb:282:in `migrate'
/opt/redmine-1.1.2/vendor/rails/activerecord/lib/active_record/migration.rb:365:in `__send__'
/opt/redmine-1.1.2/vendor/rails/activerecord/lib/active_record/migration.rb:365:in `migrate'
/opt/redmine-1.1.2/vendor/rails/activerecord/lib/active_record/migration.rb:486:in `migrate'
/opt/redmine-1.1.2/vendor/rails/activerecord/lib/active_record/migration.rb:562:in `call'
/opt/redmine-1.1.2/vendor/rails/activerecord/lib/active_record/migration.rb:562:in `ddl_transaction'
/opt/redmine-1.1.2/vendor/rails/activerecord/lib/active_record/migration.rb:485:in `migrate'
/opt/redmine-1.1.2/vendor/rails/activerecord/lib/active_record/migration.rb:472:in `each'
/opt/redmine-1.1.2/vendor/rails/activerecord/lib/active_record/migration.rb:472:in `migrate'
/opt/redmine-1.1.2/vendor/rails/activerecord/lib/active_record/migration.rb:400:in `up'
/opt/redmine-1.1.2/vendor/rails/activerecord/lib/active_record/migration.rb:383:in `migrate'
/opt/redmine-1.1.2/vendor/rails/railties/lib/tasks/databases.rake:116
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `call'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `execute'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `each'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `execute'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:597:in `invoke_with_call_chain'
/usr/local/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in `invoke_with_call_chain'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:583:in `invoke'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2051:in `invoke_task'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `each'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2023:in `top_level'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2001:in `run'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling'
/usr/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1998:in `run'
Replies (3)
RE: Identifier too long error: Oracle 11/Redmine
-
Added by Matthew Rupert over 13 years ago
It looks like the problem is that the max table name in Oracle 11 is 30 characters, so a table name of "open_id_authentication_associations" is too long. Any suggestions for a workaround? I won't be using OpenID but I will be using LDAP.
class AddOpenIdAuthenticationTables < ActiveRecord::Migration
def self.up
create_table :open_id_authentication_associations, :force => true do |t|
t.integer :issued, :lifetime
t.string :handle, :assoc_type
t.binary :server_url, :secret
end
create_table :open_id_authentication_nonces, :force => true do |t|
t.integer :timestamp, :null => false
t.string :server_url, :null => true
t.string :salt, :null => false
end
end
def self.down
drop_table :open_id_authentication_associations
drop_table :open_id_authentication_nonces
end
end
RE: Identifier too long error: Oracle 11/Redmine
-
Added by Matthew Rupert over 13 years ago
Does anyone happen to know if I can simply shorten the table name to something like:
reate_table :open_id_auth_nonces, :force => true do |t|
t.integer :timestamp, :null => false
t.string :server_url, :null => true
t.string :salt, :null => false
end
end
? Or will this break something else?
RE: Identifier too long error: Oracle 11/Redmine
-
Added by Matthew Rupert over 13 years ago
I posted about using Redmine with Oracle here:
http://matthewrupert.net/2011/03/11/running-redmine-with-an-oracle-backend/