Laravel eloquent 查询 Yahoo Finance 的 PostgreSQL 数据库

Laravel eloquent query to PostgreSQL DB for Yahoo Finance

在我的应用程序中,我使用 torann/currency 获取雅虎财经汇率。当使用他们的官方 documentation 添加和更新货币时,在本地开发环境中完美运行,为此使用 MySQL。 App部署到Heroku,DB环境为PostgreSQL。因此,当我尝试使用 php artisan currency:manage add USD 时,出现以下错误:invalid input syntax for integer

table 的数据库模式是:

Schema::create($this->table_name, function ($table) {
            $table->increments('id')->unsigned();
            $table->string('name');
            $table->string('code', 10)->index();
            $table->string('symbol', 25);
            $table->string('format', 50);
            $table->string('exchange_rate');
            $table->boolean('active')->default(false);
            $table->timestamps();
        });

能想到的我都试过了;尝试更改模式中的所有类型,尝试更改蓝图等。但要么我得到一些不同类型的错误,要么我回到了我开始的地方。猜测我缺乏postgres知识是主要问题,最终我会学习它,虽然我希望有人知道我的问题的答案。

这是包的数据库驱动程序中的 bug,它假定 non-strict SQL 行为。