On Thu, Feb 19, 2009 at 12:00 AM, Jeff L. [email protected]
wrote:
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/
development_structure.sql then.
I removed db/development_structure.sql.
rm 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.
rake
I checked for constraints:
cat db/development_structure.sql |grep -i constraint
Nothing.
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
code?
Sure.
cat db/migrate/002_create_users.rb |grep -i constraint
execute “alter table users add constraint pk_users primary key
(user_id)”
ruby -v
ruby 1.8.7 (2008-08-11 patchlevel 72) [i486-linux]
gem list --local |grep oracle
activerecord-oracle_enhanced-adapter (1.1.9)
gem list --local|grep rails
rails (2.2.2)
What else would you like to see?
–
Greg D.
http://destiney.com/