From f88ba223de525de651ecbde11cce9aec892fbf8a Mon Sep 17 00:00:00 2001 From: Nikitin Aleksandr Date: Thu, 4 Apr 2024 18:00:00 +0300 Subject: [PATCH] =?UTF-8?q?=D1=81=D0=B4=D0=B5=D0=BB=D0=B0=D0=BB=20UUID?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/postgres/postgres.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/postgres/postgres.go b/internal/postgres/postgres.go index 97db786..c668d4c 100644 --- a/internal/postgres/postgres.go +++ b/internal/postgres/postgres.go @@ -341,7 +341,7 @@ func FillIDMinimum(MapTable map[string]*types.Table) { DefaultValueSQL := create_files.FindTextDefaultValueSQL(TypeGo) TextSQL = `SELECT Min("` + NameID + `") as id_minimum FROM "` + Schema + `"."` + TableName + `" WHERE " + NameID + " <> ` + DefaultValueSQL } else { - TextSQL = `SELECT "` + NameID + `" as id_minimum FROM "` + Schema + `"."` + TableName + `" WHERE " + NameID + " is not null LIMIT 1` + TextSQL = `SELECT "` + NameID + `" as id_minimum FROM "` + Schema + `"."` + TableName + `" WHERE " + NameID + " is not null ORDER BY ` + NameID + `LIMIT 1` } ctx, ctxCancelFunc := context.WithTimeout(ctxMain, time.Second*60) defer ctxCancelFunc()