diff options
| author | erdgeist <erdgeist@erdgeist.org> | 2026-08-09 22:14:29 +0200 |
|---|---|---|
| committer | erdgeist <erdgeist@erdgeist.org> | 2026-08-09 22:14:29 +0200 |
| commit | 8135e08107f81c38389ec3938df85a9b9f0e1f4f (patch) | |
| tree | 999bbe25775da5feff5d02151132607973a82c1a /lib/tasks/test_db.rake | |
| parent | 4bae8227d9dd7cb61ceb6bfaad04bf0fc0f720ca (diff) | |
Load the test schema through Rails, and keep the search trigger installed
Diffstat (limited to 'lib/tasks/test_db.rake')
| -rw-r--r-- | lib/tasks/test_db.rake | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/lib/tasks/test_db.rake b/lib/tasks/test_db.rake deleted file mode 100644 index 0a7a17d7..00000000 --- a/lib/tasks/test_db.rake +++ /dev/null | |||
| @@ -1,19 +0,0 @@ | |||
| 1 | namespace :db do | ||
| 2 | namespace :test do | ||
| 3 | task :load_schema do | ||
| 4 | ActiveRecord::Base.establish_connection(:test) | ||
| 5 | ActiveRecord::Schema.verbose = false | ||
| 6 | load "#{Rails.root}/db/schema.rb" | ||
| 7 | end | ||
| 8 | |||
| 9 | task :prepare => :environment do | ||
| 10 | begin | ||
| 11 | ActiveRecord::Base.establish_connection(:test) | ||
| 12 | ActiveRecord::Base.connection | ||
| 13 | rescue | ||
| 14 | system("psql -U postgres postgres -c \"CREATE DATABASE psql_test OWNER psql ENCODING 'UTF8';\"") | ||
| 15 | end | ||
| 16 | Rake::Task['db:test:load_schema'].invoke | ||
| 17 | end | ||
| 18 | end | ||
| 19 | end | ||
