Content
Issues with schema rename from cloud to local running in Docker
Added by James Spedding 14 days ago
I wonder if anyone could help me with the final step to restoring a backup?
I created a project in the online trial of OpenProject and have since installed OpenProject locally in a Docker container on a PC running Windows 11 to carry on exploring.
I created a backup and downloaded the openproject.sql file. I copied it into OpenProject so now it shows:
openproject-# \dn
List of schemas
Name | Owner
---------------------------------------------------------+----------
1738252715_4574683_4ce20049_316d_4cdd_a992_861268eefb2c | postgres
public | postgres
(2 rows)
the advice from https://www.openproject.org/docs/installation-and-operations/operation/restoring/#changing-the-database-schema-from-cloud-to-on-premises suggests:
openproject=# DROP SCHEMA public CASCADE; DROP SCHEMA
but when I run it I get:
openproject-# DROP SCHEMA public CASCADE; DROP SCHEMA
ERROR: syntax error at or near "DROP"
LINE 3: DROP SCHEMA public CASCADE DROP SCHEMA
^
I'm not sure why - I noticed that the 'openproject=#' in the example is not the same as 'openproject-#' that I have. I'm also not sure why that is.
I wonder if you could give me any pointers? Any help gratefully received. Thanks, James