Files
FamilyHUB/backend/migrations/000002_create_users.up.sql
T
admin 11f4b9c921
Build and Deploy / build-and-deploy (push) Successful in 58s
fixed connection string in configs
2026-05-24 16:23:26 +03:00

13 lines
382 B
SQL

CREATE TABLE users
(
id BIGSERIAL PRIMARY KEY,
telegram_id BIGINT UNIQUE,
username TEXT,
first_name TEXT NOT NULL,
last_name TEXT,
language_code TEXT,
created_at TIMESTAMP NOT NULL DEFAULT NOW(),
updated_at TIMESTAMP NOT NULL DEFAULT NOW()
);
CREATE INDEX idx_users_telegram_id ON users (telegram_id);