Database: added table script files

master
E. Almqvist 3 years ago
parent 072e8ac534
commit 889ee1d2b6
  1. 10
      src/sql/tables/Auction.sql
  2. 7
      src/sql/tables/Image.sql

@ -0,0 +1,10 @@
CREATE TABLE IF NOT EXISTS "Auction" (
"id" INTEGER NOT NULL UNIQUE,
"user_id" INTEGER NOT NULL,
"title" TEXT NOT NULL,
"description" TEXT NOT NULL,
"init_price" INTEGER NOT NULL DEFAULT 1,
"start_time" DATE NOT NULL,
"end_time" DATE NOT NULL,
PRIMARY KEY("id" AUTOINCREMENT)
);

@ -0,0 +1,7 @@
CREATE TABLE IF NOT EXISTS "Image" (
"id" INTEGER NOT NULL UNIQUE,
"auction_id" INTEGER NOT NULL,
"image_order" INTEGER NOT NULL DEFAULT 0,
"url" TEXT NOT NULL,
PRIMARY KEY("id" AUTOINCREMENT)
);
Loading…
Cancel
Save