mirror of
https://github.com/ManyakRus/crud_generator.git
synced 2024-12-22 00:36:41 +02:00
сделал NEED_CREATE_DB_TABLES
This commit is contained in:
parent
ca175837ea
commit
a3e7fe06a6
@ -36,6 +36,7 @@ type SettingsINI struct {
|
|||||||
NEED_CREATE_MODEL_CRUD bool
|
NEED_CREATE_MODEL_CRUD bool
|
||||||
NEED_CREATE_DB bool
|
NEED_CREATE_DB bool
|
||||||
NEED_CREATE_DB_TEST bool
|
NEED_CREATE_DB_TEST bool
|
||||||
|
NEED_CREATE_DB_TABLES bool
|
||||||
NEED_CREATE_GRPC bool
|
NEED_CREATE_GRPC bool
|
||||||
NEED_CREATE_GRPC_SERVER_TEST bool
|
NEED_CREATE_GRPC_SERVER_TEST bool
|
||||||
NEED_CREATE_GRPC_CLIENT_TEST bool
|
NEED_CREATE_GRPC_CLIENT_TEST bool
|
||||||
@ -94,6 +95,9 @@ func FillSettings() {
|
|||||||
sNEED_CREATE_DB := os.Getenv("NEED_CREATE_DB")
|
sNEED_CREATE_DB := os.Getenv("NEED_CREATE_DB")
|
||||||
Settings.NEED_CREATE_DB = BoolFromString(sNEED_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")
|
sNEED_GRPC := os.Getenv("NEED_CREATE_GRPC")
|
||||||
Settings.NEED_CREATE_GRPC = BoolFromString(sNEED_GRPC)
|
Settings.NEED_CREATE_GRPC = BoolFromString(sNEED_GRPC)
|
||||||
|
|
||||||
|
@ -46,7 +46,7 @@ func CreateFiles(Table1 *types.Table) error {
|
|||||||
folders.CreateFolder(DirReadyTable)
|
folders.CreateFolder(DirReadyTable)
|
||||||
|
|
||||||
// создание файла struct
|
// создание файла struct
|
||||||
if config.Settings.NEED_CREATE_DB == true {
|
if config.Settings.NEED_CREATE_DB_TABLES == true {
|
||||||
err = CreateFilesTable_struct(Table1, DirTemplatesTable, DirReadyTable)
|
err = CreateFilesTable_struct(Table1, DirTemplatesTable, DirReadyTable)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Error("CreateFilesTable_struct() table: ", Table1.Name, " error: ", err)
|
log.Error("CreateFilesTable_struct() table: ", Table1.Name, " error: ", err)
|
||||||
|
Loading…
Reference in New Issue
Block a user