gpt4 book ai didi

sql - PGError : ERROR: column "is_required" is of type boolean but expression is of type integer

转载 作者:行者123 更新时间:2023-11-29 12:22:39 24 4
gpt4 key购买 nike

我正在尝试对 Heroku 执行 db:push,但出现此错误:

!!! Caught Server Exception
HTTP CODE: 500
Taps Server Error: PGError: ERROR: column "is_required" is of type boolean but expression is of type integer
LINE 1: ..." ("id", "question_id", "text", "response_class", "is_requir...
^
HINT: You will need to rewrite or cast the expression.

我正在从本地数据库(sqlite)推送到 Heroku 的 PostgreSQL 数据库。

is_required 列使用 t.boolean "is_required", :default => false 设置为 bool 值。

不确定在这里做什么。

最佳答案

在 pgAdmin 中玩转;看起来 postgres 更喜欢 't''f' 形式的默认值。不过,我没有安装 ruby​​ 来试用它。

关于sql - PGError : ERROR: column "is_required" is of type boolean but expression is of type integer,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7947814/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com