Skip to contentSkip to conversation

Tracking database changes.

DISCUSSION Victor Engmark 2 participants 2 messages Jun 15, 2016 1 message not in the archive

lore
Share & tools
lore
#1 lore raw
In reply to a message not in the archive
Quoted 1 line · Rodrigo Cortés

Is there a way to use git to track database changes?

1. Export the data and/or data model with a tool like mysqldump.
2. Remove output which would clutter up your diffs without adding any useful information. This could include things like date and time of the export and user name of the exporter.
3. Commit and enjoy!

Optionally create a cron job to export and commit automatically during off-peak hours.

Cheers,
Victor

Signature · 8 lines
terreActive AG
Kasinostrasse 30
CH-5001 Aarau
Tel: +41 62 834 00 55
Fax: +41 62 823 93 56
www.terreactive.ch

Wir sichern Ihren Erfolg - seit 15 Jahren
#2 lore raw

So... there is no "plugin" for git to do that work.

Quoted 25 lines · Victor Engmark
Quoted 1 line · Rodrigo Cortés

Is there a way to use git to track database changes?

1. Export the data and/or data model with a tool like mysqldump.
2. Remove output which would clutter up your diffs without adding any useful information. This could include things like date and time of the export and user name of the exporter.
3. Commit and enjoy!

Optionally create a cron job to export and commit automatically during off-peak hours.

Cheers,
Victor

--
terreActive AG
Kasinostrasse 30
CH-5001 Aarau
Tel: +41 62 834 00 55
Fax: +41 62 823 93 56
www.terreactive.ch

Wir sichern Ihren Erfolg - seit 15 Jahren

Signature · 3 lines
Rodrigo Cortés Carvajal
Ingeniería Eléctrica
Universidad Tecnológica de Chile