Embed Notice
HTML Code
Corresponding Notice
- Embed this notice
(mint@ryona.agency)'s status on Sunday, 07-Jul-2024 02:07:49 JST @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.