@Cocoa Migrating to upstream shouldn't be too hard, just need to make a DB backup, revert some migrations (./bin/pleroma_ctl database rollback should do the trick, though I haven't tried it), possibly drop settings from DB config (which you shouldn't use anyway on singleuser instances), then clone the new repo and set it up as usual barring the config.exs changes.
@m0xee@Cocoa Buggy and adds unnecessary complexity. I don't even use it on multiuser instances, but some might want to avoid those 15 seconds of downtime to not inconvenience other users.
@pomstan@Cocoa@m0xee I don't have the strongest hardware out there, so it is what it is. Fromsourcekeks might wait longer, though, since it's doing a bunch of dependency checks before launching; I've been rolling my own OTP releases since I first started agency.
@p@Cocoa And here's the first hurdle, a non-recoverable migration. Thankfully it's trivial (only adds a single column), so it can be reversed manually after being done with all other migrations. Screenshot_20240706_193831.png
@Cocoa@mint That's fuckin' rough. But a migration like that should be trivial to write a `down` for; maybe a patch would be better, but you wonder, like, why would there not be a `down`?
@Cocoa@p Alright, tested the process out on a VM with rebased that has like one user and three posts. I'm gonna assume you followed instructions on https://soapbox.pub/install/ during initial installation (which for whatever reason make you use some third-party package manager for Erlang/Elixir, which I think should work with base Pleroma). If not, you should already know whether something should be adjusted. 1. Stop pleromer (`systemctl stop pleroma` or whatever other init system you use) 2. Log in as pleroma user (`sudo -Hu pleroma bash`) and enter /opt/pleroma 3. Rollback vegan-specific migrations by executing following commands in that order: MIX_ENV=prod mix pleroma.database rollback 20221207235104 MIX_ENV=prod mix pleroma.database rollback 20221029171353 MIX_ENV=prod mix pleroma.database rollback 20220927220033 MIX_ENV=prod mix pleroma.database rollback 20220819171321 MIX_ENV=prod mix pleroma.database rollback 20220624104914 MIX_ENV=prod mix pleroma.database rollback 20220225164000 MIX_ENV=prod mix pleroma.database rollback 20210612185407 4. Exit pleroma user (`exit`) and drop the column that can't be rolled back with mix: `sudo -Hu postgres psql pleroma -c "alter table users drop column location;"` 5. Go back to /opt, rename /opt/pleroma into something else (e.g. `mv /opt/pleroma /opt/glussy`), then clone upstream repo (`git clone https://git.pleroma.social/pleroma/pleroma`) 6. Copy config/prod.secret.exs from old directory to new. 7. Log back in as pleroma user, go to /opt/pleroma and run the following to compile the new version and migrate the DB mix local.hex --force mix local.rebar --force mix deps.get MIX_ENV=prod mix compile MIX_ENV=prod mix ecto.migrate 8. After all that's done, log out and restart pleromer (`systemctl start pleroma`). If there are no invalid config entries, it should work out of box. If not, stop pleromer and try running it manually (`sudo -Hu pleroma MIX_ENV=prod mix phx.server`) then tell me what the error is. Worst case scenario, you'd have to remove DB configs (`TRUNCATE TABLE config`) and reconfigure it manually.
@m0xee@p@Cocoa Compared to ackoma, it is fairly minor, with most changes being either adding fields that no one would use or making some index for certain activity type.
@mint@p@Cocoa@mint Wow, that is an impressive number of rollbacks! Were there so many breaking changes to the data structures in Rebased? 🤔 I was always thinking that it should be pretty minor and that most changes were on the frontend side 😆
@mint@p@Cocoa Adding an index for bookmarks looks like a good idea though. Maybe few use them, but I do and I can clearly hear cogs turning with audible screeches in my Pelonmer when I switch to that tab 😂
@p@feld@Cocoa Yeah, but Cocoa also reported about having to wipe DB configs at one point when migrating. Pleroma is pretty frail when it comes to that.
@mint@Cocoa@feld I don't know of a real-world application that can stand conflicting schema versions very well, but there have been some things that were senselessly renamed.