mirror of
https://github.com/Kevsl/crypto-exchange-api.git
synced 2026-02-10 11:46:13 +01:00
added crypto history
This commit is contained in:
13
prisma/migrations/20240607134613_/migration.sql
Normal file
13
prisma/migrations/20240607134613_/migration.sql
Normal file
@@ -0,0 +1,13 @@
|
||||
-- CreateTable
|
||||
CREATE TABLE "CryptoHistory" (
|
||||
"id" TEXT NOT NULL,
|
||||
"id_crypto" TEXT NOT NULL,
|
||||
"value" DOUBLE PRECISION NOT NULL,
|
||||
"created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
"updated_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
|
||||
CONSTRAINT "CryptoHistory_pkey" PRIMARY KEY ("id")
|
||||
);
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE "CryptoHistory" ADD CONSTRAINT "CryptoHistory_id_crypto_fkey" FOREIGN KEY ("id_crypto") REFERENCES "Crypto"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||
Reference in New Issue
Block a user