-
Notifications
You must be signed in to change notification settings - Fork 20
Postgres notes
Robin edited this page Sep 6, 2023
·
4 revisions
docker compose exec postgres psql -U postgres
CREATE TABLE connections (
id SERIAL PRIMARY KEY,
guild_id BIGINT UNIQUE NOT NULL,
api_url TEXT NOT NULL,
api_key TEXT NOT NULL,
last_use BIGINT NOT NULL,
username_sync BOOLEAN NULL DEFAULT false,
UNIQUE(api_url, api_key)
);
postgres=# REINDEX INDEX connections_api_url_key;
REINDEX
postgres=# REINDEX INDEX connections_guild_id_key;
REINDEX
postgres=# REINDEX INDEX connections_pkey;
REINDEX