1
0
mirror of https://github.com/ManyakRus/crud_generator.git synced 2025-06-16 00:50:28 +02:00

сделал CreateFilesUpdateEveryColumn()

This commit is contained in:
Nikitin Aleksandr
2024-02-15 15:59:34 +03:00
parent b37b6bac7c
commit e8c7884efe
4 changed files with 46 additions and 13 deletions

View File

@ -285,7 +285,8 @@ func FillIDMinimum(MapTable map[string]*types.Table) {
if NameID == "" {
continue
}
TextSQL := "SELECT Min(" + NameID + ") from \"" + postgres_gorm.Settings.DB_SCHEMA + "\".\"" + TableName + "\""
DefaultValueSQL := create_files.FindTextDefaultValueSQL(TypeGo)
TextSQL := "SELECT Min(" + NameID + ") from \"" + postgres_gorm.Settings.DB_SCHEMA + "\".\"" + TableName + "\" WHERE " + NameID + " <> " + DefaultValueSQL
ctx, ctxCancelFunc := context.WithTimeout(ctxMain, time.Second*60)
defer ctxCancelFunc()
db.WithContext(ctx)