Skip to content

Instantly share code, notes, and snippets.

@oilop9000
oilop9000 / DbmigrateController.php
Last active August 5, 2020 20:05 — forked from bruceoutdoors/DbmigrateController.php
Laravel 4 Convert existing MySQL database to migrations. This is a fork of Lee Zhen Yong https://gist.github.com/bruceoutdoors/9166186 fork from Christopher Pitt's work http://laravelsnippets.com/snippets/convert-an-existing-mysql-database-to-migrations, which is based off michaeljcalkins's work at http://paste.laravel.com/1jdw#sthash.0nEgQzQR.dpuf
<?php
/* * **
*
* This script converts an existing MySQL database to migrations in Laravel 4.
*
* 1. Place this file inside app/controllers/
*
* 2. In this file, edit the index() method to customize this script to your needs.
* - inside $migrate->ignore(), you pass in an array of table