Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save sirawitpra/2730749aadb3c8604b21b70d09e2a5e7 to your computer and use it in GitHub Desktop.
Save sirawitpra/2730749aadb3c8604b21b70d09e2a5e7 to your computer and use it in GitHub Desktop.
Export database schema from sequel pro
<?php
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 CreateUsersTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('users', function (Blueprint $table) {
$table->increments('id');
$table->string('email', 255);
$table->string('avatar', 255);
$table->rememberToken();
$table->tinyInteger('is_logged_in');
$table->enum('status', ['active', 'deactivated'])->default('active');
$table->timestamps();
$table->unique('email', 'users_email_unique');
$table->index('created_at', 'users_created_at_index');
$table->index('updated_at', 'users_updated_at_index');
$table->index('status', 'users_status_index');
$table->index('is_logged_in', 'users_is_logged_in_index');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('users');
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment