重建失败(列 directory_columns.type 不存在)

你好,

我刚才尝试重新构建,但失败了,错误如下:

I, [2021-06-22T21:57:12.240614 #1] INFO – : > cd /var/www/discourse && su discourse -c ‘bundle exec rake db:migrate’

2021-06-22 21:57:15.052 UTC [3862] discourse@discourse ERROR: column directory_columns.type does not exist at character 66

2021-06-22 21:57:15.052 UTC [3862] discourse@discourse STATEMENT: SELECT "directory_columns"."name" FROM "directory_columns" WHERE "directory_columns"."type" IN (0, 2) AND "directory_columns"."enabled" = TRUE

** 插件失败 **

由于插件初始化期间出现此错误,您无法构建 Discourse:

PG::UndefinedColumn: ERROR: column directory_columns.type does not exist

LINE 1: ...ry_columns"."name" FROM "directory_columns" WHERE "directory...

我认为这与 Solved 插件的这个提交有关:

我不确定这是否是插件兼容性问题,因为在 Meta 站点上它工作正常。

我使用了以下插件:

      - https://github.com/discourse/discourse-solved.git
      - https://github.com/jannolii/discourse-topic-trade-buttons.git
      - https://github.com/discourse/discourse-whos-online.git
      - https://github.com/discourse/discourse-adplugin.git
      - https://github.com/paviliondev/discourse-follow.git
      - https://github.com/discourse/discourse-cakeday.git
      - https://github.com/paviliondev/discourse-locations.git
      - https://github.com/discourse/discourse-docs.git
      - https://github.com/paviliondev/discourse-pm-topic-author.git
      - https://github.com/discourse/discourse-reactions.git

更新:我尝试逐个注释掉插件。我认为我找到问题了。如果注释掉 Discourse Locations 插件,重新构建就能成功运行。

1 个赞

Robert 已在 Locations Plugin 主题中分享了针对此问题的解决方案,因此我认为可以关闭本主题。谢谢!:slight_smile:

1 个赞