PG::ReadOnlySqlTransaction: 错误:无法在只读事务中执行 SELECT

我想通过在数据浏览器中运行查询并将 closed 字段设置为 true 来关闭一些旧主题。但似乎即使拥有 管理员 权限,我也无法修改数据。有没有办法可以在不逐个手动关闭这些主题的情况下完成此操作?

系统总是报错:PG::ReadOnlySqlTransaction: ERROR: 无法在只读事务中执行 SELECT

That’s why it’s called data explorer and not the data modifier :slight_smile:

5 个赞

HI @RGJ,

Thanks for you response :slight_smile:

Is there any way I can accomplish this ?

I haven’t used it yet but if for running direct SQL queries I believe this is what you’re looking for! —

You can do it from the rails console. There are some howto topics for doing mass changes to various settings.

2 个赞