diff options
Diffstat (limited to 'backend/cmd_migrate.go')
| -rw-r--r-- | backend/cmd_migrate.go | 17 |
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") +} |
