10 lines
283 B
SQL
10 lines
283 B
SQL
CREATE TABLE IF NOT EXISTS repo_star (
|
|
id BIGSERIAL PRIMARY KEY,
|
|
repo_uuid UUID NOT NULL,
|
|
user_uuid UUID NOT NULL,
|
|
created_at TIMESTAMPTZ NOT NULL,
|
|
UNIQUE (repo_uuid, user_uuid)
|
|
);
|
|
|
|
CREATE UNIQUE INDEX idx_repo_star_repo_user ON repo_star (repo_uuid, user_uuid);
|