Fix migration

This commit is contained in:
komissarovyv committed 2024-10-29 12:48:33 +03:00
1 parent 3f60267bdc
commit cb8c66849a
1 file changed
+2 -2
+2 -2
View File
@@ -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)
}