aboutsummaryrefslogtreecommitdiffhomepage
path: root/backend/cmd_migrate.go
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2025-10-27 01:53:31 +0900
committernsfisis <nsfisis@gmail.com>2025-10-27 01:53:31 +0900
commitc2465b4733e888a3817f717312f5e332a72e3ba5 (patch)
tree25d736c09c173eb2701d7d84fa87936475d302a0 /backend/cmd_migrate.go
parentaf87dd1de0c1dd0e6284170aef807224d5c8ccb5 (diff)
downloadfeedaka-c2465b4733e888a3817f717312f5e332a72e3ba5.tar.gz
feedaka-c2465b4733e888a3817f717312f5e332a72e3ba5.tar.zst
feedaka-c2465b4733e888a3817f717312f5e332a72e3ba5.zip
refactor(backend): split main.gov0.3.4
Diffstat (limited to 'backend/cmd_migrate.go')
-rw-r--r--backend/cmd_migrate.go17
1 files changed, 17 insertions, 0 deletions
diff --git a/backend/cmd_migrate.go b/backend/cmd_migrate.go
new file mode 100644
index 0000000..1a2f9f6
--- /dev/null
+++ b/backend/cmd_migrate.go
@@ -0,0 +1,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")
+}