Skip to content

Commit f1cbf5b

Browse files
pyphiliakim
andauthored
fix: add migration to remove item login prop from extra (#2083)
* fix: add migration to remove item login prop from extra * refactor: apply suggestion --------- Co-authored-by: kim <kim.phanhoang@epfl.ch>
1 parent 34371be commit f1cbf5b

2 files changed

Lines changed: 15 additions & 0 deletions

File tree

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
-- remove itemLogin property from extra because it is not used anymore
2+
update item set extra = extra - 'itemLogin' where extra ? 'itemLogin';
3+
4+
-- newly empty extra should be replaced for folders
5+
update item set extra='{"folder":{}}'::jsonb where type='folder' and extra = '{}';
6+
7+
-- delete invalid recycle bin items because they are not used anymore
8+
delete from item where "type"='recycleBin'

src/drizzle/meta/_journal.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,13 @@
141141
"when": 1768915971957,
142142
"tag": "0019_folder-extra",
143143
"breakpoints": true
144+
},
145+
{
146+
"idx": 20,
147+
"version": "7",
148+
"when": 1768915972957,
149+
"tag": "0020_remove-extra-item-login",
150+
"breakpoints": true
144151
}
145152
]
146153
}

0 commit comments

Comments
 (0)