Last active
November 5, 2015 02:36
-
-
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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