familyfriendlymikey
2 years ago
4 changed files with 33 additions and 1823 deletions
@ -0,0 +1,22 @@ |
|||
import Dexie from 'dexie' |
|||
import 'dexie-export-import' |
|||
import { nanoid } from 'nanoid' |
|||
|
|||
let db = new Dexie 'fuzzyhome' |
|||
|
|||
db.version(1).stores({ |
|||
links: "++id,name,link" |
|||
}) |
|||
|
|||
db.version(2).stores({ |
|||
links: "++id,name,url,frequency,img" |
|||
}).upgrade! do |trans| |
|||
trans.links.toCollection!.modify! do |link| |
|||
let id = nanoid! |
|||
let name = link.name |
|||
let url = link.link |
|||
let frequency = link.frequency |
|||
let img = link.img |
|||
this.value = { id, name, url, frequency, img } |
|||
|
|||
export default db |
File diff suppressed because it is too large
Loading…
Reference in new issue