Add sql-cli

This commit is contained in:
Jinzhu 2020-08-06 15:37:36 +08:00
parent f962872b48
commit da1e54d5ab
1 changed files with 2 additions and 0 deletions

View File

@ -64,6 +64,8 @@ func OpenTestConnection() (db *gorm.DB, err error) {
// USE gorm; // USE gorm;
// CREATE USER gorm FROM LOGIN gorm; // CREATE USER gorm FROM LOGIN gorm;
// sp_changedbowner 'gorm'; // sp_changedbowner 'gorm';
// npm install -g sql-cli
// mssql -u gorm -p LoremIpsum86 -d gorm -o 9930
log.Println("testing sqlserver...") log.Println("testing sqlserver...")
if dbDSN == "" { if dbDSN == "" {
dbDSN = "sqlserver://gorm:LoremIpsum86@localhost:9930?database=gorm" dbDSN = "sqlserver://gorm:LoremIpsum86@localhost:9930?database=gorm"