added user signup feature
This commit is contained in:
@@ -19,6 +19,7 @@ func Initdb(databasePath string, demoDataPath string) *gorm.DB {
|
||||
}
|
||||
// Migrate the schema
|
||||
db.AutoMigrate(&model.Book{})
|
||||
db.AutoMigrate(&model.User{})
|
||||
var book model.Book
|
||||
queryResult := db.Limit(1).Find(&book)
|
||||
if queryResult.RowsAffected == 0 && demoDataPath != "" {
|
||||
|
||||
Reference in New Issue
Block a user