Skip to content

Instantly share code, notes, and snippets.

@agarwa13
Last active November 5, 2015 02:36
Show Gist options
  • Save agarwa13/7d7e84824370ce1f3893 to your computer and use it in GitHub Desktop.
Save agarwa13/7d7e84824370ce1f3893 to your computer and use it in GitHub Desktop.
Laravel 5.1 Migration that creates a table where we will store email addresses that have bounced or complained.
<?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateBadEmails extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('problem_emails', function (Blueprint $table) {
$table->increments('id');
$table->string('email_address');
$table->integer('bounced')->default(0);
$table->integer('complained')->default(0);
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('problem_emails');
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment