1
0
mirror of https://github.com/mbirth/tcl_update_db.git synced 2024-12-25 12:04:07 +00:00

Fix db schema.

This commit is contained in:
Markus Birth 2017-11-02 00:05:39 +01:00
parent 37a0433796
commit d09dc1507a
Signed by: mbirth
GPG Key ID: A9928D7A098C3A9A
2 changed files with 9 additions and 8 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
/otadb.db3

View File

@ -19,10 +19,10 @@ CREATE TABLE "models" (
);
-- Needs SQLite 3.7 or newer
INSERT INTO "models" VALUES
(0, "BBB100-1"),
(0, "BBB100-2"),
(1, "BBD100-1")
INSERT INTO "models" ("familyId", "name") VALUES
(1, "BBB100-1"),
(1, "BBB100-2"),
(2, "BBD100-1")
;
CREATE TABLE "devices" (
@ -33,9 +33,9 @@ CREATE TABLE "devices" (
);
-- Needs SQLite 3.7 or newer
INSERT INTO "devices" VALUES
("PRD-63117-011", 1, "Unlocked EMEA"),
("PRD-63116-001", 0, "Unlocked USA")
INSERT INTO "devices" ("ref", "modelId", "name") VALUES
("PRD-63117-011", 2, "Unlocked EMEA"),
("PRD-63116-001", 1, "Unlocked USA")
;
-- we only care about the first file for now
@ -53,7 +53,7 @@ CREATE TABLE "updates" (
"file_size" INTEGER, -- size of first file
"file_sha1" TEXT, -- SHA1 checksum of first file
"type" TEXT, -- FULL or OTA
"note" TEXT, -- some note for this file (optional)
"note" TEXT -- some note for this file (optional)
);
-- Maps update files to devices