Skip to content

Commit

Permalink
Keep the TodoItem table in database
Browse files Browse the repository at this point in the history
  • Loading branch information
Lai-YT committed Mar 31, 2024
1 parent de8f623 commit ee22a4f
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions storage/database.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,6 @@ type TodoItemModel struct {
func (dba *DatabaseAccessor) InitDb() {
var err error
dba.db, err = gorm.Open(mysql.Open("root:root@/todolist?charset=utf8&parseTime=True&loc=Local"), &gorm.Config{})
// dba.db, err = gorm.Open("mysql", "root:root@/todolist?charset=utf8&parseTime=True&loc=Local")
if err != nil {
panic(err)
}
// TODO: Keep the table.
err = dba.db.Debug().Migrator().DropTable(&TodoItemModel{})
if err != nil {
panic(err)
}
Expand Down

0 comments on commit ee22a4f

Please sign in to comment.