2
Work on a project that system versions are incremented manually on semantic model, usually after a sprint a new version is released when a work is merged with the main branch and passes through the routines of CI. And I only have Javascript and PHP programmers available for this project and the database used is Mysql.
Each development cycle may have generated changes in the database or no changes that may be structural (tables, clunas), logical (functions, triggers, procedures) or data (records in tables).
Aligns software releases with the database has proved to be a real challenge because each client represents a database and must be updated individually and the version control of the database is done through a script differentiating the database structure data along with the INSERT/UPDATE/DELETE commands of the records, as suggested in this question: How to Versize mysql database?.
The main disadvantage of this technique is that it is only possible to advance the version, the rollback is not possible it would be interesting to "return" or "advance" between versions, with possibility of a rollback if the version presents an instability in a particular client.
The expected behavior was the application’s autonomy from updating or regressing the version to apply the necessary changes in the bank. For example, a field has been added or a modified Trigger, the application itself already applies this change according to the update.
In a project where only php programmers were available, and the database is mysql, which framework, tool or methodology is available in the market to create a version of the database along with the application?
He came to see How to Versize mysql database? ?
– rray
Yes, before this automatic tool we used the answer technique https://answall.com/a/188/7130, but it became more expensive than the model that uses software to compare the structure I mentioned in the question. Thanks for reminding, I’ll quote you on the question.
– LeonanCarvalho
What is very common to find is a "Migrator" but they are not in fact version managers, since you cannot perform a rollback in the migration.
– LeonanCarvalho
You can take a look at http://www.liquibase.org/ is an improvement of Migrations
– KhaosDoctor
Take a look at how to use Eloquent without Laravel for your own projects https://siipo.la/blog/how-to-use-eloquent-orm-migrations-outside-laravel (ps: I have not tested)
– Guilherme Nascimento
@Guilhermenascimento If today you were to start a project with these predictable scenarios, having only php programmers available to you, what would be the framework/tool/methodology to use to get around this problem?
– LeonanCarvalho
To be honest I can’t say, however currently I work with PHP database alone, I always try to work in a simpler way, usually model the database on tools like Workbench. But every project and every person has a way of working, sometimes what’s good for me won’t be good for you.
– Guilherme Nascimento
Leo, a rather silly suggestion, would be to maybe save the schema together on your GIT server, I’m not sure, depends a lot on the project.
– Guilherme Nascimento
Show, gave me some ideas here! I will hardly be able to imply something like this in the current project, but I would like to elaborate a better approach to the next projects.
– LeonanCarvalho