Skip to content

Instantly share code, notes, and snippets.

@aaabramov
Created June 24, 2022 09:40
Show Gist options
  • Save aaabramov/cede225b50b98adb548cd04130f31317 to your computer and use it in GitHub Desktop.
Save aaabramov/cede225b50b98adb548cd04130f31317 to your computer and use it in GitHub Desktop.
# See https://telegra.ph/Gratus-Bot-06-24
CREATE TABLE "data_entity"
(
"id" BIGSERIAL NOT NULL PRIMARY KEY,
"userId" BIGINT NOT NULL,
"chatId" BIGINT NOT NULL,
"createdAt" TIMESTAMPTZ NOT NULL DEFAULT NOW()
);
CREATE INDEX idx_data_entity_userId_chatId ON "data_entity" ("userId", "chatId");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment