如何在Heroku上部署Thingspeak服务器?

时间:2015-10-17 05:38:16

标签: ruby-on-rails

当我尝试在Heroku上部署Thingspeak时,我在下面遇到了一些错误。

== 20101111054358 CreateUsers: migrating ======================================
— create_table(:users)
-> 0.0111s
== 20101111054358 CreateUsers: migrated (0.0124s) =============================
== 20101116224140 CreateApiKeys: migrating ====================================
— create_table(:api_keys)
PG::DatatypeMismatch: ERROR: column “write_flag” is of type boolean but default expression is of type integer
HINT: You will need to rewrite or cast the expression.
: CREATE TABLE “api_keys” (“id” serial primary key, “api_key” character varying(16), “device_id” integer, “feed_id” integer, “user_id” integer, “write_flag” boolean DEFAULT 0, “public_flag” boolean DEFAULT 0, “created_at” timestamp, “updated_at” timestamp)
rake aborted!
class CreateApiKeys < ActiveRecord::Migration
  def self.up
    create_table :api_keys do |t|
      t.string :api_key, :limit => 16
      t.integer :device_id
      t.integer :feed_id
      t.integer :user_id
      t.boolean :write_flag, :default => 0
      t.boolean :public_flag, :default => 0

      t.timestamps
    end
  end

  def self.down
    drop_table :api_keys
  end
end

我甚至通过将“0”更改为“false”来解决此错误,但另一个表上出现了另一个不同的错误......

我无法弄清楚哪里出错了。

我在http://angryelectron.com/how-to-install-a-thingspeak-server/

下载了thingspeak服务器源代码

我不是母语人士所以我会尽力表达我的问题。

0 个答案:

没有答案