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

.sql migrations only allow a single statement #21

Closed
starsheriff opened this issue Dec 18, 2019 · 2 comments
Closed

.sql migrations only allow a single statement #21

starsheriff opened this issue Dec 18, 2019 · 2 comments

Comments

@starsheriff
Copy link

Nice project, I tried to use it with one of my projects but stumbled across a limitation in the refinery_cli. It only allows a single statement in any .sql file. In my case I want to create multiple tables but it fails with the error

Error: error applying migration V2__demo, database error: ERROR: cannot insert multiple commands into a prepared statement

.sql file:

create table roles (
    role varchar(32) PRIMARY Key,
);

create table powers (
    role_id SERIAL PRIMARY KEY,
);
@jxs
Copy link
Member

jxs commented Dec 18, 2019

Hi
I've submitted #22 which fixes it.
I was planning on adding a new alpha version supporting tokio-postgres and mysql_async which also adds the trait updates on #20 tomorrow or so, would you mind installing from git till then?
thanks

@jxs jxs closed this as completed in 57bab05 Dec 18, 2019
jxs added a commit that referenced this issue Dec 18, 2019
allow multiple staements in sql files and mods, closes #21
@starsheriff
Copy link
Author

cool, thanks for the quick response. Installing from source is fine 👍

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

2 participants