2015-01-04 20:56:10 +00:00
|
|
|
<?php
|
|
|
|
|
2015-04-19 08:52:39 +01:00
|
|
|
/*
|
|
|
|
* This file is part of Cachet.
|
|
|
|
*
|
2015-05-25 17:59:08 +01:00
|
|
|
* (c) Cachet HQ <support@cachethq.io>
|
2015-04-19 08:52:39 +01:00
|
|
|
*
|
|
|
|
* For the full copyright and license information, please view the LICENSE
|
|
|
|
* file that was distributed with this source code.
|
|
|
|
*/
|
|
|
|
|
2015-01-04 20:56:10 +00:00
|
|
|
use Illuminate\Database\Migrations\Migration;
|
|
|
|
use Illuminate\Database\Schema\Blueprint;
|
|
|
|
use Illuminate\Support\Facades\Schema;
|
|
|
|
|
2015-05-24 16:33:03 -05:00
|
|
|
class CreateSubscribersTable extends Migration
|
2015-01-04 20:56:10 +00:00
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Run the migrations.
|
|
|
|
*/
|
|
|
|
public function up()
|
|
|
|
{
|
2015-05-24 16:33:03 -05:00
|
|
|
Schema::create('subscribers', function (Blueprint $table) {
|
2015-06-30 09:53:29 -05:00
|
|
|
$table->engine = 'InnoDB';
|
|
|
|
|
2015-01-04 20:56:10 +00:00
|
|
|
$table->increments('id');
|
2015-01-05 20:38:06 +00:00
|
|
|
$table->string('email');
|
2015-05-24 16:33:03 -05:00
|
|
|
$table->string('verify_code');
|
|
|
|
$table->timestamp('verified_at')->nullable();
|
2015-01-04 20:56:10 +00:00
|
|
|
$table->timestamps();
|
|
|
|
$table->softDeletes();
|
2015-05-24 16:33:03 -05:00
|
|
|
|
|
|
|
$table->unique(['email']);
|
2015-01-04 20:56:10 +00:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Reverse the migrations.
|
|
|
|
*/
|
|
|
|
public function down()
|
|
|
|
{
|
2015-05-24 16:33:03 -05:00
|
|
|
Schema::drop('subscribers');
|
2015-01-04 20:56:10 +00:00
|
|
|
}
|
|
|
|
}
|