Add rollbacks for associated_object_id
[akkoma] / docs / docs / installation / migrating_to_akkoma.md
1 # Migrating to Akkoma
2
3 ## Why should you migrate?
4
5 aside from actually responsive maintainer(s)? let's lookie here, we've got:
6
7 - custom emoji reactions
8 - misskey markdown (MFM) rendering and posting support
9 - elasticsearch support (because pleroma search is GARBAGE)
10 - latest develop pleroma-fe additions
11 - local-only posting
12 - automatic post translation
13 - the mastodon frontend back in all its glory
14 - probably more, this is like 3.5 years of IHBA additions finally compiled
15
16 ## Actually migrating
17
18 Let's say you're very cool and have decided to move to the cooler
19 fork of Akkoma - luckily this isn't very hard.
20
21 You'll need to update the backend, then possibly the frontend, depending
22 on your setup.
23
24 ## From Source
25
26 If you're running the source Akkoma install, you'll need to set the
27 upstream git URL then just rebuild - that'll be:
28
29 ```bash
30 git remote set-url origin https://akkoma.dev/AkkomaGang/akkoma.git/
31 git fetch origin
32 git pull -r
33 # or, if you're on an instance-specific branch, you may want
34 # to run "git merge stable" instead (or develop if you want)
35 ```
36
37 ### WARNING - Migrating from Pleroma Develop
38 If you are on pleroma develop, and have updated since 2022-08, you may have issues with database migrations.
39
40 Please roll back the given migrations:
41
42 ```bash
43 MIX_ENV=prod mix ecto.rollback --migrations-path priv/repo/optional_migrations/pleroma_develop_rollbacks -n3
44 ```
45
46 Then compile, migrate and restart as usual.
47
48 ## From OTP
49
50 This will just be setting the update URL - find your flavour from the [mapping on the install guide](../otp_en/#detecting-flavour) first.
51
52 ```bash
53 export FLAVOUR=[the flavour you found above]
54
55 ./bin/pleroma_ctl update --zip-url https://akkoma-updates.s3-website.fr-par.scw.cloud/stable/akkoma-$FLAVOUR.zip
56 ./bin/pleroma_ctl migrate
57 ```
58
59 Then restart. When updating in the future, you canjust use
60
61 ```bash
62 ./bin/pleroma_ctl update --branch stable
63 ```
64
65 ## Frontend changes
66
67 Akkoma comes with a few frontend changes as well as backend ones,
68 your upgrade path here depends on your setup
69
70 ### I just run with the built-in frontend
71
72 You'll need to run a couple of commands,
73
74 === "OTP"
75 ```sh
76 ./bin/pleroma_ctl frontend install pleroma-fe --ref stable
77 # and also, if desired
78 ./bin/pleroma_ctl frontend install admin-fe --ref stable
79 ```
80
81 === "From Source"
82 ```sh
83 mix pleroma.frontend install pleroma-fe --ref stable
84 mix pleroma.frontend install admin-fe --ref stable
85 ```
86
87 ### I've run the mix task to install a frontend
88
89 Hooray, just run it again to update the frontend to the latest build.
90 See above for that command.
91
92 ### I compile the JS from source
93
94 Your situation will likely be unique - you'll need the changes in the
95 [forked pleroma-fe repository](https://akkoma.dev/AkkomaGang/pleroma-fe),
96 and either merge or cherry-pick from there depending on how you've got
97 things.