diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2023-04-11 10:57:27 +0200 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2023-04-11 10:57:27 +0200 |
commit | f1dcea6e450ce7fb0d26aa0470118815bf76c527 (patch) | |
tree | 150941a7d25cee9c9ea84e5e6cfb4866aec25f4a /src/sqlite | |
parent | .editorconfig: minor adjustments (diff) | |
download | cimple-f1dcea6e450ce7fb0d26aa0470118815bf76c527.tar.gz cimple-f1dcea6e450ce7fb0d26aa0470118815bf76c527.zip |
sqlite: create indices
Diffstat (limited to 'src/sqlite')
-rw-r--r-- | src/sqlite/v01.sql | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/sqlite/v01.sql b/src/sqlite/v01.sql index 26869b6..88bbc61 100644 --- a/src/sqlite/v01.sql +++ b/src/sqlite/v01.sql @@ -1,8 +1,10 @@ CREATE TABLE cimple_repositories ( id INTEGER PRIMARY KEY, - url TEXT NOT NULL UNIQUE + url TEXT NOT NULL ) STRICT; +CREATE UNIQUE INDEX cimple_repositories_url_index ON cimple_repositories(url); + CREATE TABLE cimple_runs ( id INTEGER PRIMARY KEY, result INTEGER NOT NULL, @@ -11,3 +13,5 @@ CREATE TABLE cimple_runs ( FOREIGN KEY (repo_id) REFERENCES cimple_repositories(id) ON DELETE CASCADE ON UPDATE CASCADE ) STRICT; + +CREATE INDEX cimple_runs_repo_id_index ON cimple_runs(repo_id); |