17
persistence/tables/config.go
Normal file
17
persistence/tables/config.go
Normal file
@@ -0,0 +1,17 @@
|
||||
package tables
|
||||
|
||||
import (
|
||||
"database/sql"
|
||||
|
||||
"github.com/owncast/owncast/utils"
|
||||
)
|
||||
|
||||
func CreateConfigTable(db *sql.DB) {
|
||||
createTableSQL := `CREATE TABLE IF NOT EXISTS datastore (
|
||||
"key" string NOT NULL PRIMARY KEY,
|
||||
"value" BLOB,
|
||||
"timestamp" DATE DEFAULT CURRENT_TIMESTAMP NOT NULL
|
||||
);`
|
||||
|
||||
utils.MustExec(createTableSQL, db)
|
||||
}
|
||||
Reference in New Issue
Block a user