1
0
hugo/content/blog/2017-08-21-mastodon.md
2024-04-23 22:21:26 +09:00

34 lines
1017 B
Markdown

+++
date = "2017-08-21"
tags = ["mastodon"]
title = "mastodon 1.3-1.4"
slug = "mastodon"
+++
私の場合、dbをreset, restoreした後に`mastodon 1.4 -> down 1.2 -> up 1.3 -> up 1.4 -> up 1.5`という手順を踏むことにした。
しかし、1.3から1.4のアップデートすると、heroku serverに`rake db:migrate`した時点で`PG::DuplicateTable: ERROR`などが出るので、結果として500で投稿(toot)などが出来ない問題の対処法。
```
$ heroku run rake db:migrate -a $APP_NAME
PG::DuplicateTable: ERROR
account_domain_blocks
conversation
conversation_mutes
$ heroku pg:psql
DROP TABLE account_domain_blocks;
DROP TABLE conversation CASCADE;
DROP TABLE conversation_mutes;
$ heroku run rake db:migrate -a $APP_NAME
Index name 'index_accounts_on_uri' on table 'accounts' already exists
$ heroku pg:psql
DROP INDEX index_accounts_on_uri;
$ heroku run rake db:migrate -a $APP_NAME
$ heroku run rake assets:precompile -a $APP_NAME
$ heroku ps:restart -a $APP_NAME
```