Skip to content

Instantly share code, notes, and snippets.

@lenalytics
Created August 1, 2021 11:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lenalytics/8d256f2ca19a0880c8d417c4edbc5c8d to your computer and use it in GitHub Desktop.
Save lenalytics/8d256f2ca19a0880c8d417c4edbc5c8d to your computer and use it in GitHub Desktop.
Airbnb Review Table
BEGIN;
CREATE TABLE "airdata"."review"
(
"listing_id" BIGINT NOT NULL,
"id" BIGINT NOT NULL,
"date" timestamptz,
"reviewer_id" BIGINT,
"reviewer_name" TEXT,
"comments" TEXT,
CONSTRAINT "PK_review_01" PRIMARY KEY ("id")
);
CREATE INDEX "IDX_review_listing_id" ON "airdata"."review" ("listing_id");
CREATE INDEX "IDX_review_reviewer_id" ON "airdata"."review" ("reviewer_id");
COMMIT;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment