support sqlite

This commit is contained in:
rogee
2023-03-01 09:24:01 +08:00
parent bdee945461
commit bfe1870420
2 changed files with 6 additions and 3 deletions

View File

@@ -51,7 +51,10 @@ var modelCmd = &cobra.Command{
log.Fatal(err)
}
case database.DriverSQLite:
err := gq.DB.Raw("SELECT name FROM sqlite_master WHERE type='table'").Scan(&tables).Error
if err != nil {
log.Fatal(err)
}
}
if len(tables) == 0 {