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

payment.payment_id missing PRIMARY KEY constraint #23

Closed
dwhitemv25 opened this issue Sep 6, 2022 · 1 comment
Closed

payment.payment_id missing PRIMARY KEY constraint #23

dwhitemv25 opened this issue Sep 6, 2022 · 1 comment

Comments

@dwhitemv25
Copy link

dwhitemv25 commented Sep 6, 2022

In the original Sakila schema, the payment_id column in the payment table has a PRIMARY KEY constraint. Pagila does not.
I found this by accident when I restored a backup of pagila over itself and duplicated all the rows in the partitioned tables.

Because payment_date is the partition key, it would have to be defined as

ALTER TABLE payment ADD PRIMARY KEY (payment_date, payment_id)
devrimgunduz added a commit that referenced this issue Dec 13, 2022
@devrimgunduz
Copy link
Owner

Hi,

Thanks for the report. Committed a fix. It will appear in next release.

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