mirror of https://github.com/ghostfolio/ghostfolio
1 changed files with 15 additions and 0 deletions
@ -0,0 +1,15 @@ |
|||
-- CreateTable |
|||
CREATE TABLE "AccountBalance" ( |
|||
"accountId" TEXT NOT NULL, |
|||
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, |
|||
"date" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, |
|||
"id" TEXT NOT NULL, |
|||
"updatedAt" TIMESTAMP(3) NOT NULL, |
|||
"userId" TEXT NOT NULL, |
|||
"value" DOUBLE PRECISION NOT NULL, |
|||
|
|||
CONSTRAINT "AccountBalance_pkey" PRIMARY KEY ("id") |
|||
); |
|||
|
|||
-- AddForeignKey |
|||
ALTER TABLE "AccountBalance" ADD CONSTRAINT "AccountBalance_accountId_userId_fkey" FOREIGN KEY ("accountId", "userId") REFERENCES "Account"("id", "userId") ON DELETE CASCADE ON UPDATE CASCADE; |
Loading…
Reference in new issue