This repository has been archived on 2023-12-29. You can view files and clone it, but cannot push or open issues or pull requests.
dogstats/crawler/base.sql
Chris a67d1eb05b
All checks were successful
Build and push / Pulling repo on server (push) Successful in 5s
graph it
2023-11-26 14:00:23 +01:00

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;