mirror of
https://github.com/go-vikunja/vikunja.git
synced 2026-03-11 17:48:44 -05:00
feat: add table registration to db package
Part of the fix for dump/restore failing when PostgreSQL extensions add extra tables (e.g. PostGIS spatial_ref_sys).
This commit is contained in:
@@ -47,6 +47,15 @@ var (
|
||||
paradedbInstalled bool
|
||||
)
|
||||
|
||||
// registeredTables holds all table beans registered by Vikunja packages.
|
||||
var registeredTables []interface{}
|
||||
|
||||
// RegisterTables registers table beans so that Dump and WipeEverything
|
||||
// only operate on known Vikunja tables.
|
||||
func RegisterTables(tables []interface{}) {
|
||||
registeredTables = append(registeredTables, tables...)
|
||||
}
|
||||
|
||||
// CreateDBEngine initializes a db engine from the config
|
||||
func CreateDBEngine() (engine *xorm.Engine, err error) {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user