initial commit
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
-- CreateEnum
|
||||
CREATE TYPE "QuoteType" AS ENUM ('BLUE', 'BNA', 'BELO');
|
||||
|
||||
-- CreateTable
|
||||
CREATE TABLE "quotes" (
|
||||
"id" SERIAL NOT NULL,
|
||||
"timeStamp" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
"buy" MONEY NOT NULL,
|
||||
"sell" MONEY NOT NULL,
|
||||
"type" "QuoteType" NOT NULL,
|
||||
"difference" DECIMAL(9,2) NOT NULL DEFAULT 0,
|
||||
"percentage" DECIMAL(9,2) NOT NULL DEFAULT 0,
|
||||
"previousDayDifference" DECIMAL(9,2) NOT NULL DEFAULT 0,
|
||||
"previousDayPercentage" DECIMAL(9,2) NOT NULL DEFAULT 0,
|
||||
|
||||
CONSTRAINT "quotes_pkey" PRIMARY KEY ("id")
|
||||
);
|
||||
|
||||
-- CreateTable
|
||||
CREATE TABLE "quotes_history" (
|
||||
"id" SERIAL NOT NULL,
|
||||
"timeStamp" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
"buy" MONEY NOT NULL,
|
||||
"sell" MONEY NOT NULL,
|
||||
"type" "QuoteType" NOT NULL,
|
||||
|
||||
CONSTRAINT "quotes_history_pkey" PRIMARY KEY ("id")
|
||||
);
|
||||
Reference in New Issue
Block a user