On Thu, Feb 19, 2009 at 12:00 AM, Jeff L. email@example.com
I’m wondering if by chance you forgot to re-run your tests after mod’ing
environment.rb to use sql (which results the dumping of db/
development_structure.sql) instead of AR’s schema dumper (which
results in dumping of db/schema.rb)?
No, I did not forget. I did not even have a development_structure.sql
until I made the change in my environment.rb and re-ran my tests.
$ cat db/development_structure.sql
and see if those constraints don’t show up in db/
I removed db/development_structure.sql.
I checked my config/environment.rb file:
cat config/environment.rb |grep schema_format
config.active_record.schema_format = :sql
I rebuilt my database:
rake db:migrate VERSION=0; rake db:migrate
I reran my tests.
I checked for constraints:
cat db/development_structure.sql |grep -i constraint
If they don’t, another longshot thought is … are you running an old
version of rails, ie 1.x?
No, I am running Rails 2.2.2.
cat config/environment.rb |grep 2.2.2
RAILS_GEM_VERSION = ‘2.2.2’ unless defined? RAILS_GEM_VERSION
If still having problems, maybe post your specific config/setup and
cat db/migrate/002_create_users.rb |grep -i constraint
execute “alter table users add constraint pk_users primary key
ruby 1.8.7 (2008-08-11 patchlevel 72) [i486-linux]
gem list --local |grep oracle
gem list --local|grep rails
What else would you like to see?