Skip to content

This is a simple migration code which is used to convert all specific database tables engine into another engine

Notifications You must be signed in to change notification settings

3assy2018/Laravel-DB-Engine-Converter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

Laravel-DB-Engine-Converter

This problem faced me before so I want to publish an efficient solution to solve this problem.

Some times you clone a database from a server that uses MyISAM for example as MySQL default engine, and after start developing locally, you have been shocked with some unexpected errors that has this solution behind the scene. An example for this is the dealing with relations between MyISAM and InnoDB, this can cause some collisions that could make a headache for you.

So all what you need is to clone the migration files that I have coded into new migration file and excute your migration.

Note: this solution was published before but with static table names wrapped inside array so all what you need to convert specific tables not all tables is to replace this line:

        $dbTables= DB::connection()->getDoctrineSchemaManager()->listTableNames();

with array of tables you want like so:

        $dbTables= [...list_your_tables_here];

About

This is a simple migration code which is used to convert all specific database tables engine into another engine

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages