LemmyNet / jerboa

A native android app for Lemmy
GNU Affero General Public License v3.0
1.16k stars 166 forks source link

Fix migrations 1 #1446

Closed dessalines closed 6 months ago

dessalines commented 6 months ago

Okay, I strongly typed all our default values, and double checked the column order (2 were in the wrong place iirc).

It'd be good if you could test this also, just to be sure it doesn't break existing installs.

MV-GH commented 6 months ago

There is a test in AndroidTest that goes through the migrations to ensure it doesn't fail on migrating between versions but I will test it regardless.

MV-GH commented 6 months ago

Which columns where in the wrong place?

edit:

I see how I did the order wrong, I was basing the order on the order of the alter statements that added the columns

But If I look into the schemas, they are completely different. We should always explicitly set which columns maps to which to prevent subtle bugs like this to occur again.

dessalines commented 6 months ago

iirc the two out of place, were show_collapsed_comment_content, and post_action_bar_mode . I'll fix it so that the migration doesn't use these defaults tho.

dessalines commented 6 months ago

K, I'll get a release out after its merged.