Created
August 1, 2021 11:18
-
-
Save lenalytics/d69157a31e889c08518ff0d391bd781c to your computer and use it in GitHub Desktop.
Airbnb Calendar Table
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
BEGIN; | |
CREATE TABLE "airdata"."calendar" | |
( | |
"listing_id" BIGINT NOT NULL, | |
"date" timestamptz, | |
"available" BOOLEAN, | |
"price" DECIMAL, | |
"adjusted_price" DECIMAL, | |
"minimum_nights" INTEGER, | |
"maximum_nights" INTEGER, | |
CONSTRAINT "PK_calendar_01" PRIMARY KEY ("listing_id", "date") | |
); | |
CREATE INDEX "IDX_calendar_listing_id" ON "airdata"."calendar" ("listing_id"); | |
CREATE INDEX "IDX_calendar_date" ON "airdata"."calendar" ("date"); | |
CREATE INDEX "IDX_calendar_price" ON "airdata"."calendar" ("price"); | |
COMMIT; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment