aboutsummaryrefslogtreecommitdiff
path: root/db/db.go
diff options
context:
space:
mode:
authorGabriel A. Giovanini <mail@gabrielgio.me>2022-06-15 12:40:12 +0200
committerGabriel A. Giovanini <mail@gabrielgio.me>2022-06-15 12:40:12 +0200
commit64496464b3812839c1e4b440bdf69cc84f39c491 (patch)
treea695e52f736c39e8518247bf48b9743506a3c32f /db/db.go
parent04a10f2acd73d88f90433755bfbe667c5174acb5 (diff)
downloadmdir-64496464b3812839c1e4b440bdf69cc84f39c491.tar.gz
mdir-64496464b3812839c1e4b440bdf69cc84f39c491.tar.bz2
mdir-64496464b3812839c1e4b440bdf69cc84f39c491.zip
ref: Move to a MVC like approach
Before everything was dumped into the controller file, now it is spread out a bit. It is still far from good, like the controller is not really a controller... baby steps I guess The refactored was based on this post: https://www.alexedwards.net/blog/organising-database-access
Diffstat (limited to 'db/db.go')
-rw-r--r--db/db.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/db/db.go b/db/db.go
index 128dcc8..5c904fd 100644
--- a/db/db.go
+++ b/db/db.go
@@ -17,5 +17,5 @@ func ConnectDb() {
panic("failed to connect to the database.")
}
- DB.AutoMigrate(&YdlEntry{})
+ DB.AutoMigrate(&Entry{})
}