-
Notifications
You must be signed in to change notification settings - Fork 112
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
36 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package main | ||
|
||
import ( | ||
"fmt" | ||
"github.com/gohouse/gorose" | ||
) | ||
|
||
// ./artisan make (create_users_table) 生成迁移:创建用户表 | ||
// ./artisan migrate 运行迁移 | ||
// ./artisan rollback 回滚迁移 | ||
// ./artisan reset 回滚所有的应用迁移 | ||
// ./artisan refresh 在单个命令中回滚 & 迁移 | ||
// ./artisan fresh 删除所有表 & 迁移 | ||
|
||
var conn *gorose.Connection | ||
var err error | ||
|
||
func init() { | ||
} | ||
func main() { | ||
conn,err = gorose.Open("mysql", "gcore:gcore@tcp(192.168.200.248:3306)/test?charset=utf8") | ||
fmt.Println(conn,err) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package main | ||
|
||
func Up() { | ||
|
||
} | ||
|
||
func Down() { | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters