I''m using:
ActiveRecord::Base.primary_key_prefix_type = :table_name_with_underscore
per a design spec that I cannot change.
I wanted to create a countries table, here is my migration:
class CreateCountries < ActiveRecord::Migration
def self.up
create_table :countries, :primary_key => :country_id, :force => true
do |t|
t.string :country_name, :null => false, :limit => 48
end
add_index :countries, :country_name, :unique => true, :name =>
''countries_country_name''
end
def self.down
drop_table :countries
end
end
When I run my countries migration I get:
> rake db:migrate
(in /rails/foo)
== CreateCountries: migrating ===============================================--
add_column("countries", :country_id, :primary_key,
{:precision=>nil, :scale=>nil, :limit=>nil, :null=>nil,
:default=>nil})
rake aborted!
An error has occurred, all later migrations canceled:
OCIError: ORA-30649: missing DIRECTORY keyword: ALTER TABLE countries
ADD country_id NUMBER(38) NOT NULL PRIMARY KEY DEFAULT NULL
(See full trace by running task with --trace)
Any ideas?
Thanks,
--
Greg Donald
http://destiney.com/
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---