G
G
Glory2021-10-25 12:50:40
Laravel
Glory, 2021-10-25 12:50:40

What tool will allow you to create migration files from the mysql database?

in a project under 1000 migrations. and the tables themselves are about 70. I would like each table to have one migration (for now). How would you find a tool that would allow you to create migration files for each table from the contents of the database so that you can then bang old migrations and use new ones where all fields and keys are added through one file.

We do not need to do any kickbacks yet. So we can afford it.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
D
Dmitry Bay, 2021-10-25
@kawabanga

Have you read the documentation?
https://laravel.com/docs/8.x/migrations#squashing-...

A
Alexander Aksentiev, 2021-10-25
@Sanasol

Just dump the database and put it in the project, it is not necessary to put it in the migration.
Well, or a dump from the migration can then simply be run through DB::unprepared.

N
nokimaro, 2021-10-29
@nokimaro

I tried it personally - it works, but only mysql can do it
https://github.com/bennett-treptow/laravel-migrati...
what was found in Google (more stars on github than the first tool) can do mysql/postgresql
https:// github.com/kitloong/laravel-migrations-gen...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question