From c2465b4733e888a3817f717312f5e332a72e3ba5 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Mon, 27 Oct 2025 01:53:31 +0900 Subject: refactor(backend): split main.go --- backend/cmd_migrate.go | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 backend/cmd_migrate.go (limited to 'backend/cmd_migrate.go') 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") +} -- cgit v1.2.3-70-g09d2