8000 Add support for composite keys in `create table` statements by kvch · Pull Request #413 · xataio/pgroll · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Add support for composite keys in create table statements #413

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

Merged
merged 10 commits into from
Oct 18, 2024

Conversation

kvch
Copy link
Contributor
@kvch kvch commented Oct 17, 2024

This PR adds support for setting a composite key for a table.
From now on it is possible to set pk to true in multiple columns in create_table.

The create table statement is translated to the following format:

CREATE TABLE my_table (
    id SERIAL,
    code VARCHAR(255),
    count INTEGER,
    PRIMARY KEY (id, code)
);

@kvch kvch mentioned this pull request Oct 17, 2024
@kvch kvch changed the title Add support for composite keys Add support for composite keys in create table statements Oct 17, 2024
@kvch kvch marked this pull request as ready for review October 17, 2024 15:36
@kvch kvch requested a review from andrew-farries October 17, 2024 15:36
@kvch kvch enabled auto-merge (squash) October 17, 2024 15:39
@kvch kvch requested a review from andrew-farries October 18, 2024 13:28
@kvch kvch merged commit 12ae369 into xataio:main Oct 18, 2024
26 checks passed
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

Successfully merging this pull request may close these issues.

2 participants
0