parent
c1b130c5c6
commit
18bebd0c09
|
@ -839,7 +839,7 @@ type TransactionsResponseValuesItems0CartItemsItems0 struct {
|
|||
BatchID string `json:"batchId,omitempty"`
|
||||
|
||||
// batch sku
|
||||
BatchSku float64 `json:"batchSku,omitempty"`
|
||||
BatchSku string `json:"batchSku,omitempty"`
|
||||
|
||||
// calc cultivation tax
|
||||
CalcCultivationTax float64 `json:"calcCultivationTax,omitempty"`
|
||||
|
|
12
app/mysql.go
12
app/mysql.go
|
@ -11,19 +11,25 @@ import (
|
|||
var MyDB *sql.DB
|
||||
|
||||
// InitDB initializes the MySQL database using DSN information from the config file
|
||||
// and disables foreign key check's because we maintain referential integreity to allow
|
||||
// for mass batch input.
|
||||
//
|
||||
func InitDB() {
|
||||
var db *sql.DB
|
||||
var err error
|
||||
if GetDBMS() == "mysql" {
|
||||
db, err = sql.Open("mysql", GetDSN())
|
||||
} else {
|
||||
if GetDBMS() != "mysql" {
|
||||
sugar.Fatalf("app.InitDB: 💣 ⛔ unknown DBMS: %s", GetDBMS())
|
||||
return
|
||||
}
|
||||
db, err = sql.Open("mysql", GetDSN())
|
||||
if err != nil {
|
||||
sugar.Fatalf("app.InitDB: 💣 ⛔ Can't log on to DBMS host: %w", err)
|
||||
return
|
||||
}
|
||||
_, err = db.Exec("set foreign_key_check=0")
|
||||
if err != nil {
|
||||
sugar.Warnf("app.InitDB: 💣⛔ can't disable foreign key check")
|
||||
}
|
||||
MyDB = db
|
||||
sugar.Debugf("app.InitDB: 👍 📤 %s", GetDBMS())
|
||||
}
|
||||
|
|
|
@ -6501,7 +6501,7 @@ definitions:
|
|||
type: string
|
||||
batchSku:
|
||||
example: 0
|
||||
type: number
|
||||
type: string
|
||||
calcCultivationTax:
|
||||
example: 0
|
||||
type: number
|
||||
|
|
|
@ -16,7 +16,7 @@ info:
|
|||
contact:
|
||||
email: "noc@taxnexus.net"
|
||||
license:
|
||||
name: "Proprietary"
|
||||
name: "Proprietary - Copyright (c) 2018-2021 by Taxnexus, Inc."
|
||||
termsOfService: "https://www.taxnexus.com/terms/"
|
||||
description: |
|
||||
# Taxnexus Vendor Gateway
|
||||
|
|
Loading…
Reference in New Issue