Chris
a67d1eb05b
All checks were successful
Build and push / Pulling repo on server (push) Successful in 5s
40 lines
756 B
SQL
40 lines
756 B
SQL
BEGIN TRANSACTION;
|
|
CREATE TABLE IF NOT EXISTS "events" (
|
|
"ID" INTEGER UNIQUE,
|
|
"name" TEXT,
|
|
"date" TEXT,
|
|
"organizer" TEXT,
|
|
PRIMARY KEY("ID")
|
|
);
|
|
CREATE TABLE IF NOT EXISTS "runs" (
|
|
"id" INTEGER UNIQUE,
|
|
"event" INTEGER,
|
|
"name" TEXT,
|
|
"lk" TEXT,
|
|
"gk" TEXT,
|
|
FOREIGN KEY("event") REFERENCES "events"("ID"),
|
|
PRIMARY KEY("id")
|
|
);
|
|
CREATE TABLE IF NOT EXISTS "results" (
|
|
"id" INTEGER,
|
|
"event" INTEGER,
|
|
"run" INTEGER,
|
|
"rang" INTEGER,
|
|
"stnr" INTEGER,
|
|
"teilnehmer" TEXT,
|
|
"hund" TEXT,
|
|
"verein" TEXT,
|
|
"f" INTEGER,
|
|
"vw" INTEGER,
|
|
"zf" INTEGER,
|
|
"zeit" REAL,
|
|
"gf" REAL,
|
|
"msek" REAL,
|
|
"bew" TEXT,
|
|
"punkte" TEXT,
|
|
PRIMARY KEY("id" AUTOINCREMENT),
|
|
FOREIGN KEY("run") REFERENCES "runs"("id"),
|
|
FOREIGN KEY("event") REFERENCES "events"("ID")
|
|
);
|
|
COMMIT;
|