first commit
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
-- CreateTable
|
||||
CREATE TABLE "Trend" (
|
||||
"id" SERIAL NOT NULL,
|
||||
"title" TEXT NOT NULL,
|
||||
"description" TEXT,
|
||||
"url" TEXT,
|
||||
"score" INTEGER NOT NULL DEFAULT 0,
|
||||
"source" TEXT NOT NULL,
|
||||
"category" TEXT,
|
||||
"tags" JSONB,
|
||||
"engagement" JSONB,
|
||||
"raw" JSONB,
|
||||
"fingerprint" VARCHAR,
|
||||
"sourceTimestamp" TIMESTAMP(3),
|
||||
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
"updatedAt" TIMESTAMP(3) NOT NULL,
|
||||
|
||||
CONSTRAINT "Trend_pkey" PRIMARY KEY ("id")
|
||||
);
|
||||
|
||||
-- CreateIndex
|
||||
CREATE INDEX "Trend_score_idx" ON "Trend"("score");
|
||||
|
||||
-- CreateIndex
|
||||
CREATE INDEX "Trend_category_idx" ON "Trend"("category");
|
||||
|
||||
-- CreateIndex
|
||||
CREATE INDEX "Trend_sourceTimestamp_idx" ON "Trend"("sourceTimestamp");
|
||||
Reference in New Issue
Block a user