Add Support for Advance Labels ( LabelV2)
Add Support for Custom Migration to keep supporting two database( sqlite and postgres) Migration from Label to LabelV2
This commit is contained in:
parent
6dc8092ff4
commit
0c07b33359
12 changed files with 730 additions and 49 deletions
|
@ -33,13 +33,11 @@ func NewDatabase(cfg *config.Config) (*gorm.DB, error) {
|
|||
}
|
||||
|
||||
default:
|
||||
|
||||
path := os.Getenv("DT_SQLITE_PATH")
|
||||
if path == "" {
|
||||
db, err = gorm.Open(sqlite.Open("donetick.db"), &gorm.Config{})
|
||||
} else {
|
||||
db, err = gorm.Open(sqlite.Open(path), &gorm.Config{})
|
||||
path = "donetick.db"
|
||||
}
|
||||
db, err = gorm.Open(sqlite.Open(path), &gorm.Config{})
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue