Unable to do restore. Error undefined method `to_i' for ["1", "1"]:Array

Logs Below. I was having trouble with a creating a backup. Got it going. Then moved to new server and this issue hits. How can I fix this?

[2020-07-01 13:11:28] Marking restore as running...
[2020-07-01 13:11:28] Making sure /var/www/discourse/tmp/restores/default/2020-07-01-131128 exists...
[2020-07-01 13:11:28] Copying archive to tmp directory...
[2020-07-01 13:17:54] Unzipping archive, this may take a while...
[2020-07-01 13:29:18] Extracting dump file...
[2020-07-01 13:30:36] Validating metadata...
[2020-07-01 13:30:36]   Current version: 20200618175923
[2020-07-01 13:30:36]   Restored version: 20200525072638
[2020-07-01 13:30:36] Enabling readonly mode...
[2020-07-01 13:30:37] Pausing sidekiq...
[2020-07-01 13:30:37] Waiting up to 60 seconds for Sidekiq to finish running jobs...
[2020-07-01 13:30:43] Creating missing functions in the discourse_functions schema...
[2020-07-01 13:30:46] Restoring dump file... (this may take a while)
[2020-07-01 13:30:47] SET
[2020-07-01 13:30:47] SET
[2020-07-01 13:30:47] SET
[2020-07-01 13:30:47] SET
[2020-07-01 13:30:47] SET
[2020-07-01 13:30:47] set_config
[2020-07-01 13:30:47] ------------
[2020-07-01 13:30:47] (1 row)
[2020-07-01 13:30:47] SET
[2020-07-01 13:30:47] SET
[2020-07-01 13:30:47] SET
[2020-07-01 13:30:47] SET
[2020-07-01 13:30:47] SET
[2020-07-01 13:30:47] CREATE TABLE
[2020-07-01 13:30:47] CREATE SEQUENCE
[2020-07-01 13:30:47] ALTER SEQUENCE
[2020-07-01 13:30:47] CREATE TABLE
[2020-07-01 13:30:47] CREATE SEQUENCE
[2020-07-01 13:30:47] ALTER SEQUENCE
[2020-07-01 13:30:47] CREATE TABLE
[2020-07-01 13:30:47] CREATE SEQUENCE
[2020-07-01 13:30:47] ALTER SEQUENCE
[2020-07-01 13:30:47] CREATE TABLE
[2020-07-01 13:30:47] CREATE TABLE
[2020-07-01 13:30:47] CREATE SEQUENCE
[2020-07-01 13:30:47] ALTER SEQUENCE
[2020-07-01 13:30:47] CREATE TABLE
[2020-07-01 13:30:47] CREATE SEQUENCE
[2020-07-01 13:30:47] ALTER SEQUENCE
[2020-07-01 13:30:47] CREATE TABLE
[2020-07-01 13:30:47] CREATE SEQUENCE
[2020-07-01 13:30:47] ALTER SEQUENCE
[2020-07-01 13:30:47] CREATE TABLE
[2020-07-01 13:30:47] CREATE SEQUENCE
[2020-07-01 13:30:47] ALTER SEQUENCE
[2020-07-01 13:30:47] CREATE TABLE
[2020-07-01 13:30:47] CREATE TABLE
[2020-07-01 13:30:47] COMMENT
[2020-07-01 13:30:47] COMMENT
[2020-07-01 13:30:47] COMMENT
[2020-07-01 13:30:47] COMMENT
[2020-07-01 13:30:47] COMMENT
[2020-07-01 13:30:47] COMMENT
[2020-07-01 13:30:47] CREATE TABLE
[2020-07-01 13:30:47] COMMENT
[2020-07-01 13:30:47] CREATE VIEW
[2020-07-01 13:30:47] CREATE TABLE
[2020-07-01 13:30:47] CREATE SEQUENCE
[2020-07-01 13:30:47] ALTER SEQUENCE
[2020-07-01 13:30:47] CREATE TABLE
[2020-07-01 13:30:47] CREATE SEQUENCE
[2020-07-01 13:30:47] ALTER SEQUENCE
[2020-07-01 13:30:47] CREATE TABLE
[2020-07-01 13:30:47] CREATE SEQUENCE
[2020-07-01 13:30:47] ALTER SEQUENCE
[2020-07-01 13:30:47] CREATE SEQUENCE
[2020-07-01 13:30:47] ALTER SEQUENCE
[2020-07-01 13:30:47] CREATE TABLE
[2020-07-01 13:30:47] CREATE TABLE
[2020-07-01 13:30:47] CREATE SEQUENCE
[2020-07-01 13:30:47] ALTER SEQUENCE
[2020-07-01 13:30:47] CREATE TABLE
[2020-07-01 13:30:48] CREATE SEQUENCE
[2020-07-01 13:30:48] ALTER SEQUENCE
[2020-07-01 13:30:48] CREATE TABLE
[2020-07-01 13:30:48] CREATE SEQUENCE
[2020-07-01 13:30:48] ALTER SEQUENCE
[2020-07-01 13:30:48] CREATE TABLE
[2020-07-01 13:30:48] CREATE TABLE
[2020-07-01 13:30:48] CREATE SEQUENCE
[2020-07-01 13:30:48] ALTER SEQUENCE
[2020-07-01 13:30:48] CREATE TABLE
[2020-07-01 13:30:48] CREATE SEQUENCE
[2020-07-01 13:30:48] ALTER SEQUENCE
[2020-07-01 13:30:48] CREATE TABLE
[2020-07-01 13:30:48] CREATE SEQUENCE
[2020-07-01 13:30:48] ALTER SEQUENCE
[2020-07-01 13:30:48] CREATE TABLE
[2020-07-01 13:30:48] CREATE SEQUENCE
[2020-07-01 13:30:48] ALTER SEQUENCE
[2020-07-01 13:30:48] CREATE TABLE
[2020-07-01 13:30:48] CREATE SEQUENCE
[2020-07-01 13:30:48] ALTER SEQUENCE
[2020-07-01 13:30:48] CREATE TABLE
[2020-07-01 13:30:48] CREATE SEQUENCE
[2020-07-01 13:30:48] ALTER SEQUENCE
[2020-07-01 13:30:48] CREATE TABLE
[2020-07-01 13:30:48] CREATE SEQUENCE
[2020-07-01 13:30:48] ALTER SEQUENCE
[2020-07-01 13:30:48] CREATE TABLE
[2020-07-01 13:30:48] CREATE SEQUENCE
[2020-07-01 13:30:48] ALTER SEQUENCE
[2020-07-01 13:30:48] CREATE TABLE
[2020-07-01 13:30:48] CREATE SEQUENCE
[2020-07-01 13:30:48] ALTER SEQUENCE
[2020-07-01 13:30:48] CREATE TABLE
[2020-07-01 13:30:48] CREATE SEQUENCE
[2020-07-01 13:30:48] ALTER SEQUENCE
[2020-07-01 13:30:48] CREATE TABLE
[2020-07-01 13:30:48] CREATE SEQUENCE
[2020-07-01 13:30:48] ALTER SEQUENCE
[2020-07-01 13:30:48] CREATE TABLE
[2020-07-01 13:30:48] CREATE SEQUENCE
[2020-07-01 13:30:48] ALTER SEQUENCE
[2020-07-01 13:30:48] CREATE TABLE
[2020-07-01 13:30:48] CREATE SEQUENCE
[2020-07-01 13:30:48] ALTER SEQUENCE
[2020-07-01 13:30:48] CREATE TABLE
[2020-07-01 13:30:48] CREATE SEQUENCE
[2020-07-01 13:30:48] ALTER SEQUENCE
[2020-07-01 13:30:48] CREATE TABLE
[2020-07-01 13:30:48] CREATE SEQUENCE
[2020-07-01 13:30:48] ALTER SEQUENCE
[2020-07-01 13:30:48] CREATE TABLE
[2020-07-01 13:30:48] CREATE SEQUENCE
[2020-07-01 13:30:48] ALTER SEQUENCE
[2020-07-01 13:30:48] CREATE TABLE
[2020-07-01 13:30:48] CREATE SEQUENCE
[2020-07-01 13:30:48] ALTER SEQUENCE
[2020-07-01 13:30:48] CREATE TABLE
[2020-07-01 13:30:48] CREATE TABLE
[2020-07-01 13:30:48] CREATE SEQUENCE
[2020-07-01 13:30:48] ALTER SEQUENCE
[2020-07-01 13:30:48] CREATE TABLE
[2020-07-01 13:30:48] CREATE SEQUENCE
[2020-07-01 13:30:48] ALTER SEQUENCE
[2020-07-01 13:30:48] CREATE TABLE
[2020-07-01 13:30:48] CREATE SEQUENCE
[2020-07-01 13:30:48] ALTER SEQUENCE
[2020-07-01 13:30:49] CREATE TABLE
[2020-07-01 13:30:49] CREATE SEQUENCE
[2020-07-01 13:30:49] ALTER SEQUENCE
[2020-07-01 13:30:49] CREATE TABLE
[2020-07-01 13:30:49] CREATE SEQUENCE
[2020-07-01 13:30:49] ALTER SEQUENCE
[2020-07-01 13:30:49] CREATE TABLE
[2020-07-01 13:30:49] CREATE SEQUENCE
[2020-07-01 13:30:49] ALTER SEQUENCE
[2020-07-01 13:30:49] CREATE TABLE
[2020-07-01 13:30:49] CREATE SEQUENCE
[2020-07-01 13:30:49] ALTER SEQUENCE
[2020-07-01 13:30:49] CREATE TABLE
[2020-07-01 13:30:49] CREATE TABLE
[2020-07-01 13:30:49] CREATE SEQUENCE
[2020-07-01 13:30:49] ALTER SEQUENCE
[2020-07-01 13:30:49] CREATE TABLE
[2020-07-01 13:30:49] CREATE SEQUENCE
[2020-07-01 13:30:49] ALTER SEQUENCE
[2020-07-01 13:30:49] CREATE TABLE
[2020-07-01 13:30:49] CREATE SEQUENCE
[2020-07-01 13:30:49] ALTER SEQUENCE
[2020-07-01 13:30:49] CREATE TABLE
[2020-07-01 13:30:49] CREATE SEQUENCE
[2020-07-01 13:30:49] ALTER SEQUENCE
[2020-07-01 13:30:49] CREATE TABLE
[2020-07-01 13:30:49] CREATE SEQUENCE
[2020-07-01 13:30:49] ALTER SEQUENCE
[2020-07-01 13:30:49] CREATE TABLE
[2020-07-01 13:30:49] CREATE SEQUENCE
[2020-07-01 13:30:49] ALTER SEQUENCE
[2020-07-01 13:30:49] CREATE TABLE
[2020-07-01 13:30:49] CREATE SEQUENCE
[2020-07-01 13:30:49] ALTER SEQUENCE
[2020-07-01 13:30:49] CREATE TABLE
[2020-07-01 13:30:49] CREATE SEQUENCE
[2020-07-01 13:30:49] ALTER SEQUENCE
[2020-07-01 13:30:49] CREATE TABLE
[2020-07-01 13:30:49] CREATE SEQUENCE
[2020-07-01 13:30:49] ALTER SEQUENCE
[2020-07-01 13:30:49] CREATE TABLE
[2020-07-01 13:30:49] CREATE SEQUENCE
[2020-07-01 13:30:49] ALTER SEQUENCE
[2020-07-01 13:30:49] CREATE TABLE
[2020-07-01 13:30:49] CREATE SEQUENCE
[2020-07-01 13:30:49] ALTER SEQUENCE
[2020-07-01 13:30:49] CREATE TABLE
[2020-07-01 13:30:49] CREATE SEQUENCE
[2020-07-01 13:30:49] ALTER SEQUENCE
[2020-07-01 13:30:49] CREATE TABLE
[2020-07-01 13:30:49] CREATE SEQUENCE
[2020-07-01 13:30:49] ALTER SEQUENCE
[2020-07-01 13:30:50] CREATE TABLE
[2020-07-01 13:30:50] CREATE SEQUENCE
[2020-07-01 13:30:50] ALTER SEQUENCE
[2020-07-01 13:30:50] CREATE TABLE
[2020-07-01 13:30:50] CREATE SEQUENCE
[2020-07-01 13:30:50] ALTER SEQUENCE
[2020-07-01 13:30:50] CREATE TABLE
[2020-07-01 13:30:50] CREATE SEQUENCE
[2020-07-01 13:30:50] ALTER SEQUENCE
[2020-07-01 13:30:50] CREATE TABLE
[2020-07-01 13:30:50] CREATE SEQUENCE
[2020-07-01 13:30:50] ALTER SEQUENCE
[2020-07-01 13:30:50] CREATE TABLE
[2020-07-01 13:30:50] CREATE TABLE
[2020-07-01 13:30:50] CREATE SEQUENCE
[2020-07-01 13:30:50] ALTER SEQUENCE
[2020-07-01 13:30:50] CREATE TABLE
[2020-07-01 13:30:50] CREATE SEQUENCE
[2020-07-01 13:30:50] ALTER SEQUENCE
[2020-07-01 13:30:50] CREATE TABLE
[2020-07-01 13:30:50] CREATE SEQUENCE
[2020-07-01 13:30:50] ALTER SEQUENCE
[2020-07-01 13:30:50] CREATE TABLE
[2020-07-01 13:30:50] CREATE SEQUENCE
[2020-07-01 13:30:50] ALTER SEQUENCE
[2020-07-01 13:30:50] CREATE TABLE
[2020-07-01 13:30:50] CREATE SEQUENCE
[2020-07-01 13:30:50] ALTER SEQUENCE
[2020-07-01 13:30:50] CREATE TABLE
[2020-07-01 13:30:50] CREATE TABLE
[2020-07-01 13:30:50] CREATE SEQUENCE
[2020-07-01 13:30:50] ALTER SEQUENCE
[2020-07-01 13:30:50] CREATE TABLE
[2020-07-01 13:30:50] CREATE SEQUENCE
[2020-07-01 13:30:50] ALTER SEQUENCE
[2020-07-01 13:30:50] CREATE TABLE
[2020-07-01 13:30:50] CREATE TABLE
[2020-07-01 13:30:50] CREATE SEQUENCE
[2020-07-01 13:30:50] ALTER SEQUENCE
[2020-07-01 13:30:50] CREATE TABLE
[2020-07-01 13:30:50] CREATE TABLE
[2020-07-01 13:30:50] CREATE SEQUENCE
[2020-07-01 13:30:50] ALTER SEQUENCE
[2020-07-01 13:30:50] CREATE SEQUENCE
[2020-07-01 13:30:50] ALTER SEQUENCE
[2020-07-01 13:30:50] CREATE TABLE
[2020-07-01 13:30:50] CREATE SEQUENCE
[2020-07-01 13:30:50] ALTER SEQUENCE
[2020-07-01 13:30:50] CREATE TABLE
[2020-07-01 13:30:50] CREATE SEQUENCE
[2020-07-01 13:30:50] ALTER SEQUENCE
[2020-07-01 13:30:50] CREATE TABLE
[2020-07-01 13:30:50] CREATE SEQUENCE
[2020-07-01 13:30:50] ALTER SEQUENCE
[2020-07-01 13:30:50] CREATE TABLE
[2020-07-01 13:30:50] CREATE SEQUENCE
[2020-07-01 13:30:50] ALTER SEQUENCE
[2020-07-01 13:30:50] CREATE TABLE
[2020-07-01 13:30:50] CREATE SEQUENCE
[2020-07-01 13:30:50] ALTER SEQUENCE
[2020-07-01 13:30:50] CREATE TABLE
[2020-07-01 13:30:50] CREATE SEQUENCE
[2020-07-01 13:30:50] ALTER SEQUENCE
[2020-07-01 13:30:50] CREATE TABLE
[2020-07-01 13:30:51] CREATE SEQUENCE
[2020-07-01 13:30:51] ALTER SEQUENCE
[2020-07-01 13:30:51] CREATE TABLE
[2020-07-01 13:30:51] CREATE SEQUENCE
[2020-07-01 13:30:51] ALTER SEQUENCE
[2020-07-01 13:30:51] CREATE TABLE
[2020-07-01 13:30:51] CREATE SEQUENCE
[2020-07-01 13:30:51] ALTER SEQUENCE
[2020-07-01 13:30:51] CREATE TABLE
[2020-07-01 13:30:51] CREATE SEQUENCE
[2020-07-01 13:30:51] ALTER SEQUENCE
[2020-07-01 13:30:51] CREATE TABLE
[2020-07-01 13:30:51] CREATE SEQUENCE
[2020-07-01 13:30:51] ALTER SEQUENCE
[2020-07-01 13:30:51] CREATE TABLE
[2020-07-01 13:30:51] CREATE TABLE
[2020-07-01 13:30:51] CREATE SEQUENCE
[2020-07-01 13:30:51] ALTER SEQUENCE
[2020-07-01 13:30:51] CREATE TABLE
[2020-07-01 13:30:51] CREATE SEQUENCE
[2020-07-01 13:30:51] ALTER SEQUENCE
[2020-07-01 13:30:51] CREATE TABLE
[2020-07-01 13:30:51] CREATE SEQUENCE
[2020-07-01 13:30:51] ALTER SEQUENCE
[2020-07-01 13:30:51] CREATE TABLE
[2020-07-01 13:30:51] CREATE SEQUENCE
[2020-07-01 13:30:51] ALTER SEQUENCE
[2020-07-01 13:30:51] CREATE TABLE
[2020-07-01 13:30:51] CREATE SEQUENCE
[2020-07-01 13:30:51] ALTER SEQUENCE
[2020-07-01 13:30:51] CREATE TABLE
[2020-07-01 13:30:51] CREATE SEQUENCE
[2020-07-01 13:30:51] ALTER SEQUENCE
[2020-07-01 13:30:51] CREATE TABLE
[2020-07-01 13:30:51] CREATE SEQUENCE
[2020-07-01 13:30:51] ALTER SEQUENCE
[2020-07-01 13:30:51] CREATE TABLE
[2020-07-01 13:30:51] CREATE SEQUENCE
[2020-07-01 13:30:51] ALTER SEQUENCE
[2020-07-01 13:30:51] CREATE TABLE
[2020-07-01 13:30:51] CREATE SEQUENCE
[2020-07-01 13:30:51] ALTER SEQUENCE
[2020-07-01 13:30:51] CREATE TABLE
[2020-07-01 13:30:51] CREATE SEQUENCE
[2020-07-01 13:30:51] ALTER SEQUENCE
[2020-07-01 13:30:51] CREATE TABLE
[2020-07-01 13:30:51] CREATE SEQUENCE
[2020-07-01 13:30:51] ALTER SEQUENCE
[2020-07-01 13:30:51] CREATE TABLE
[2020-07-01 13:30:51] CREATE SEQUENCE
[2020-07-01 13:30:51] ALTER SEQUENCE
[2020-07-01 13:30:51] CREATE TABLE
[2020-07-01 13:30:51] CREATE SEQUENCE
[2020-07-01 13:30:51] ALTER SEQUENCE
[2020-07-01 13:30:51] CREATE TABLE
[2020-07-01 13:30:51] CREATE SEQUENCE
[2020-07-01 13:30:51] ALTER SEQUENCE
[2020-07-01 13:30:51] CREATE TABLE
[2020-07-01 13:30:51] CREATE SEQUENCE
[2020-07-01 13:30:51] ALTER SEQUENCE
[2020-07-01 13:30:51] CREATE TABLE
[2020-07-01 13:30:51] CREATE TABLE
[2020-07-01 13:30:51] CREATE SEQUENCE
[2020-07-01 13:30:51] ALTER SEQUENCE
[2020-07-01 13:30:51] CREATE TABLE
[2020-07-01 13:30:51] CREATE SEQUENCE
[2020-07-01 13:30:52] ALTER SEQUENCE
[2020-07-01 13:30:52] CREATE TABLE
[2020-07-01 13:30:52] CREATE SEQUENCE
[2020-07-01 13:30:52] ALTER SEQUENCE
[2020-07-01 13:30:52] CREATE TABLE
[2020-07-01 13:30:52] CREATE SEQUENCE
[2020-07-01 13:30:52] ALTER SEQUENCE
[2020-07-01 13:30:52] CREATE TABLE
[2020-07-01 13:30:52] CREATE SEQUENCE
[2020-07-01 13:30:52] ALTER SEQUENCE
[2020-07-01 13:30:52] CREATE TABLE
[2020-07-01 13:30:52] CREATE SEQUENCE
[2020-07-01 13:30:52] ALTER SEQUENCE
[2020-07-01 13:30:52] CREATE TABLE
[2020-07-01 13:30:52] CREATE SEQUENCE
[2020-07-01 13:30:52] ALTER SEQUENCE
[2020-07-01 13:30:52] CREATE TABLE
[2020-07-01 13:30:52] CREATE SEQUENCE
[2020-07-01 13:30:52] ALTER SEQUENCE
[2020-07-01 13:30:52] CREATE TABLE
[2020-07-01 13:30:52] CREATE SEQUENCE
[2020-07-01 13:30:52] ALTER SEQUENCE
[2020-07-01 13:30:52] CREATE TABLE
[2020-07-01 13:30:52] CREATE SEQUENCE
[2020-07-01 13:30:52] ALTER SEQUENCE
[2020-07-01 13:30:52] CREATE TABLE
[2020-07-01 13:30:52] CREATE SEQUENCE
[2020-07-01 13:30:52] ALTER SEQUENCE
[2020-07-01 13:30:52] CREATE TABLE
[2020-07-01 13:30:52] CREATE SEQUENCE
[2020-07-01 13:30:52] ALTER SEQUENCE
[2020-07-01 13:30:52] CREATE TABLE
[2020-07-01 13:30:52] CREATE SEQUENCE
[2020-07-01 13:30:52] ALTER SEQUENCE
[2020-07-01 13:30:52] CREATE TABLE
[2020-07-01 13:30:52] CREATE SEQUENCE
[2020-07-01 13:30:52] ALTER SEQUENCE
[2020-07-01 13:30:52] CREATE TABLE
[2020-07-01 13:30:52] CREATE TABLE
[2020-07-01 13:30:52] CREATE SEQUENCE
[2020-07-01 13:30:52] ALTER SEQUENCE
[2020-07-01 13:30:52] CREATE TABLE
[2020-07-01 13:30:52] CREATE SEQUENCE
[2020-07-01 13:30:52] ALTER SEQUENCE
[2020-07-01 13:30:52] CREATE TABLE
[2020-07-01 13:30:52] CREATE SEQUENCE
[2020-07-01 13:30:52] ALTER SEQUENCE
[2020-07-01 13:30:52] CREATE TABLE
[2020-07-01 13:30:52] CREATE SEQUENCE
[2020-07-01 13:30:52] ALTER SEQUENCE
[2020-07-01 13:30:52] CREATE TABLE
[2020-07-01 13:30:52] CREATE SEQUENCE
[2020-07-01 13:30:52] ALTER SEQUENCE
[2020-07-01 13:30:52] CREATE TABLE
[2020-07-01 13:30:52] CREATE SEQUENCE
[2020-07-01 13:30:52] ALTER SEQUENCE
[2020-07-01 13:30:52] CREATE TABLE
[2020-07-01 13:30:52] CREATE TABLE
[2020-07-01 13:30:52] CREATE SEQUENCE
[2020-07-01 13:30:52] ALTER SEQUENCE
[2020-07-01 13:30:52] CREATE TABLE
[2020-07-01 13:30:52] CREATE SEQUENCE
[2020-07-01 13:30:52] ALTER SEQUENCE
[2020-07-01 13:30:52] CREATE TABLE
[2020-07-01 13:30:52] CREATE SEQUENCE
[2020-07-01 13:30:52] ALTER SEQUENCE
[2020-07-01 13:30:52] CREATE TABLE
[2020-07-01 13:30:52] CREATE SEQUENCE
[2020-07-01 13:30:52] ALTER SEQUENCE
[2020-07-01 13:30:52] CREATE TABLE
[2020-07-01 13:30:52] CREATE SEQUENCE
[2020-07-01 13:30:52] ALTER SEQUENCE
[2020-07-01 13:30:52] CREATE TABLE
[2020-07-01 13:30:52] CREATE SEQUENCE
[2020-07-01 13:30:52] ALTER SEQUENCE
[2020-07-01 13:30:52] CREATE TABLE
[2020-07-01 13:30:52] CREATE SEQUENCE
[2020-07-01 13:30:52] ALTER SEQUENCE
[2020-07-01 13:30:52] CREATE TABLE
[2020-07-01 13:30:52] CREATE SEQUENCE
[2020-07-01 13:30:52] ALTER SEQUENCE
[2020-07-01 13:30:52] CREATE TABLE
[2020-07-01 13:30:52] CREATE SEQUENCE
[2020-07-01 13:30:52] ALTER SEQUENCE
[2020-07-01 13:30:52] CREATE TABLE
[2020-07-01 13:30:53] CREATE SEQUENCE
[2020-07-01 13:30:53] ALTER SEQUENCE
[2020-07-01 13:30:53] CREATE TABLE
[2020-07-01 13:30:53] CREATE SEQUENCE
[2020-07-01 13:30:53] ALTER SEQUENCE
[2020-07-01 13:30:53] CREATE TABLE
[2020-07-01 13:30:53] CREATE SEQUENCE
[2020-07-01 13:30:53] ALTER SEQUENCE
[2020-07-01 13:30:53] CREATE TABLE
[2020-07-01 13:30:53] CREATE SEQUENCE
[2020-07-01 13:30:53] ALTER SEQUENCE
[2020-07-01 13:30:53] CREATE TABLE
[2020-07-01 13:30:53] CREATE SEQUENCE
[2020-07-01 13:30:53] ALTER SEQUENCE
[2020-07-01 13:30:53] CREATE TABLE
[2020-07-01 13:30:53] CREATE SEQUENCE
[2020-07-01 13:30:53] ALTER SEQUENCE
[2020-07-01 13:30:53] CREATE TABLE
[2020-07-01 13:30:53] CREATE SEQUENCE
[2020-07-01 13:30:53] ALTER SEQUENCE
[2020-07-01 13:30:53] CREATE TABLE
[2020-07-01 13:30:53] CREATE TABLE
[2020-07-01 13:30:53] CREATE SEQUENCE
[2020-07-01 13:30:53] ALTER SEQUENCE
[2020-07-01 13:30:53] CREATE TABLE
[2020-07-01 13:30:53] CREATE TABLE
[2020-07-01 13:30:53] CREATE TABLE
[2020-07-01 13:30:53] CREATE SEQUENCE
[2020-07-01 13:30:53] ALTER SEQUENCE
[2020-07-01 13:30:53] CREATE TABLE
[2020-07-01 13:30:53] CREATE SEQUENCE
[2020-07-01 13:30:53] ALTER SEQUENCE
[2020-07-01 13:30:53] CREATE TABLE
[2020-07-01 13:30:53] CREATE TABLE
[2020-07-01 13:30:53] CREATE SEQUENCE
[2020-07-01 13:30:53] ALTER SEQUENCE
[2020-07-01 13:30:53] CREATE TABLE
[2020-07-01 13:30:53] CREATE SEQUENCE
[2020-07-01 13:30:53] ALTER SEQUENCE
[2020-07-01 13:30:53] CREATE TABLE
[2020-07-01 13:30:53] CREATE SEQUENCE
[2020-07-01 13:30:53] ALTER SEQUENCE
[2020-07-01 13:30:53] CREATE TABLE
[2020-07-01 13:30:53] CREATE SEQUENCE
[2020-07-01 13:30:53] ALTER SEQUENCE
[2020-07-01 13:30:53] CREATE TABLE
[2020-07-01 13:30:53] CREATE SEQUENCE
[2020-07-01 13:30:53] ALTER SEQUENCE
[2020-07-01 13:30:53] CREATE TABLE
[2020-07-01 13:30:53] CREATE SEQUENCE
[2020-07-01 13:30:53] ALTER SEQUENCE
[2020-07-01 13:30:53] CREATE TABLE
[2020-07-01 13:30:53] CREATE TABLE
[2020-07-01 13:30:53] CREATE SEQUENCE
[2020-07-01 13:30:53] ALTER SEQUENCE
[2020-07-01 13:30:53] CREATE TABLE
[2020-07-01 13:30:53] CREATE SEQUENCE
[2020-07-01 13:30:53] ALTER SEQUENCE
[2020-07-01 13:30:53] CREATE TABLE
[2020-07-01 13:30:53] CREATE SEQUENCE
[2020-07-01 13:30:53] ALTER SEQUENCE
[2020-07-01 13:30:53] ALTER TABLE
[2020-07-01 13:30:53] ALTER TABLE
[2020-07-01 13:30:53] ALTER TABLE
[2020-07-01 13:30:53] ALTER TABLE
[2020-07-01 13:30:53] ALTER TABLE
[2020-07-01 13:30:53] ALTER TABLE
[2020-07-01 13:30:53] ALTER TABLE
[2020-07-01 13:30:53] ALTER TABLE
[2020-07-01 13:30:53] ALTER TABLE
[2020-07-01 13:30:53] ALTER TABLE
[2020-07-01 13:30:53] ALTER TABLE
[2020-07-01 13:30:53] ALTER TABLE
[2020-07-01 13:30:53] ALTER TABLE
[2020-07-01 13:30:53] ALTER TABLE
[2020-07-01 13:30:53] ALTER TABLE
[2020-07-01 13:30:53] ALTER TABLE
[2020-07-01 13:30:53] ALTER TABLE
[2020-07-01 13:30:53] ALTER TABLE
[2020-07-01 13:30:53] ALTER TABLE
[2020-07-01 13:30:53] ALTER TABLE
[2020-07-01 13:30:53] ALTER TABLE
[2020-07-01 13:30:53] ALTER TABLE
[2020-07-01 13:30:53] ALTER TABLE
[2020-07-01 13:30:54] ALTER TABLE
[2020-07-01 13:30:54] ALTER TABLE
[2020-07-01 13:30:54] ALTER TABLE
[2020-07-01 13:30:54] ALTER TABLE
[2020-07-01 13:30:54] ALTER TABLE
[2020-07-01 13:30:54] ALTER TABLE
[2020-07-01 13:30:54] ALTER TABLE
[2020-07-01 13:30:54] ALTER TABLE
[2020-07-01 13:30:54] ALTER TABLE
[2020-07-01 13:30:54] ALTER TABLE
[2020-07-01 13:30:54] ALTER TABLE
[2020-07-01 13:30:54] ALTER TABLE
[2020-07-01 13:30:54] ALTER TABLE
[2020-07-01 13:30:54] ALTER TABLE
[2020-07-01 13:30:54] ALTER TABLE
[2020-07-01 13:30:54] ALTER TABLE
[2020-07-01 13:30:54] ALTER TABLE
[2020-07-01 13:30:54] ALTER TABLE
[2020-07-01 13:30:54] ALTER TABLE
[2020-07-01 13:30:54] ALTER TABLE
[2020-07-01 13:30:54] ALTER TABLE
[2020-07-01 13:30:54] ALTER TABLE
[2020-07-01 13:30:54] ALTER TABLE
[2020-07-01 13:30:54] ALTER TABLE
[2020-07-01 13:30:54] ALTER TABLE
[2020-07-01 13:30:54] ALTER TABLE
[2020-07-01 13:30:54] ALTER TABLE
[2020-07-01 13:30:54] ALTER TABLE
[2020-07-01 13:30:54] ALTER TABLE
[2020-07-01 13:30:54] ALTER TABLE
[2020-07-01 13:30:54] ALTER TABLE
[2020-07-01 13:30:54] ALTER TABLE
[2020-07-01 13:30:54] ALTER TABLE
[2020-07-01 13:30:54] ALTER TABLE
[2020-07-01 13:30:54] ALTER TABLE
[2020-07-01 13:30:54] ALTER TABLE
[2020-07-01 13:30:54] ALTER TABLE
[2020-07-01 13:30:54] ALTER TABLE
[2020-07-01 13:30:54] ALTER TABLE
[2020-07-01 13:30:54] ALTER TABLE
[2020-07-01 13:30:54] ALTER TABLE
[2020-07-01 13:30:54] ALTER TABLE
[2020-07-01 13:30:54] ALTER TABLE
[2020-07-01 13:30:54] ALTER TABLE
[2020-07-01 13:30:54] ALTER TABLE
[2020-07-01 13:30:54] ALTER TABLE
[2020-07-01 13:30:54] ALTER TABLE
[2020-07-01 13:30:54] ALTER TABLE
[2020-07-01 13:30:54] ALTER TABLE
[2020-07-01 13:30:54] ALTER TABLE
[2020-07-01 13:30:54] ALTER TABLE
[2020-07-01 13:30:54] ALTER TABLE
[2020-07-01 13:30:54] ALTER TABLE
[2020-07-01 13:30:54] ALTER TABLE
[2020-07-01 13:30:54] ALTER TABLE
[2020-07-01 13:30:54] ALTER TABLE
[2020-07-01 13:30:54] ALTER TABLE
[2020-07-01 13:30:54] ALTER TABLE
[2020-07-01 13:30:54] ALTER TABLE
[2020-07-01 13:30:54] ALTER TABLE
[2020-07-01 13:30:54] ALTER TABLE
[2020-07-01 13:30:54] ALTER TABLE
[2020-07-01 13:30:54] ALTER TABLE
[2020-07-01 13:30:54] ALTER TABLE
[2020-07-01 13:30:54] ALTER TABLE
[2020-07-01 13:30:54] ALTER TABLE
[2020-07-01 13:30:54] ALTER TABLE
[2020-07-01 13:30:54] ALTER TABLE
[2020-07-01 13:30:54] ALTER TABLE
[2020-07-01 13:30:54] ALTER TABLE
[2020-07-01 13:30:54] ALTER TABLE
[2020-07-01 13:30:54] ALTER TABLE
[2020-07-01 13:30:54] ALTER TABLE
[2020-07-01 13:30:54] ALTER TABLE
[2020-07-01 13:30:54] ALTER TABLE
[2020-07-01 13:30:54] ALTER TABLE
[2020-07-01 13:30:54] ALTER TABLE
[2020-07-01 13:30:54] ALTER TABLE
[2020-07-01 13:30:54] ALTER TABLE
[2020-07-01 13:30:54] ALTER TABLE
[2020-07-01 13:30:54] ALTER TABLE
[2020-07-01 13:30:54] ALTER TABLE
[2020-07-01 13:30:54] ALTER TABLE
[2020-07-01 13:30:54] ALTER TABLE
[2020-07-01 13:30:54] ALTER TABLE
[2020-07-01 13:30:54] ALTER TABLE
[2020-07-01 13:30:54] ALTER TABLE
[2020-07-01 13:30:54] ALTER TABLE
[2020-07-01 13:30:54] ALTER TABLE
[2020-07-01 13:30:54] ALTER TABLE
[2020-07-01 13:30:54] ALTER TABLE
[2020-07-01 13:30:54] ALTER TABLE
[2020-07-01 13:30:54] ALTER TABLE
[2020-07-01 13:30:54] ALTER TABLE
[2020-07-01 13:30:54] ALTER TABLE
[2020-07-01 13:30:54] ALTER TABLE
[2020-07-01 13:30:54] ALTER TABLE
[2020-07-01 13:30:54] ALTER TABLE
[2020-07-01 13:30:54] ALTER TABLE
[2020-07-01 13:30:54] ALTER TABLE
[2020-07-01 13:30:54] ALTER TABLE
[2020-07-01 13:30:54] ALTER TABLE
[2020-07-01 13:30:54] ALTER TABLE
[2020-07-01 13:30:54] ALTER TABLE
[2020-07-01 13:30:54] ALTER TABLE
[2020-07-01 13:30:54] ALTER TABLE
[2020-07-01 13:30:54] ALTER TABLE
[2020-07-01 13:30:54] ALTER TABLE
[2020-07-01 13:30:54] ALTER TABLE
[2020-07-01 13:30:54] ALTER TABLE
[2020-07-01 13:30:54] ALTER TABLE
[2020-07-01 13:30:54] ALTER TABLE
[2020-07-01 13:30:54] ALTER TABLE
[2020-07-01 13:30:54] ALTER TABLE
[2020-07-01 13:30:54] ALTER TABLE
[2020-07-01 13:30:54] ALTER TABLE
[2020-07-01 13:30:54] COPY 162
[2020-07-01 13:30:54] COPY 1
[2020-07-01 13:30:54] COPY 13037
[2020-07-01 13:30:54] COPY 1
[2020-07-01 13:30:54] COPY 0
[2020-07-01 13:30:54] COPY 0
[2020-07-01 13:30:54] COPY 6
[2020-07-01 13:30:54] COPY 9
[2020-07-01 13:30:54] COPY 3
[2020-07-01 13:30:54] COPY 61
[2020-07-01 13:30:54] COPY 897
[2020-07-01 13:30:54] COPY 78
[2020-07-01 13:30:54] COPY 0
[2020-07-01 13:30:55] COPY 634
[2020-07-01 13:30:55] COPY 272
[2020-07-01 13:30:55] COPY 131
[2020-07-01 13:30:55] COPY 80
[2020-07-01 13:30:55] COPY 0
[2020-07-01 13:30:55] COPY 734
[2020-07-01 13:30:55] COPY 4
[2020-07-01 13:30:55] COPY 18125
[2020-07-01 13:30:55] COPY 11
[2020-07-01 13:30:55] COPY 60
[2020-07-01 13:30:55] COPY 4
[2020-07-01 13:30:55] COPY 0
[2020-07-01 13:30:55] COPY 0
[2020-07-01 13:30:55] COPY 9229
[2020-07-01 13:30:55] COPY 43249
[2020-07-01 13:30:56] COPY 166
[2020-07-01 13:30:56] COPY 155
[2020-07-01 13:30:58] COPY 89673
[2020-07-01 13:30:58] COPY 4977
[2020-07-01 13:30:58] COPY 2
[2020-07-01 13:30:58] COPY 0
[2020-07-01 13:30:58] COPY 21535
[2020-07-01 13:30:58] COPY 44
[2020-07-01 13:30:58] COPY 0
[2020-07-01 13:30:58] COPY 2719
[2020-07-01 13:30:58] COPY 452
[2020-07-01 13:30:58] COPY 0
[2020-07-01 13:30:58] COPY 10719
[2020-07-01 13:30:58] COPY 22
[2020-07-01 13:30:58] COPY 0
[2020-07-01 13:30:58] COPY 0
[2020-07-01 13:30:58] COPY 458
[2020-07-01 13:30:58] COPY 0
[2020-07-01 13:37:34] CREATE INDEX
[2020-07-01 13:37:34] CREATE INDEX
[2020-07-01 13:37:34] CREATE INDEX
[2020-07-01 13:37:35] CREATE INDEX
[2020-07-01 13:37:35] CREATE INDEX
[2020-07-01 13:37:35] CREATE INDEX
[2020-07-01 13:37:35] CREATE INDEX
[2020-07-01 13:37:35] CREATE INDEX
[2020-07-01 13:37:35] ALTER TABLE
[2020-07-01 13:37:35] ALTER TABLE
[2020-07-01 13:37:35] ALTER TABLE
[2020-07-01 13:37:35] ALTER TABLE
[2020-07-01 13:37:35] ALTER TABLE
[2020-07-01 13:37:35] ALTER TABLE
[2020-07-01 13:37:35] ALTER TABLE
[2020-07-01 13:37:35] ALTER TABLE
[2020-07-01 13:37:35] ALTER TABLE
[2020-07-01 13:37:35] ALTER TABLE
[2020-07-01 13:37:35] ALTER TABLE
[2020-07-01 13:37:35] Migrating the database...
[2020-07-01 13:38:17] EXCEPTION: lib/discourse.rb:90:in `exec': Failed to migrate database.
rake aborted!
StandardError: An error has occurred, this and all later migrations canceled:

