Skip to content

Commit

Permalink
Add default problem
Browse files Browse the repository at this point in the history
  • Loading branch information
slhmy committed Sep 9, 2023
1 parent a5141ff commit 2b45926
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions migration/migrate_db.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand All @@ -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")
}

0 comments on commit 2b45926

Please sign in to comment.