【发布时间】:2017-05-30 08:47:34
【问题描述】:
在我的应用中,我使用 torann/currency 来获取 Yahoo Finance 汇率。当使用他们的官方documentation 添加和更新货币时,在使用 MySQL 的本地开发 ENV 中完美运行。
应用部署到 Heroku,数据库环境是 PostgreSQL。因此,当我尝试使用 php artisan currency:manage add USD 时,出现以下错误:invalid input syntax for integer
该表的数据库架构是:
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 知识是主要问题,最终我会学习它,尽管我希望有人会知道我的问题的答案。
【问题讨论】:
标签: postgresql laravel heroku yahoo-finance heroku-postgres