undefined method `to_i' for ["1", "1"]:Array
/var/www/discourse/plugins/discourse-ratings/lib/ratings/rating.rb:16:in `initialize'
/var/www/discourse/plugins/discourse-ratings/lib/ratings/rating.rb:140:in `new'
/var/www/discourse/plugins/discourse-ratings/lib/ratings/rating.rb:140:in `block in build_list'
/var/www/discourse/plugins/discourse-ratings/lib/ratings/rating.rb:139:in `map'
/var/www/discourse/plugins/discourse-ratings/lib/ratings/rating.rb:139:in `build_list'
/var/www/discourse/plugins/discourse-ratings/lib/ratings/rating.rb:20:in `build_and_set'
/var/www/discourse/plugins/discourse-ratings/db/migrate/20200520084648_add_rating_types.rb:22:in `block in up'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.1/lib/active_record/relation/delegation.rb:87:in `each'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.1/lib/active_record/relation/delegation.rb:87:in `each'
/var/www/discourse/plugins/discourse-ratings/db/migrate/20200520084648_add_rating_types.rb:16:in `up'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.1/lib/active_record/migration.rb:831:in `exec_migration'
/var/www/discourse/lib/freedom_patches/schema_migration_details.rb:9:in `block in exec_migration'
/var/www/discourse/lib/freedom_patches/schema_migration_details.rb:8:in `exec_migration'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.1/lib/active_record/migration.rb:812:in `block (2 levels) in migrate'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.1/lib/active_record/migration.rb:811:in `block in migrate'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:471:in `with_connection'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.1/lib/active_record/migration.rb:810:in `migrate'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.1/lib/active_record/migration.rb:1002:in `migrate'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.1/lib/active_record/migration.rb:1310:in `block in execute_migration_in_transaction'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.1/lib/active_record/migration.rb:1361:in `block in ddl_transaction'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.1/lib/active_record/connection_adapters/abstract/database_statements.rb:280:in `block in transaction'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.1/lib/active_record/connection_adapters/abstract/transaction.rb:280:in `block in within_new_transaction'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.3.1/lib/active_support/concurrency/load_interlock_aware_monitor.rb:26:in `block (2 levels) in synchronize'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.3.1/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `handle_interrupt'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.3.1/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `block in synchronize'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.3.1/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `handle_interrupt'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.3.1/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `synchronize'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.1/lib/active_record/connection_adapters/abstract/transaction.rb:278:in `within_new_transaction'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.1/lib/active_record/connection_adapters/abstract/database_statements.rb:280:in `transaction'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.1/lib/active_record/transactions.rb:212:in `transaction'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.1/lib/active_record/migration.rb:1361:in `ddl_transaction'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.1/lib/active_record/migration.rb:1309:in `execute_migration_in_transaction'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.1/lib/active_record/migration.rb:1281:in `block in migrate_without_lock'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.1/lib/active_record/migration.rb:1280:in `each'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.1/lib/active_record/migration.rb:1280:in `migrate_without_lock'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.1/lib/active_record/migration.rb:1229:in `block in migrate'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.1/lib/active_record/migration.rb:1382:in `with_advisory_lock'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.1/lib/active_record/migration.rb:1229:in `migrate'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.1/lib/active_record/migration.rb:1061:in `up'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.1/lib/active_record/migration.rb:1036:in `migrate'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.1/lib/active_record/tasks/database_tasks.rb:238:in `migrate'
/var/www/discourse/lib/tasks/db.rake:209:in `block in <main>'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/rake-13.0.1/exe/rake:27:in `<top (required)>'

