15 lines
314 B
MySQL
15 lines
314 B
MySQL
|
-- +goose Up
|
||
|
-- +goose StatementBegin
|
||
|
CREATE TABLE users (
|
||
|
id SERIAL PRIMARY KEY,
|
||
|
chat_id TEXT NOT NULL,
|
||
|
user_id TEXT NOT NULL,
|
||
|
CONSTRAINT unique__chat_id__user_id UNIQUE (chat_id, user_id)
|
||
|
);
|
||
|
-- +goose StatementEnd
|
||
|
|
||
|
-- +goose Down
|
||
|
-- +goose StatementBegin
|
||
|
DROP TABLE users;
|
||
|
-- +goose StatementEnd
|