Fix migration
This commit is contained in:
1 parent
3f60267bdc
commit
cb8c66849a
1 file changed
+2
-2
@@ -7,12 +7,12 @@ import (
|
||||
type Rqlite struct{}
|
||||
|
||||
func (s *Rqlite) CreateTable(tableName string) string {
|
||||
q := `CREATE TABLE %s (
|
||||
q := `CREATE TABLE if not exists %s (
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
version_id INTEGER NOT NULL,
|
||||
is_applied INTEGER NOT NULL,
|
||||
tstamp DATETIME DEFAULT (datetime('now'))
|
||||
) if not exists`
|
||||
)`
|
||||
return fmt.Sprintf(q, tableName)
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user