Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upCan't use CLI to migrate and create composite primary key table #1779
Comments
This comment has been minimized.
nocduro
commented
Jul 24, 2018
|
I had this problem as well, here's how to reproduce:
create table vehicle_movements (
vehicle_id varchar not null,
stop_id varchar not null,
arrived_at int,
departed_at int
)
create table vehicle_movements (
vehicle_id varchar not null,
stop_id varchar not null,
arrived_at int,
departed_at int,
primary key (vehicle_id, stop_id)
)
I fixed it by running |
This comment has been minimized.
|
The above comment is likely correct. It sounds like you edited a migration without re-running it, or your schema for some other reason does not match what you expect it to be. |
sgrif
closed this
Jul 25, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
losvedir commentedJul 7, 2018
•
edited
Setup
This is my
up.sql:This is what happens when I try to migrate:
But I do have a primary key - a composite one, specified at the end of the
create table. I see from #450 that supposedly there is support for composite primary keys, so I don't know if I'm doing something wrong or not.Versions
Feature Flags
--without-default-features --feature postgresChecklist
closed if this is not the case)