X
X
xSkyFoXx2012-08-20 17:20:55
Database
xSkyFoXx, 2012-08-20 17:20:55

How to organize the storage of the latest changes in the project database?

We are 3 groups and together we are making some changes in the database of our project. Changes are rarely made. Nothing is deleted, but only tables and columns are added to existing ones. But still the problem is to somehow track the changes. I just can't figure out how to do it in a convenient way.
Tried through a file in a turnip, but it is absolutely inconvenient. And how do you solve this problem? Maybe there are some more convenient means of version control and differentials for the database structure?

Answer the question

In order to leave comments, you need to log in

8 answer(s)
A
avalak, 2012-08-20
@avalak

Use migrations.

S
SergeyGrigorev, 2012-08-20
@SergeyGrigorev

Try CASE tools like Sybase PowerDesigner. We describe the database model and then generate the sql code to create tables (there are functions to update existing databases). And so that everyone was aware of the changes, an alert was hung on the folder with the models. As soon as one of the developers has updated the model, everyone receives an e-mail notification with a description of what has been updated. As a result, we always have a history of changes + a diagram right in front of our eyes.

S
Snowindy, 2012-08-20
@Snowwindy

One of the industry solutions for database migration.
Not ideal, there are some rough edges, it's not convenient to migrate data...
But it's better than without it
www.liquibase.org/

1
1nd1go, 2012-08-20
@1nd1go

code.google.com/p/flyway/ - a good tool, and most importantly the concept of .
In particular, at first we ourselves made files like
01.init_tables.sql
02.add_one_table.sql
03.add_another.JIRA-1251.sql
So we tracked. Flyway does a lot for you, in particular, it creates a metatable where it reflects the changes and shows the current version of the schema.

S
Shedal, 2012-08-20
@Shedal

I once wrote a large fundamental article on this subject, with consideration of different approaches. Check it out if you want: habrahabr.ru/post/121265/

R
RedQuark, 2012-08-20
@RedQuark

My personal bike is based on link . This is much more convenient than one big file plus SVN. You can greatly complicate the bike by adding comments with keys indicating authorship to the scripts, so that it would be played up somehow. But alas, bicycles usually only satisfy the needs of the author.

S
stepio, 2012-08-20
@stepio

1. Break the entire database into separate entities
2. Define the formatting style, for example here:
www.dpriver.com/pp/sqlformat.htm
3. Git

M
MuXaJIbI4, 2012-08-21
@MuXaJIbI4

we use this http://docs.doctrine-project.org/projects/doctrine-migrations/en/latest/reference/introduction.html

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question