mirror of
https://github.com/casbin/bee.git
synced 2025-07-18 05:04:20 +08:00
fix generate migration for postgressql
This commit is contained in:
@ -30,6 +30,9 @@ func generateScaffold(sname, fields, crupath, driver, conn string) {
|
||||
if fields != "" {
|
||||
upsql = `m.SQL("CREATE TABLE ` + sname + "(" + generateSQLFromFields(fields) + `)");`
|
||||
downsql = `m.SQL("DROP TABLE ` + "`" + sname + "`" + `")`
|
||||
if driver == "" {
|
||||
downsql = strings.Replace(downsql, "`", "", -1)
|
||||
}
|
||||
}
|
||||
generateMigration(sname, upsql, downsql, crupath)
|
||||
}
|
||||
|
Reference in New Issue
Block a user