diff options
| author | Robert | 2017-06-05 17:23:12 +0200 |
|---|---|---|
| committer | Robert | 2017-06-05 17:23:12 +0200 |
| commit | c59f237817100f73baec56e04bfaf172d7d59fc1 (patch) | |
| tree | 4a8a4fd0a2a29c055a053c3fee9108ef779da90f /app/workers | |
| parent | 732f0b13bb240021c5292d483a432a7ec0f9612d (diff) | |
| download | chouette-core-c59f237817100f73baec56e04bfaf172d7d59fc1.tar.bz2 | |
Refs: #3604; Bad schema renaming and removal fixed
Diffstat (limited to 'app/workers')
| -rw-r--r-- | app/workers/referential_cloning_worker.rb | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/app/workers/referential_cloning_worker.rb b/app/workers/referential_cloning_worker.rb index c56e11a64..c74566966 100644 --- a/app/workers/referential_cloning_worker.rb +++ b/app/workers/referential_cloning_worker.rb @@ -6,7 +6,7 @@ class ReferentialCloningWorker ref_cloning = ReferentialCloning.find id source_schema = ref_cloning.source_referential.slug - target_schema = "#{source_schema}_tmp" + target_schema = ref_cloning.target_referential.slug clone_schema ref_cloning, source_schema, target_schema end @@ -16,11 +16,7 @@ class ReferentialCloningWorker def clone_schema ref_cloning, source_schema, target_schema ref_cloning.run! - require 'pry' - binding.pry StoredProcedures.invoke_stored_procedure(:clone_schema, source_schema, target_schema, true) - execute_sql "DROP SCHEMA #{source_schema} CASCADE;" - execute_sql "ALTER SCHEMA #{target_schema} RENAME TO #{source_schema};" ref_cloning.successful! rescue Exception => e |
