diff --git a/internal/config/config.go b/internal/config/config.go index 50fadad..052d3be 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -36,6 +36,7 @@ type SettingsINI struct { NEED_CREATE_MODEL_CRUD bool NEED_CREATE_DB bool NEED_CREATE_DB_TEST bool + NEED_CREATE_DB_TABLES bool NEED_CREATE_GRPC bool NEED_CREATE_GRPC_SERVER_TEST bool NEED_CREATE_GRPC_CLIENT_TEST bool @@ -94,6 +95,9 @@ func FillSettings() { sNEED_CREATE_DB := os.Getenv("NEED_CREATE_DB") Settings.NEED_CREATE_DB = BoolFromString(sNEED_CREATE_DB) + sNEED_CREATE_DB_TABLES := os.Getenv("NEED_CREATE_DB_TABLES") + Settings.NEED_CREATE_DB_TABLES = BoolFromString(sNEED_CREATE_DB_TABLES) + sNEED_GRPC := os.Getenv("NEED_CREATE_GRPC") Settings.NEED_CREATE_GRPC = BoolFromString(sNEED_GRPC) diff --git a/internal/create_files/db_tables/db_tables.go b/internal/create_files/db_tables/db_tables.go index adcb7a1..6633fae 100644 --- a/internal/create_files/db_tables/db_tables.go +++ b/internal/create_files/db_tables/db_tables.go @@ -46,7 +46,7 @@ func CreateFiles(Table1 *types.Table) error { folders.CreateFolder(DirReadyTable) // создание файла struct - if config.Settings.NEED_CREATE_DB == true { + if config.Settings.NEED_CREATE_DB_TABLES == true { err = CreateFilesTable_struct(Table1, DirTemplatesTable, DirReadyTable) if err != nil { log.Error("CreateFilesTable_struct() table: ", Table1.Name, " error: ", err)