From 9f3183e5eab4b283874028668e76c4b9b3fb8cc8 Mon Sep 17 00:00:00 2001 From: Benjamin Kane Date: Sat, 22 Jan 2022 13:10:51 -0800 Subject: [PATCH] add unique constraint to Repo --- sqlite_migrations/2022-01-19-21.08.47_init.sql | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sqlite_migrations/2022-01-19-21.08.47_init.sql b/sqlite_migrations/2022-01-19-21.08.47_init.sql index 32bfa8c..2d0e16e 100644 --- a/sqlite_migrations/2022-01-19-21.08.47_init.sql +++ b/sqlite_migrations/2022-01-19-21.08.47_init.sql @@ -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 ( @@ -124,4 +125,4 @@ CREATE TRIGGER Repo_au AFTER UPDATE ON Repo BEGIN new.Readme, new.NameWithOwner ); -END; \ No newline at end of file +END;