Skip to content

Commit

Permalink
add unique constraint to Repo
Browse files Browse the repository at this point in the history
  • Loading branch information
bbkane committed Jan 22, 2022
1 parent 0a7697b commit 9f3183e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions sqlite_migrations/2022-01-19-21.08.47_init.sql
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ CREATE TABLE Repo (
PushedAt TEXT NOT NULL,
StargazerCount INTEGER NOT NULL,
UpdatedAt TEXT NOT NULL,
Url TEXT
Url TEXT,
UNIQUE(NameWithOwner)
) STRICT;

CREATE TABLE Language (
Expand Down Expand Up @@ -124,4 +125,4 @@ CREATE TRIGGER Repo_au AFTER UPDATE ON Repo BEGIN
new.Readme,
new.NameWithOwner
);
END;
END;

0 comments on commit 9f3183e

Please sign in to comment.