mirror of
https://github.com/muety/wakapi.git
synced 2023-08-10 21:12:56 +03:00
fix: migrate id column type to bigint (resolve #281)
This commit is contained in:
@@ -243,6 +243,14 @@ func (c *dbConfig) IsSQLite() bool {
|
||||
return c.Dialect == "sqlite3"
|
||||
}
|
||||
|
||||
func (c *dbConfig) IsMySQL() bool {
|
||||
return c.Dialect == "mysql"
|
||||
}
|
||||
|
||||
func (c *dbConfig) IsPostgres() bool {
|
||||
return c.Dialect == "postgres"
|
||||
}
|
||||
|
||||
func (c *serverConfig) GetPublicUrl() string {
|
||||
return strings.TrimSuffix(c.PublicUrl, "/")
|
||||
}
|
||||
@@ -289,6 +297,12 @@ func resolveDbDialect(dbType string) string {
|
||||
if dbType == "cockroach" {
|
||||
return "postgres"
|
||||
}
|
||||
if dbType == "sqlite" {
|
||||
return "sqlite3"
|
||||
}
|
||||
if dbType == "mariadb" {
|
||||
return "mysql"
|
||||
}
|
||||
return dbType
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user