Skip to content

Commit

Permalink
[refactoring] #48
Browse files Browse the repository at this point in the history
  • Loading branch information
yoneyan committed Feb 28, 2021
1 parent c8775d5 commit bb3d382
Showing 1 changed file with 18 additions and 5 deletions.
23 changes: 18 additions & 5 deletions pkg/api/store/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,23 @@ func ConnectDB() (*gorm.DB, error) {

func InitDB() {
db, _ := ConnectDB()
result := db.AutoMigrate(&user.User{}, &group.Group{}, &token.Token{}, &network.Network{}, &network.IP{},
&network.JPNICAdmin{}, &network.JPNICTech{},
&connection.Connection{}, &jpnicAdmin.JpnicAdmin{}, &jpnicTech.JpnicTech{}, &notice.Notice{},
&ticket.Ticket{}, &chat.Chat{}, &noc.NOC{}, &gateway.Gateway{}, &nocRouter.Router{})
result := db.AutoMigrate(
&user.User{},
&group.Group{},
&token.Token{},
&network.Network{},
&network.IP{},
&network.JPNICAdmin{},
&network.JPNICTech{},
&connection.Connection{},
&jpnicAdmin.JpnicAdmin{},
&jpnicTech.JpnicTech{},
&notice.Notice{},
&ticket.Ticket{},
&chat.Chat{},
&noc.NOC{},
&gateway.Gateway{},
&nocRouter.Router{},
)
log.Println(result.Error)
//return nil
}

0 comments on commit bb3d382

Please sign in to comment.