diff --git a/migration/migrate_db.go b/migration/migrate_db.go index 54305e5..abab984 100644 --- a/migration/migrate_db.go +++ b/migration/migrate_db.go @@ -2,6 +2,7 @@ package main import ( "github.com/OJ-lab/oj-lab-services/packages/application" + "github.com/OJ-lab/oj-lab-services/packages/mapper" "github.com/OJ-lab/oj-lab-services/packages/model" "github.com/sirupsen/logrus" ) @@ -12,5 +13,12 @@ func main() { if err != nil { panic("failed to migrate database") } + + mapper.CreateProblem(model.Problem{ + Slug: "hello-world", + Title: "Hello! { ... }", + Description: `Write a program that prints "Hello! %s" to the standard output (stdout).`, + }) + logrus.Info("migrate tables success") }