Caused by:
NoMethodError: undefined method `to_i' for ["1", "1"]:Array
/var/www/discourse/plugins/discourse-ratings/lib/ratings/rating.rb:16:in `initialize'
/var/www/discourse/plugins/discourse-ratings/lib/ratings/rating.rb:140:in `new'
/var/www/discourse/plugins/discourse-ratings/lib/ratings/rating.rb:140:in `block in build_list'
/var/www/discourse/plugins/discourse-ratings/lib/ratings/rating.rb:139:in `map'
/var/www/discourse/plugins/discourse-ratings/lib/ratings/rating.rb:139:in `build_list'
/var/www/discourse/plugins/discourse-ratings/lib/ratings/rating.rb:20:in `build_and_set'
/var/www/discourse/plugins/discourse-ratings/db/migrate/20200520084648_add_rating_types.rb:22:in `block in up'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.1/lib/active_record/relation/delegation.rb:87:in `each'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.1/lib/active_record/relation/delegation.rb:87:in `each'
/var/www/discourse/plugins/discourse-ratings/db/migrate/20200520084648_add_rating_types.rb:16:in `up'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.1/lib/active_record/migration.rb:831:in `exec_migration'
/var/www/discourse/lib/freedom_patches/schema_migration_details.rb:9:in `block in exec_migration'
/var/www/discourse/lib/freedom_patches/schema_migration_details.rb:8:in `exec_migration'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.1/lib/active_record/migration.rb:812:in `block (2 levels) in migrate'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.1/lib/active_record/migration.rb:811:in `block in migrate'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.1/lib/active_record/connection_adapters/abstract/connection_pool.rb:471:in `with_connection'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.1/lib/active_record/migration.rb:810:in `migrate'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.1/lib/active_record/migration.rb:1002:in `migrate'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.1/lib/active_record/migration.rb:1310:in `block in execute_migration_in_transaction'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.1/lib/active_record/migration.rb:1361:in `block in ddl_transaction'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.1/lib/active_record/connection_adapters/abstract/database_statements.rb:280:in `block in transaction'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.1/lib/active_record/connection_adapters/abstract/transaction.rb:280:in `block in within_new_transaction'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.3.1/lib/active_support/concurrency/load_interlock_aware_monitor.rb:26:in `block (2 levels) in synchronize'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.3.1/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `handle_interrupt'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.3.1/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `block in synchronize'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.3.1/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `handle_interrupt'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.3.1/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `synchronize'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.1/lib/active_record/connection_adapters/abstract/transaction.rb:278:in `within_new_transaction'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.1/lib/active_record/connection_adapters/abstract/database_statements.rb:280:in `transaction'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.1/lib/active_record/transactions.rb:212:in `transaction'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.1/lib/active_record/migration.rb:1361:in `ddl_transaction'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.1/lib/active_record/migration.rb:1309:in `execute_migration_in_transaction'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.1/lib/active_record/migration.rb:1281:in `block in migrate_without_lock'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.1/lib/active_record/migration.rb:1280:in `each'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.1/lib/active_record/migration.rb:1280:in `migrate_without_lock'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.1/lib/active_record/migration.rb:1229:in `block in migrate'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.1/lib/active_record/migration.rb:1382:in `with_advisory_lock'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.1/lib/active_record/migration.rb:1229:in `migrate'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.1/lib/active_record/migration.rb:1061:in `up'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.1/lib/active_record/migration.rb:1036:in `migrate'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.1/lib/active_record/tasks/database_tasks.rb:238:in `migrate'
/var/www/discourse/lib/tasks/db.rake:209:in `block in <main>'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/rake-13.0.1/exe/rake:27:in `<top (required)>'
Tasks: TOP => db:migrate
(See full trace by running task with --trace)

