tg-bot-golang

Форк
0
Форк от ella/tg-bot-golang
/
20221011174232_init_user_table.sql 
25 строк · 727.0 Байт
1
-- +goose Up
2
-- +goose StatementBegin
3
create table if not exists users
4
(
5
    id       integer generated by default as identity primary key,
6
    tg_id    integer not null,
7
    name     text    not null
8
        constraint users_name_check
9
            check (name <> ''::text),
10
    currency text    not null,
11
    limits   integer not null
12
);
13

14
comment on table users is 'Пользователи ТГ';
15

16
-- Индекс по ТГ-идентификатору пользователя для ускорения поиска.
17
create unique index if not exists users_tg_id
18
    on users (tg_id);
19
-- +goose StatementEnd
20

21
-- +goose Down
22
-- +goose StatementBegin
23
drop index users_tg_id;
24
DROP TABLE IF EXISTS "user";
25
-- +goose StatementEnd

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.