Database: Category, Category relation & Bid tables

master
E. Almqvist 3 years ago
parent 889ee1d2b6
commit 2e3c992e23
  1. 4
      src/sql/tables/Auction_Category_relation.sql
  2. 8
      src/sql/tables/Bid.sql
  3. 6
      src/sql/tables/Category.sql

@ -0,0 +1,4 @@
CREATE TABLE IF NOT EXISTS "Auction_Category_relation" (
"auction_id" INTEGER NOT NULL,
"category_id" INTEGER NOT NULL,
);

@ -0,0 +1,8 @@
CREATE TABLE IF NOT EXISTS "Bid" (
"id" INTEGER NOT NULL UNIQUE,
"amount" INTEGER NOT NULL,
"auction_id" INTEGER NOT NULL,
"user_id" INTEGER NOT NULL,
"message" TEXT NOT NULL DEFAULT '',
PRIMARY KEY("id" AUTOINCREMENT)
);

@ -0,0 +1,6 @@
CREATE TABLE IF NOT EXISTS "Category" (
"id" INTEGER NOT NULL UNIQUE,
"name" TEXT NOT NULL UNIQUE,
"color" TEXT NOT NULL DEFAULT '#ffffff',
PRIMARY KEY("id" AUTOINCREMENT)
);
Loading…
Cancel
Save