Ask Your Question
1

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

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

Nikhil gravatar image

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

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?

Thanks

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
1

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

apg gravatar image

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
0

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

JStarcher gravatar image

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

Stats

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

Seen: 233 times

Last updated: Jan 05 '14