[2020-07-01 13:38:17] lib/discourse.rb:100:in `execute_command'
lib/discourse.rb:90:in `exec'
lib/discourse.rb:40:in `execute_command'
/var/www/discourse/lib/backup_restore/database_restorer.rb:141:in `migrate_database'
/var/www/discourse/lib/backup_restore/database_restorer.rb:27:in `restore'
/var/www/discourse/lib/backup_restore/restorer.rb:49:in `run'
/var/www/discourse/lib/backup_restore.rb:188:in `block in start!'
/var/www/discourse/lib/backup_restore.rb:185:in `fork'
/var/www/discourse/lib/backup_restore.rb:185:in `start!'
/var/www/discourse/lib/backup_restore.rb:30:in `restore!'
/var/www/discourse/app/controllers/admin/backups_controller.rb:119:in `restore'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/actionpack-6.0.3.1/lib/action_controller/metal/basic_implicit_render.rb:6:in `send_action'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/actionpack-6.0.3.1/lib/abstract_controller/base.rb:195:in `process_action'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/actionpack-6.0.3.1/lib/action_controller/metal/rendering.rb:30:in `process_action'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/actionpack-6.0.3.1/lib/abstract_controller/callbacks.rb:42:in `block in process_action'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.3.1/lib/active_support/callbacks.rb:135:in `run_callbacks'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/actionpack-6.0.3.1/lib/abstract_controller/callbacks.rb:41:in `process_action'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/actionpack-6.0.3.1/lib/action_controller/metal/rescue.rb:22:in `process_action'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/actionpack-6.0.3.1/lib/action_controller/metal/instrumentation.rb:33:in `block in process_action'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.3.1/lib/active_support/notifications.rb:180:in `block in instrument'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.3.1/lib/active_support/notifications/instrumenter.rb:24:in `instrument'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.3.1/lib/active_support/notifications.rb:180:in `instrument'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/actionpack-6.0.3.1/lib/action_controller/metal/instrumentation.rb:32:in `process_action'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/actionpack-6.0.3.1/lib/action_controller/metal/params_wrapper.rb:245:in `process_action'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/activerecord-6.0.3.1/lib/active_record/railties/controller_runtime.rb:27:in `process_action'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/actionpack-6.0.3.1/lib/abstract_controller/base.rb:136:in `process'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/actionview-6.0.3.1/lib/action_view/rendering.rb:39:in `process'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/rack-mini-profiler-2.0.2/lib/mini_profiler/profiling_methods.rb:104:in `block in profile_method'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/actionpack-6.0.3.1/lib/action_controller/metal.rb:190:in `dispatch'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/actionpack-6.0.3.1/lib/action_controller/metal.rb:254:in `dispatch'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/actionpack-6.0.3.1/lib/action_dispatch/routing/route_set.rb:50:in `dispatch'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/actionpack-6.0.3.1/lib/action_dispatch/routing/route_set.rb:33:in `serve'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/actionpack-6.0.3.1/lib/action_dispatch/routing/mapper.rb:18:in `block in <class:Constraints>'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/actionpack-6.0.3.1/lib/action_dispatch/routing/mapper.rb:48:in `serve'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/actionpack-6.0.3.1/lib/action_dispatch/journey/router.rb:49:in `block in serve'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/actionpack-6.0.3.1/lib/action_dispatch/journey/router.rb:32:in `each'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/actionpack-6.0.3.1/lib/action_dispatch/journey/router.rb:32:in `serve'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/actionpack-6.0.3.1/lib/action_dispatch/routing/route_set.rb:834:in `call'
/var/www/discourse/lib/middleware/omniauth_bypass_middleware.rb:68:in `call'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/rack-2.2.2/lib/rack/tempfile_reaper.rb:15:in `call'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/rack-2.2.2/lib/rack/conditional_get.rb:40:in `call'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/rack-2.2.2/lib/rack/head.rb:12:in `call'
/var/www/discourse/lib/content_security_policy/middleware.rb:12:in `call'
/var/www/discourse/lib/middleware/anonymous_cache.rb:318:in `call'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/rack-2.2.2/lib/rack/session/abstract/id.rb:266:in `context'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/rack-2.2.2/lib/rack/session/abstract/id.rb:260:in `call'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/actionpack-6.0.3.1/lib/action_dispatch/middleware/cookies.rb:648:in `call'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/actionpack-6.0.3.1/lib/action_dispatch/middleware/callbacks.rb:27:in `block in call'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/activesupport-6.0.3.1/lib/active_support/callbacks.rb:101:in `run_callbacks'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/actionpack-6.0.3.1/lib/action_dispatch/middleware/callbacks.rb:26:in `call'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/actionpack-6.0.3.1/lib/action_dispatch/middleware/actionable_exceptions.rb:17:in `call'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/actionpack-6.0.3.1/lib/action_dispatch/middleware/debug_exceptions.rb:32:in `call'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/actionpack-6.0.3.1/lib/action_dispatch/middleware/show_exceptions.rb:33:in `call'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/logster-2.9.0/lib/logster/middleware/reporter.rb:43:in `call'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/railties-6.0.3.1/lib/rails/rack/logger.rb:37:in `call_app'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/railties-6.0.3.1/lib/rails/rack/logger.rb:28:in `call'
/var/www/discourse/config/initializers/100-quiet_logger.rb:19:in `call'
/var/www/discourse/config/initializers/100-silence_logger.rb:31:in `call'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/actionpack-6.0.3.1/lib/action_dispatch/middleware/remote_ip.rb:81:in `call'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/actionpack-6.0.3.1/lib/action_dispatch/middleware/request_id.rb:27:in `call'
/var/www/discourse/lib/middleware/enforce_hostname.rb:22:in `call'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/rack-2.2.2/lib/rack/method_override.rb:24:in `call'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/actionpack-6.0.3.1/lib/action_dispatch/middleware/executor.rb:14:in `call'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/rack-2.2.2/lib/rack/sendfile.rb:110:in `call'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/actionpack-6.0.3.1/lib/action_dispatch/middleware/host_authorization.rb:76:in `call'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/rack-mini-profiler-2.0.2/lib/mini_profiler/profiler.rb:312:in `call'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/message_bus-3.3.1/lib/message_bus/rack/middleware.rb:61:in `call'
/var/www/discourse/lib/middleware/request_tracker.rb:176:in `call'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/railties-6.0.3.1/lib/rails/engine.rb:527:in `call'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/railties-6.0.3.1/lib/rails/railtie.rb:190:in `public_send'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/railties-6.0.3.1/lib/rails/railtie.rb:190:in `method_missing'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/rack-2.2.2/lib/rack/urlmap.rb:74:in `block in call'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/rack-2.2.2/lib/rack/urlmap.rb:58:in `each'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/rack-2.2.2/lib/rack/urlmap.rb:58:in `call'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/unicorn-5.5.5/lib/unicorn/http_server.rb:605:in `process_client'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/unicorn-5.5.5/lib/unicorn/http_server.rb:701:in `worker_loop'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/unicorn-5.5.5/lib/unicorn/http_server.rb:548:in `spawn_missing_workers'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/unicorn-5.5.5/lib/unicorn/http_server.rb:144:in `start'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/unicorn-5.5.5/bin/unicorn:128:in `<top (required)>'
/var/www/discourse/vendor/bundle/ruby/2.6.0/bin/unicorn:23:in `load'
/var/www/discourse/vendor/bundle/ruby/2.6.0/bin/unicorn:23:in `<main>'
[2020-07-01 13:38:17] Trying to rollback...
1 Like

