1
0
mirror of https://github.com/mbirth/tcl_update_db.git synced 2024-12-26 04:24: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 -- Needs SQLite 3.7 or newer
INSERT INTO "models" VALUES INSERT INTO "models" ("familyId", "name") VALUES
(0, "BBB100-1"), (1, "BBB100-1"),
(0, "BBB100-2"), (1, "BBB100-2"),
(1, "BBD100-1") (2, "BBD100-1")
; ;
CREATE TABLE "devices" ( CREATE TABLE "devices" (
@ -33,9 +33,9 @@ CREATE TABLE "devices" (
); );
-- Needs SQLite 3.7 or newer -- Needs SQLite 3.7 or newer
INSERT INTO "devices" VALUES INSERT INTO "devices" ("ref", "modelId", "name") VALUES
("PRD-63117-011", 1, "Unlocked EMEA"), ("PRD-63117-011", 2, "Unlocked EMEA"),
("PRD-63116-001", 0, "Unlocked USA") ("PRD-63116-001", 1, "Unlocked USA")
; ;
-- we only care about the first file for now -- we only care about the first file for now
@ -53,7 +53,7 @@ CREATE TABLE "updates" (
"file_size" INTEGER, -- size of first file "file_size" INTEGER, -- size of first file
"file_sha1" TEXT, -- SHA1 checksum of first file "file_sha1" TEXT, -- SHA1 checksum of first file
"type" TEXT, -- FULL or OTA "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 -- Maps update files to devices