db fix and new update request

This commit is contained in:
samantha42
2026-03-20 23:02:33 +01:00
parent 6ad5df839b
commit 45f4cca485
8 changed files with 187 additions and 81 deletions

View File

@@ -1,10 +1,13 @@
package database
import "fmt"
import (
"database/sql"
"fmt"
)
// Migrate runs the schema bootstrap. SQLite doesn't need a migration tool —
// CREATE TABLE IF NOT EXISTS is idempotent so this is safe to call on every start.
func Migrate(db *DB) error {
func Migrate(db *sql.DB) error {
stmts := []string{
`CREATE TABLE IF NOT EXISTS departments (
id INTEGER PRIMARY KEY AUTOINCREMENT,