diff options
author | Frederick Cheung <frederick.cheung@gmail.com> | 2008-04-30 21:54:54 +1200 |
---|---|---|
committer | Michael Koziarski <michael@koziarski.com> | 2008-04-30 21:54:54 +1200 |
commit | a6cca5d1fc94bc62a1b5c4a3facafb7044021cd2 (patch) | |
tree | f140a3edbf7fc164d1d60cce35c4305fbf796556 | |
parent | 874603ce8d7b9077650ef3632a161597424486d9 (diff) | |
download | rails-a6cca5d1fc94bc62a1b5c4a3facafb7044021cd2.tar.gz rails-a6cca5d1fc94bc62a1b5c4a3facafb7044021cd2.tar.bz2 rails-a6cca5d1fc94bc62a1b5c4a3facafb7044021cd2.zip |
Ensure postgresql tests work when starting from scratch.
-rwxr-xr-x | activerecord/Rakefile | 2 | ||||
-rw-r--r-- | activerecord/test/schema/postgresql_specific_schema.rb | 2 |
2 files changed, 1 insertions, 3 deletions
diff --git a/activerecord/Rakefile b/activerecord/Rakefile index 50c120107b..d6033a9b85 100755 --- a/activerecord/Rakefile +++ b/activerecord/Rakefile @@ -72,8 +72,6 @@ namespace :postgresql do task :build_databases do %x( createdb activerecord_unittest ) %x( createdb activerecord_unittest2 ) - %x( psql activerecord_unittest -f #{File.join(SCHEMA_ROOT, 'postgresql.sql')} ) - %x( psql activerecord_unittest2 -f #{File.join(SCHEMA_ROOT, 'postgresql2.sql')} ) end desc 'Drop the PostgreSQL test databases' diff --git a/activerecord/test/schema/postgresql_specific_schema.rb b/activerecord/test/schema/postgresql_specific_schema.rb index 35e9ecf64d..576a4d03c6 100644 --- a/activerecord/test/schema/postgresql_specific_schema.rb +++ b/activerecord/test/schema/postgresql_specific_schema.rb @@ -2,7 +2,7 @@ ActiveRecord::Schema.define do %w(postgresql_arrays postgresql_moneys postgresql_numbers postgresql_times postgresql_network_addresses postgresql_bit_strings postgresql_oids defaults geometrics).each do |table_name| - drop_table table_name + execute "DROP TABLE IF EXISTS #{quote_table_name table_name}" end execute 'DROP SEQUENCE IF EXISTS companies_nonstd_seq CASCADE' |