-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add
prices_paid_summary
table (#228)
- Loading branch information
1 parent
e5819c8
commit 92b1bdb
Showing
2 changed files
with
31 additions
and
0 deletions.
There are no files selected for viewing
17 changes: 17 additions & 0 deletions
17
prisma/migrations/20250107110255_add_prices_paid_summary_table/migration.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
-- CreateTable | ||
CREATE TABLE "prices_paid_summary" ( | ||
"id" SERIAL NOT NULL, | ||
"postcode" TEXT NOT NULL, | ||
"property_type" VARCHAR(250) NOT NULL, | ||
"granularity_level" VARCHAR(250) NOT NULL, | ||
"average_price" DOUBLE PRECISION NOT NULL, | ||
"transaction_count" INTEGER NOT NULL, | ||
|
||
CONSTRAINT "prices_paid_summary_pkey" PRIMARY KEY ("id") | ||
); | ||
|
||
-- CreateIndex | ||
CREATE INDEX "prices_paid_summary_postcode_property_type_idx" ON "prices_paid_summary"("postcode", "property_type"); | ||
|
||
-- CreateIndex | ||
CREATE UNIQUE INDEX "prices_paid_summary_postcode_property_type_granularity_leve_key" ON "prices_paid_summary"("postcode", "property_type", "granularity_level"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters