update sql schema

This commit is contained in:
pasha1coil 2025-06-10 12:38:48 +03:00
parent fb272e7a17
commit 2ca2a6d56f
5 changed files with 9 additions and 0 deletions

@ -1463,3 +1463,6 @@ INSERT INTO bitrixContact (AccountID, BitrixID, Field) VALUES ($1, $2, $3) RETUR
-- name: UpdateBitrixContact :exec
UPDATE bitrixContact SET Field = $1,BitrixID=$3 WHERE ID = $2;
-- name: UpdateGigaChatQuizFlag :exec
UPDATE quiz SET gigachat = true where id = $1 AND accountid = $2 AND deleted = false;

@ -0,0 +1 @@
ALTER TABLE quiz DROP COLUMN IF EXISTS gigachat;

@ -0,0 +1 @@
ALTER TABLE quiz ADD COLUMN gigachat boolean NOT NULL DEFAULT false;

@ -68,6 +68,8 @@ type Quiz struct {
Super bool `json:"super"`
GroupId uint64 `json:"group_id"`
GigaChat bool `json:"giga_chat"`
}
type QuizConfig struct {

@ -48,6 +48,8 @@ packages:
- "./dal/schema/000022_init.down.sql"
- "./dal/schema/000023_init.up.sql"
- "./dal/schema/000023_init.down.sql"
- "./dal/schema/000024_init.up.sql"
- "./dal/schema/000024_init.down.sql"
engine: "postgresql"
emit_json_tags: true
emit_db_tags: true