後,我在我的筆記本電腦創建了一個小型的SQLite數據庫,它有幾個記錄:「0表中,0記錄」推非空的SQLite數據庫的Heroku
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記錄」:
提交StackOverflow.com$ 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
有人說他通過將其轉換爲schema.rb文件上傳SQLite數據庫到Heroku的成功,但我不不知道怎麼做(我只有Sinatra和DataMapper的經驗)。
謝謝。在下面看到我自己的答案。 – 2010-08-13 05:12:24