Commit c9a7704b authored by Lukas Böhm's avatar Lukas Böhm 🎱
Browse files

fix migrations

parent f2347cab
......@@ -22,4 +22,5 @@ services
# env variables and password
*.htpasswd
*.env
chiefsend2.conf
\ No newline at end of file
chiefsend2.conf
api/sqlite:hallo
......@@ -62,8 +62,8 @@ func Reset() {
if err != nil {
log.Fatal("database brok")
}
db.AutoMigrate(&Attachment{})
db.AutoMigrate(&Share{})
db.AutoMigrate(&Attachment{})
// delete everything
db.Where("1 = 1").Delete(&Share{})
db.Where("1 = 1").Delete(&Attachment{})
......
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Shared </title>
</head>
<body>
Hallo test
</body>
</html>
\ No newline at end of file
......@@ -24,8 +24,8 @@ func main() {
log.Fatal("Cannot connect database")
}
// Migrate the schema
db.AutoMigrate(&Attachment{})
db.AutoMigrate(&Share{})
db.AutoMigrate(&Attachment{})
// start
fmt.Println("Let's go!!!")
ConfigureRoutes()
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment