|
|
@ -31,15 +31,21 @@ db.version(3).stores({ |
|
|
|
link.url = api.parse_url(link.url).href |
|
|
|
|
|
|
|
db.version(4).stores({ |
|
|
|
links: "++id,display_name,name,is_bang,is_pinned,url,frequency,history,icon" |
|
|
|
links: "++id,display_name,name,is_bang,url,frequency,icon" |
|
|
|
}).upgrade! do |trans| |
|
|
|
p "upgrading to fuzzyhome db version 4" |
|
|
|
trans.links.toCollection!.modify! do |link| |
|
|
|
link.display_name = link.name |
|
|
|
link.is_bang = no |
|
|
|
link.icon = link.img |
|
|
|
delete link.img |
|
|
|
|
|
|
|
db.version(5).stores({ |
|
|
|
links: "++id,display_name,name,is_bang,is_pinned,url,frequency,history,icon" |
|
|
|
}).upgrade! do |trans| |
|
|
|
p "upgrading to fuzzyhome db version 5" |
|
|
|
trans.links.toCollection!.modify! do |link| |
|
|
|
link.is_pinned = no |
|
|
|
link.history = [] |
|
|
|
delete link.img |
|
|
|
|
|
|
|
export default db |
|
|
|