将非空的sqlite数据库推送到Heroku后,“0表,0记录”

时间:2010-08-11 19:55:54

标签: sqlite heroku push

我在笔记本电脑上创建了一个小的sqlite数据库,它有几条记录:

sqlite> .dump 
PRAGMA foreign_keys=OFF; 
BEGIN TRANSACTION; 
CREATE TABLE "bus_bingo_tile_templates" ("id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, "title" VARCHAR(50), "alt" VARCHAR(50), "image_filename" VARCHAR(50), "enabled" BOOLEAN); 
INSERT INTO "bus_bingo_tile_templates" VALUES(26,'bed','I took a nap.','nap.gif',1); 
INSERT INTO "bus_bingo_tile_templates" VALUES(27,'bicyle','Saw someone put a bike on the bus..','bike.gif',1); 
INSERT INTO "bus_bingo_tile_templates" VALUES(28,'books','I read a book.','book.gif',1); 
... 

但是当我尝试将其上传到Heroku时,结果是“0表,0条记录”:

$ heroku db:push sqlite:busbingo.db 
Loaded Taps v0.3.11 
Warning: Data in the app 'busbingo' will be overwritten and will not be recoverable. 
Are you sure you wish to continue? (y/n)? y 
Sending schema 
Schema: 100% |==================================================================================| Time: 00:00:00 
Sending data 
0 tables, 0 records 
Resetting sequences

有人向StackOverflow.com提交说,他成功将sqlite数据库上传到Heroku,将其转换为schema.rb文件,但我不知道如何做到这一点(我只有Sinatra和DataMapper经验)。

2 个答案:

答案 0 :(得分:0)

让我们从一些健全性检查开始。你能打印出Heroku收到的“schema”变量的实际值吗?

答案 1 :(得分:0)

我的坏:我正在向错误的refspec推进。 Heroku的正确refspec(至少对我而言)是+ HEAD:refs / heads / master。