Updated Initial migration (markdown)

Darius Kazemi 2020-05-16 18:23:36 -07:00
parent 7a246a8756
commit 767cee503f
1 changed files with 11 additions and 11 deletions

@ -1,10 +1,10 @@
Hello! This is a guide to help you migrate from Mastodon to Hometown. This guide shows you how to migrate from Mastodon 2.9.3 to Hometown v1.0.1+2.9.3. Right now we are up to date with Mastodon 2.9.3, so make sure you are running Mastodon 2.9.3 before trying this. And please test in a local development environment or a test server first if at all possible.
Hello! This is a guide to help you migrate from Mastodon to Hometown. This guide shows you how to migrate from Mastodon 3.1.4 to Hometown v1.0.4+3.1.4. Right now we are up to date with Mastodon 3.1.4, so make sure you are running Mastodon 3.1.4 before trying this. And please test in a local development environment or a test server first if at all possible.
__RIGHT NOW THIS IS NOT FOR BEGINNERS__. You should be comfortable maintaining Mastodon and updating from one version of Mastodon to another. If you are an instance admin who has upgraded your instance from, say, 2.5 up to 2.9.3 over time, you should be familiar with every step of this process.
__RIGHT NOW THIS IS NOT FOR BEGINNERS__. You should be comfortable maintaining Mastodon and updating from one version of Mastodon to another. If you are an instance admin who has upgraded your instance from, say, 2.9.5 up to 3.1.4 over time, you should be familiar with every step of this process.
Assuming you are running Mastodon 2.9.3 (aka you have the `v2.9.3` tag checked out in git and a `git log` shows your most recent commit is `06f906acace5770fc10f333a203b036c5b72c849` ), the following should work.
Assuming you are running Mastodon 3.1.4 (aka you have the `v3.1.4` tag checked out in git and a `git log` shows your most recent commit is `c9dcc2d39fb5bd945ecd999e50c08a86cce1aa3e` ), the following should work.
First, triple-check you're on the v2.9.3 tag:
First, triple-check you're on the v3.1.4 tag:
```bash
git describe --tags
@ -12,23 +12,23 @@ git describe --tags
The output should be:
`v2.9.3`
`v3.1.4`
> If you get an error instead, Mastodon probably isn't installed as a Git repo. This can happen if you install Mastodon via downloading a ZIP of the source, or you use something that does that, like Yunohost. Hometown only supports a git-based Mastodon installation.
Next, add the Hometown Github repo as a remote called `hometown` and make a branch off of `v2.9.3` for your new modified installation. Then, switch to that new branch, which right now is identical to 2.9.3.
Next, add the Hometown Github repo as a remote called `hometown` and make a branch off of `v3.1.4` for your new modified installation. Then, switch to that new branch, which right now is identical to 3.1.4.
```bash
git remote add hometown git@github.com:hometown-fork/mastodon.git
git branch hometown-v1.0.1+2.9.3
git checkout hometown-v1.0.1+2.9.3
git branch hometown-v1.0.4+3.1.4
git checkout hometown-v1.0.4+3.1.4
```
The next thing we do is fetch and merge the `v1.0.1+2.9.3` tag from the Hometown Github repo and merge it into our current branch.
The next thing we do is fetch and merge the `v1.0.4+3.1.4` tag from the Hometown Github repo and merge it into our current branch.
```bash
git fetch --tags
git merge v1.0.1+2.9.3
git merge v1.0.4+3.1.4
```
Now we need to run a database migration (replace "production" with your appropriate environment variable):
@ -37,7 +37,7 @@ Now we need to run a database migration (replace "production" with your appropri
RAILS_ENV=production bundle exec rails db:migrate
```
This adds a new field to the statuses table in the database called `activity_pub_type`, which keeps track of whether a given status in the database is an `Article` or a standard `Note`.
This adds some new fields to the statuses table in the database, like one called `activity_pub_type`, which keeps track of whether a given status in the database is an `Article` or a standard `Note`.
Next precompile your static assets: