Export from Sequel Pro to a Laravel Migration

Export from Sequel Pro to a Laravel Migration

The two primary ways developers create their database scheme is either by building migrations first or building out their database structure in a tool like Sequel Pro first, then once they are happy, create the migrations.

If you are in the second camp and use Sequel Pro, Colin Viebrock created a Laravel Migration exporter tool that hooks right into the app.

It works by cloning or downloading the package and then installing by double clicking on the included “ExportToLaravelMigration.spBundle” file.

Next, connect to a database, and select a table in the left-hand column. From the application menu, choose Bundles › Export › Export to Laravel Migration, or use the keyboard shortcut ⌃⌥⌘M (CTRL + OPTION + CMD + M).

Export to Laravel Migrations

Here is an example of a migration it created for a category table:


use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

 * Migration auto-generated by Sequel Pro Laravel Export
 * @see https://github.com/cviebrock/sequel-pro-laravel-export
class CreateCategoriesTable extends Migration
     * Run the migrations.
     * @return void
    public function up()
        Schema::create('categories', function (Blueprint $table) {
            $table->string('name', 255);
            $table->string('slug', 255);

            $table->unique('slug', 'categories_slug_unique');

     * Reverse the migrations.
     * @return void
    public function down()

The migration file will then be saved to your desktop, and you can move it to your projects migrations directory, so it’s ready to be used through the Artisan command.

Download: GitHub
License: MIT

Filed in: Development Tools / Migrations / Sequel Pro


Join the weekly newsletter and never miss out on new tips, tutorials, and more.

Laravel News Partners

Laravel Jobs

Software Engineer Lead (PHP)
CivicPlus, LLC
Full-time Senior Web Developer
Detroit, MI
Wayne State University
Senior Software Engineer
Sydney, Australia
Full Stack Engineer
Remote or Medford, Oregon
Empire Medical
Laravel Developer (fulltime - Dutch only)
Qbixx | Webservices
Full Stack or Back-End Developer
Alexandria, VA; Tallahassee, FL; Orlando, FL
Marketing for Change
Senior Quality Assurance Engineer
Bisnow Media