Cachet/database/migrations/2015_01_05_203235_CreateSubscribersTable.php

45 lines
1019 B
PHP
Raw Normal View History

2015-01-04 20:56:10 +00:00
<?php
/*
* This file is part of Cachet.
*
2015-05-25 17:59:08 +01:00
* (c) Cachet HQ <support@cachethq.io>
*
* 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) {
$table->engine = 'InnoDB';
2015-01-04 20:56:10 +00:00
$table->increments('id');
$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
}
}