No one knows why this is happening?

That error comes from the custom ratings plugin. Remove the plugin and try again.

3 Likes

Yes, we’re working on fixing this one.

Thanks Rafael. I removed the plugin. Rebuilt the app. Fails still. How can I completely clear anything this plugin has done to the database?

```
[2020-07-02 11:22:07] ALTER TABLE
[2020-07-02 11:22:07] Migrating the database...
[2020-07-02 11:22:48] EXCEPTION: lib/discourse.rb:90:in `exec': Failed to migrate database.
rake aborted!
StandardError: An error has occurred, this and all later migrations canceled:

undefined method `to_i' for ["1", "1"]:Array
/var/www/discourse/plugins/discourse-ratings/lib/ratings/rating.rb:16:in `initialize'
/var/www/discourse/plugins/discourse-ratings/lib/ratings/rating.rb:140:in `new'
/var/www/discourse/plugins/discourse-ratings/lib/ratings/rating.rb:140:in `block in build_list'
/var/www/discourse/plugins/discourse-ratings/lib/ratings/rating.rb:139:in `map'
```

Do I just completely delete the folder where it was at? Where would I find that folder as theres nothing there for /var/www/discourse just /var/discourse but no plugins folder after.

It was on Ubuntu 16

Thanks. Do you know how to completely remove it for now? I need to move my server and its stopping me from doing so. Removing from app.yml and ./launcher app rebuild doesnt help.

There’s nothing else to do. Can you check your app.yml again. I think it might not have saved properly.

Yeah its saved properly. And its not showing anywhere in the plugins. Ive rebuilt it 2 times and still fails with same error on restore to new server.

Can you paste that portion of the file here?

I dont know where to find the plugin folder itself in the server so not sure if its deleted from there.

1 Like
hooks:
  after_code:
    - exec:
        cd: $home/plugins
        cmd:
          - git clone https://github.com/discourse/docker_manager.git
          - git clone https://github.com/angusmcleod/discourse-topic-previews.git
          - git clone https://github.com/discourse/discourse-push-notifications.git
          - git clone https://github.com/communiteq/discourse-sitemap.git
          - git clone https://github.com/discourse/discourse-adplugin.git
          - git clone https://github.com/paviliondev/discourse-follow.git

## Any custom commands to run after building
run:
1 Like

This should literally be enough. Are you running ./launcher rebuild app?

Yeah Ive done it twice and done backups and each time when I go to restore on the new server same error.

1 Like

Did you also remove it from the new server?

2 Likes

Yes I updated both app.yml. I dont remember if I rebuilt it there before the restore. Let me try that again on that one. It will take a bit to test tho. Thanks.

1 Like

You might consider posting the output of:

docker ps

… just to confirm that a new version of your app.yml is actually running.

Thanks guys. I seem to have got farther this time. However a few issues. My theme is set to dark as default and its not on the site now. If I login it shows dark is selected but its not showing.

Message saying all outgoing email has been globally disabled is showing. So is it still running in the background somewhere or do i need to rebuild app again? Not all photos are showing also.

1 Like