aboutsummaryrefslogtreecommitdiffhomepage
path: root/backend/cmd_migrate.go
blob: 1a2f9f6c204458d45307e2853fcc852d77b79662 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
package main

import (
	"database/sql"
	"log"

	"undef.ninja/x/feedaka/db"
)

func runMigrate(database *sql.DB) {
	log.Println("Running database migrations...")
	err := db.RunMigrations(database)
	if err != nil {
		log.Fatalf("Migration failed: %v", err)
	}
	log.Println("Migrations completed successfully")
}