Skip to content

Commit

Permalink
move primary key first in groups table
Browse files Browse the repository at this point in the history
  • Loading branch information
ecioppettini committed May 23, 2022
1 parent b58395d commit 012060c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Expand Up @@ -126,9 +126,10 @@ create table goals
);

create table groups (
group_id VARCHAR NOT NULL,
/* TODO: make this unique? */
token_identifier VARCHAR NOT NULL,
PRIMARY KEY(group_id, token_identifier)
group_id VARCHAR NOT NULL,
PRIMARY KEY(token_identifier)
);

CREATE VIEW full_proposals_info
Expand Down
4 changes: 2 additions & 2 deletions vit-servicing-station-lib/src/db/schema.rs
Expand Up @@ -70,9 +70,9 @@ table! {
}

table! {
groups (group_id, token_identifier) {
group_id -> Text,
groups (token_identifier) {
token_identifier -> Text,
group_id -> Text,
}
}

Expand Down

0 comments on commit 012060c

Please sign in to comment.