Ask Your Question

How to keep the Askbot database and it's contents in sync using GIT

asked 2013-11-27 01:34:00 -0500

Nikhil's avatar

updated 2013-11-27 01:41:16 -0500

I have setup a git repository and cloned askbot code from github to start development. I committed the codebase in our repository. I now have customized askbot using live settings and added few users and posts.

I want to commit this change as well so that my teammate can check out and we have same settings and database throughout.

I want to sync our databases so that not only the schema but its contents is same throughout. How do I do this?


edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2014-01-05 10:49:12 -0500

apg's avatar

If you rather want to use PostgreSQL instead of SQLite, then I think you can use hooks to run pg_dump and pg_restore to achieve the same thing.
I admit this is a bit more complicated than JSarcher suggested.
However, it may be handy, for example, if you happen to use PostgreSQL in production and you want to use PostgreSQL in development as well.

edit flag offensive delete link more

answered 2013-12-09 23:56:47 -0500

JStarcher's avatar

This is possible using SQLite and checking the database file into git. I would advise against using thew SQLite database for anything other than development though.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2013-11-27 01:34:00 -0500

Seen: 332 times

Last updated: Jan 05 '14