Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrations table with postgres schema #80

Open
donbonifacio opened this issue Aug 13, 2015 · 4 comments
Open

Migrations table with postgres schema #80

donbonifacio opened this issue Aug 13, 2015 · 4 comments

Comments

@donbonifacio
Copy link

Hello,

I tried to change the migrations table to one using a postgres schema:

{:datastore  (jdbc/sql-database (System/getenv "CONN")
                   {:migrations-table "directory.ragtime_migrations"})
 :migrations (jdbc/load-directory "migrations")})

And I get:

Exception in thread "main" org.postgresql.util.PSQLException: ERROR: relation "directory.ragtime_migrations" does not exist

If I change, for example to directory_ragtime_migrations, everything works as expected.

@metametadata
Copy link
Contributor

Has there been any solution found? I guess I've just stumbled upon the similar issue using Joplin. But the error message (for :migrations-table "myschema.migrations") looks like this:

PSQLException ERROR: relation "migrations" already exists  org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse (QueryExecutorImpl.java:2455)

@weavejester
Copy link
Owner

PRs to fix this are welcome. I haven't had the chance to investigate this myself.

@campeterson
Copy link

I'm also seeing the issue. Appears to happen (at least for me) when specifying a schema (other than defaulting to 'public').

@mrcnc
Copy link

mrcnc commented Mar 2, 2017

I had a similar issue that was caused b/c ragtime was trying to create the table in a schema that did not yet exist. I fixed it by first creating the schema I wanted the migrations table to be in, then ragtime was able to create the migrations table in my schema.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants