matekasse/Website/schema.sql

21 lines
486 B
MySQL
Raw Normal View History

2023-07-28 21:30:45 +00:00
BEGIN TRANSACTION;
CREATE TABLE IF NOT EXISTS "users" (
"id" INTEGER NOT NULL,
"username" TEXT NOT NULL,
"balance" INTEGER NOT NULL,
PRIMARY KEY("id")
);
CREATE TABLE IF NOT EXISTS "tags" (
2023-11-25 15:59:51 +00:00
"tagid" INEGER NOT NULL,
2023-07-28 21:30:45 +00:00
"userid" INTEGER,
FOREIGN KEY("userid") REFERENCES "users"("id"),
PRIMARY KEY("tagid")
);
2023-11-24 23:05:33 +00:00
CREATE TABLE IF NOT EXISTS "transaction_log" (
"timestamp" INTEGER NOT NULL,
"userid" INTEGER NOT NULL,
"type" TEXT NOT NULL,
"before" TEXT,
"after" TEXT
);
2023-07-28 21:30:45 +00:00
COMMIT;