开发者

"0 tables, 0 records" after pushing a non-empty sqlite database to Heroku

I created a small sqlite database on my laptop and it has several records:

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); 
... 

But when I try to upload it to Heroku, the result is "0 tables, 0 records":

$ 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

Someone submitted to StackOverflow.com that he succeed in uploading a sqlite database to Heroku by converting it to a开发者_运维问答 schema.rb file, but I don't know how to do this (I have experience only with Sinatra and DataMapper).


Let's start with some sanity checks. Can you print out the actual value of the "schema" variable as received by Heroku?


My bad: I was pushing to the wrong refspec. The correct refspec for Heroku (at least for me) is +HEAD:refs/heads/master.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