How can I port my Sqlite database up to GAE?

2019-02-19 11:17发布

I have a database in SQLite format in my local HD. I would like to get the database up to GAE so that I can use it to create certain cool web-apps. I have browsed around for a way to do it. However, mostly the projects available are to backup the database in GAE to my local HD. Is there an existing way to get the local Sqlite db up to GAE already?

2条回答
可以哭但决不认输i
2楼-- · 2019-02-19 11:36

There is no way that you can do it directly on appengine, as writing to a file is restricted in appengine . I would say, you should export your sqlite database file to some common format like csv , design the model similar to sqlite table schema. Then write a script to load all those sqlite records into dev_sever (development env included in sdk), Then you can easily upload the data from local developement server to google appengine. Have a look at this to know how to export development server data to appengine.

查看更多
贼婆χ
3楼-- · 2019-02-19 11:40

You can do this with the Google Cloud Storage service (https://developers.google.com/storage/). Your application can read write to files stored in the Google cloud storage, so it is possible to put sqlite files there and read from and write to them.

查看更多
登录 后发表回答