Does any database support revision control on its command line interface?

So for example, I am in the mysql> command prompt. I am likely to give a column to some table. I type ALTER TABLE X ADD COLUMN Y bigint and so the database prompts me: "OK. Check these alterations in using git?" I respond yes, also it prints the revision number for that schema.

(No requirement for a mysqldump to obtain the schema, getting rid of the information, and checkin in the party command line.)

At another time, I choose to sign in all my data too. And So I type something similar to CHECKIN SNAPSHOT TABLE X

Appears just like a good sense method of me, but has anybody modified a database to aid such behavior?

Thanks

Well, to begin with, checking in a single table will not make any sense its a relational database for any reason you cannot just roll back one table to some previous condition and expect that to become OK.

Rather, you are able to roll back the whole database to some previous condition. The database world refers to this as "time recovery" and it can be done in MySQL with a mix of a complete backup and replication logs.

I've no clue why you would store your backup copies in git.

What you are searching In my opinion are "migrations". These are typically done in the code level instead of in the database level. Rails supports migrations, Django does with South, I am sure there's others available too.

These migrations are simply code files (in both the programming language of preference, or sql scripts) that may be checked in.

The typical situation is Schema migrations that do not migrate data however, many (most?) permit you to write custom code to do this if you want.

In most cases you wouldn't like to version control data, but you will find exceptions when a few of the information is area of the logic, however, you generally wish to separate the kind of data that you simply consider area of the functionality including parts you don't.

If you wish to store everything, that's just known as copying. Individuals generally avoid into version control just due to the dimensions. Either it's inside a binary format that does not diff well, or it's many occasions bigger than it must be inside a text format. If you want to diff the information, you will find tools for your too.