feat: register Vikunja tables with db package at init
This commit is contained in:
parent
d26936f869
commit
3dd2ba4aa4
|
|
@ -35,6 +35,10 @@ func SetEngine() (err error) {
|
|||
return nil
|
||||
}
|
||||
|
||||
func init() {
|
||||
db.RegisterTables(GetTables())
|
||||
}
|
||||
|
||||
// GetTables returns all structs which are also a table.
|
||||
func GetTables() []interface{} {
|
||||
return []interface{}{
|
||||
|
|
|
|||
|
|
@ -36,6 +36,10 @@ var (
|
|||
testUpdatedTime time.Time
|
||||
)
|
||||
|
||||
func init() {
|
||||
db.RegisterTables(GetTables())
|
||||
}
|
||||
|
||||
// GetTables returns all structs which are also a table.
|
||||
func GetTables() []interface{} {
|
||||
return []interface{}{
|
||||
|
|
|
|||
|
|
@ -16,6 +16,12 @@
|
|||
|
||||
package migration
|
||||
|
||||
import "code.vikunja.io/api/pkg/db"
|
||||
|
||||
func init() {
|
||||
db.RegisterTables(GetTables())
|
||||
}
|
||||
|
||||
// GetTables returns all structs which are also a table.
|
||||
func GetTables() []interface{} {
|
||||
return []interface{}{
|
||||
|
|
|
|||
|
|
@ -16,6 +16,12 @@
|
|||
|
||||
package notifications
|
||||
|
||||
import "code.vikunja.io/api/pkg/db"
|
||||
|
||||
func init() {
|
||||
db.RegisterTables(GetTables())
|
||||
}
|
||||
|
||||
// GetTables returns all structs which are also a table.
|
||||
func GetTables() []interface{} {
|
||||
return []interface{}{
|
||||
|
|
|
|||
|
|
@ -16,6 +16,12 @@
|
|||
|
||||
package user
|
||||
|
||||
import "code.vikunja.io/api/pkg/db"
|
||||
|
||||
func init() {
|
||||
db.RegisterTables(GetTables())
|
||||
}
|
||||
|
||||
// GetTables returns all structs which are also a table.
|
||||
func GetTables() []interface{} {
|
||||
return []interface{}{
|
||||
|
|
|
|||
Loading…
Reference in New Issue