go-duck-cli 1.1.20 → 1.1.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -329,7 +329,7 @@ func CreateDatabaseAndMigrate(masterDB *gorm.DB) gin.HandlerFunc {
329
329
  var exists int
330
330
  masterDB.Raw("SELECT 1 FROM pg_database WHERE datname = ?", req.DBName).Scan(&exists)
331
331
  if exists == 0 {
332
- masterDB.Exec(fmt.Sprintf("CREATE DATABASE \"%s\"", req.DBName))
332
+ masterDB.Exec(fmt.Sprintf("CREATE DATABASE \\\"%s\\\"", req.DBName))
333
333
  }
334
334
 
335
335
  // 2. Clear other primary flags for this role if setting new primary
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "go-duck-cli",
3
- "version": "1.1.20",
3
+ "version": "1.1.22",
4
4
  "description": "The Ultimate Evolutionary Go Microservice Scaffolder.",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -33,4 +33,10 @@ UpdatedAt time.Time `{{#if isDocument}}bson:"updated_at"{{else}}gorm:"autoUpdate
33
33
  {{/unless}}
34
34
  {{/if}}
35
35
  {{/each}}
36
- }
36
+ }
37
+
38
+ {{#unless isDocument}}
39
+ func ({{name}}) TableName() string {
40
+ return "{{toLowerCase name}}"
41
+ }
42
+ {{/unless}}