Some additions
This commit is contained in:
@ -77,14 +77,19 @@ func GetDatabase(tokenString string) (jwt.MapClaims, *sql.DB, error) {
|
||||
}
|
||||
|
||||
// CreateDatabase Create a database by copying the template
|
||||
func CreateDatabase(token string) {
|
||||
func CreateDatabase(companyName string) {
|
||||
/*
|
||||
db, err = sql.Open("postgres", "host=127.0.0.1 port=5435 user=postgres password=postgre dbname=company5 sslmode=disable")
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
if dbs[companyName] != nil {
|
||||
fmt.Println("DB Already open")
|
||||
return dbs[companyName], nil
|
||||
}
|
||||
/*
|
||||
db, err = sql.Open("postgres", "host=127.0.0.1 port=5435 user=postgres password=postgre dbname=company5 sslmode=disable")
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
||||
or, err := orm.NewOrmWithDB("postgres", "temp", db)
|
||||
or, err := orm.NewOrmWithDB("postgres", "temp", db)
|
||||
*/
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user