SQLite: Rename "sqlite" to "sqlite3" to fix migrations #319 #1791

This commit is contained in:
Michael Mayer 2021-12-09 07:37:49 +01:00
parent 5be456a09f
commit a4d5a81b97
5 changed files with 8 additions and 8 deletions

View file

@ -1,15 +1,15 @@
// Code generated by go generate; DO NOT EDIT. // Code generated by go generate; DO NOT EDIT.
package migrate package migrate
var DialectSQLite = Migrations{ var DialectSQLite3 = Migrations{
{ {
ID: "20211121-094727", ID: "20211121-094727",
Dialect: "sqlite", Dialect: "sqlite3",
Statements: []string{"DROP INDEX IF EXISTS idx_places_place_label;"}, Statements: []string{"DROP INDEX IF EXISTS idx_places_place_label;"},
}, },
{ {
ID: "20211124-120008", ID: "20211124-120008",
Dialect: "sqlite", Dialect: "sqlite3",
Statements: []string{"DROP INDEX IF EXISTS uix_places_place_label;", "DROP INDEX IF EXISTS uix_places_label;"}, Statements: []string{"DROP INDEX IF EXISTS uix_places_place_label;", "DROP INDEX IF EXISTS uix_places_label;"},
}, },
} }

View file

@ -2,11 +2,11 @@ package migrate
// Supported database dialects. // Supported database dialects.
const ( const (
MySQL = "mysql" MySQL = "mysql"
SQLite = "sqlite3" SQLite3 = "sqlite3"
) )
var Dialects = map[string]Migrations{ var Dialects = map[string]Migrations{
MySQL: DialectMySQL, MySQL: DialectMySQL,
SQLite: DialectSQLite, SQLite3: DialectSQLite3,
} }

View file

@ -95,7 +95,7 @@ func gen_migrations(name string) {
func main() { func main() {
gen_migrations("MySQL") gen_migrations("MySQL")
gen_migrations("SQLite") gen_migrations("SQLite3")
} }
var migrationsTemplate = template.Must(template.New("").Parse(`// Code generated by go generate; DO NOT EDIT. var migrationsTemplate = template.Must(template.New("").Parse(`// Code generated by go generate; DO NOT EDIT.