Fix database creation syntax
This commit is contained in:
parent
6ea1c77ef2
commit
587c511c97
1 changed files with 5 additions and 1 deletions
|
@ -15,8 +15,12 @@ export class BudgetDatabase extends Dexie {
|
|||
constructor () {
|
||||
super('BudgetDatabase')
|
||||
this.version(1).stores({
|
||||
transactions: `++id, title, description, amount, date, category, type`,
|
||||
categories: `++id, name, amount, repeat, color`
|
||||
})
|
||||
this.version(2).stores({
|
||||
transactions: `++id, title, description, amount, date, category_id, type`,
|
||||
categories: `++id, name, amount, repeat, color, type-`
|
||||
categories: `++id, name, amount, repeat, color, type`
|
||||
})
|
||||
this.transactions.mapToClass(Transaction)
|
||||
this.categories.mapToClass(Category)
|
||||
|
|
Loading…
Reference in a new issue