Update database.go

This commit is contained in:
Dominic Renner 2019-03-06 22:22:12 +01:00 committed by GitHub
parent 5efd476c0a
commit aaa57b353f

View file

@ -63,20 +63,20 @@ func New(dbType string, uri string) (*Database, error) {
return db, nil
}
func (db *Database) CreateTables() error {
err := db.User.CreateTable()
func (db *Database) CreateTables(dbType string) error {
err := db.User.CreateTable(dbType)
if err != nil {
return err
}
err = db.Portal.CreateTable()
err = db.Portal.CreateTable(dbType)
if err != nil {
return err
}
err = db.Puppet.CreateTable()
err = db.Puppet.CreateTable(dbType)
if err != nil {
return err
}
err = db.Message.CreateTable()
err = db.Message.CreateTable(dbType)
if err != nil {
return err
}