Live data from Hacker News

Show HN: Stellar – Git for PostreSQL and MySQL

github.com

71–79 of 79 posts

Re: Show HN: Stellar – Git for PostreSQL and MySQL

#72

From the code: INSERT INTO %s.%s SELECT * FROM %s.%s Yeah, good luck with that.

What's wrong with that? Assuming you escape the table names correctly, that seems reasonable. And if you can't escape the table names, you're going to have a hard time dynamically generating queries anyway. Parameterized queries are a baseline requirement for values , but are rarely supported by client libraries for things like table or schema names.

Nothing wrong with the syntax, it's just that if you're going to create an entire mirror of your database, you might as well use mysqldump. (Plus it'll actually be portable).

Re: Show HN: Stellar – Git for PostreSQL and MySQL

#73

Generally the hardest thing with version control on a database (for an evolving codebase) is separating unrelated changes - such as schema changes vs content updates - and branching and merging those changes in sync with the code dependencies. Another issue is non-destructively replaying development changes into test/production environments. So for example, you might have a feature branch that includes some schema ch…

I'd love a tool that solves that problem. Schema / data / user / permission migrations, support for both production and development environments and integration with CM tools like ansible would be fantastic.

Re: Show HN: Stellar – Git for PostreSQL and MySQL

#75
post #53

Earlier quoted context omitted.

I would disagree that referential integrity and schemas are the only issues a DB version control should focus on. For example, I would be very interested in having git like branching on top of something like this - http://sandbox.substance.io/docs/lorem_ipsum.json . Basically version controlled schemaless object tree. I recently implemented something like this, backed by mongodb, and by exposing a HTTP api which mimi…

You can implement a change DAG for a DB inside the DB. It works pretty well.

What is a change DAG?

Re: Show HN: Stellar – Git for PostreSQL and MySQL

#76
post #51

Earlier quoted context omitted.

This sounds like something Sqitch would help with. http://sqitch.org

FWIW, I found shmig [1] much simpler than sqitch. Last I used sqitch, it returned a zero value on error, which made me leery of using it for scripted deployments. [1] https://github.com/naquad/shmig

Please file a bug report. https://github.com/theory/sqitch/issues.

Re: Show HN: Stellar – Git for PostreSQL and MySQL

#78
post #67

Earlier quoted context omitted.

There are only like 700 lines of Python code. Figure it out and submit a pull request to update the README.

So it's yet another toy project with grandiose, overblown claims ("git for databases"? seriously?!) An honest update to the README would be to take the whole thing down several notches, if nothing else then to avoid the kind of confusion the post you're replying to expresses.

I really don't think we have to get so worked up about that kind of thing. If you don't like it, just ignore it.

Re: Show HN: Stellar – Git for PostreSQL and MySQL

#79
post #66

Earlier quoted context omitted.

Why not use a binary backup method? Faster to backup and restore.

Agreed. I've been successfully using mylvmbackup on 10gb+ databases for a few years now. http://www.lenzg.net/mylvmbackup/

We use our own lvm solution at work, works great, we do something like pgsnap to swap to the snapshot or pgsnap master to work on the master. I'll check this out.
Post reply on HN