OwlCyberSecurity - MANAGER
Edit File: 2014_07_02_230147_migration_cartalyst_sentinel.php
<?php /** * Part of the Sentinel package. * * NOTICE OF LICENSE * * Licensed under the 3-clause BSD License. * * This source file is subject to the 3-clause BSD License that is * bundled with this package in the LICENSE file. * * @package Sentinel * @version 2.0.17 * @author Cartalyst LLC * @license BSD License (3-clause) * @copyright (c) 2011-2017, Cartalyst LLC * @link http://cartalyst.com */ use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; class MigrationCartalystSentinel extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('activations', function (Blueprint $table) { $table->increments('id'); $table->integer('user_id')->unsigned(); $table->string('code'); $table->boolean('completed')->default(0); $table->timestamp('completed_at')->nullable(); $table->timestamps(); $table->engine = 'InnoDB'; }); Schema::create('persistences', function (Blueprint $table) { $table->increments('id'); $table->integer('user_id')->unsigned(); $table->string('code'); $table->timestamps(); $table->engine = 'InnoDB'; $table->unique('code'); }); Schema::create('reminders', function (Blueprint $table) { $table->increments('id'); $table->integer('user_id')->unsigned(); $table->string('code'); $table->boolean('completed')->default(0); $table->timestamp('completed_at')->nullable(); $table->timestamps(); $table->engine = 'InnoDB'; }); Schema::create('roles', function (Blueprint $table) { $table->increments('id'); $table->string('slug'); $table->string('name'); $table->text('permissions')->nullable(); $table->timestamps(); $table->engine = 'InnoDB'; $table->unique('slug'); }); Schema::create('role_users', function (Blueprint $table) { $table->integer('user_id')->unsigned(); $table->integer('role_id')->unsigned(); $table->nullableTimestamps(); $table->engine = 'InnoDB'; $table->primary(['user_id', 'role_id']); }); Schema::create('throttle', function (Blueprint $table) { $table->increments('id'); $table->integer('user_id')->unsigned()->nullable(); $table->string('type'); $table->string('ip')->nullable(); $table->timestamps(); $table->engine = 'InnoDB'; $table->index('user_id'); }); Schema::create('users', function (Blueprint $table) { $table->increments('id'); $table->string('full_name'); $table->string('email'); $table->string('phone'); $table->string('username')->nullable(); $table->string('password'); $table->string('country')->nullable(); $table->string('state')->nullable(); $table->string('country_code')->nullable(); $table->integer('subscription_id')->nullable(); $table->string('subscription_type')->nullable(); $table->boolean('subscription_status')->nullable(); $table->dateTime('date_subscribed')->nullable(); $table->dateTime('next_due_date')->nullable(); $table->integer('sub_count')->default('0'); $table->integer('premiumSubscriptionID')->nullable(); $table->boolean('premiumSubscriptionStatus')->nullable(); $table->dateTime('premiumDateSubscribed')->nullable(); $table->dateTime('premiumDueDate')->nullable(); $table->integer('premiumSubCount')->default('0'); $table->integer('superSubscriptionID')->nullable(); $table->boolean('superSubscriptionStatus')->nullable(); $table->dateTime('superDateSubscribed')->nullable(); $table->dateTime('superDueDate')->nullable(); $table->integer('superSubCount')->default('0'); $table->integer('htftSubscriptionID')->nullable(); $table->boolean('htftSubscriptionStatus')->nullable(); $table->dateTime('htftDateSubscribed')->nullable(); $table->dateTime('htftDueDate')->nullable(); $table->integer('htftSubCount')->default('0'); $table->integer('megaSubscriptionID')->nullable(); $table->boolean('megaSubscriptionStatus')->nullable(); $table->dateTime('megaDateSubscribed')->nullable(); $table->dateTime('megaDueDate')->nullable(); $table->integer('megaSubCount')->default('0'); $table->integer('midweekSubscriptionID')->nullable(); $table->boolean('midweekSubscriptionStatus')->nullable(); $table->dateTime('midweekDateSubscribed')->nullable(); $table->dateTime('midweekDueDate')->nullable(); $table->integer('midweekSubCount')->default('0'); $table->dateTime('dateGift')->nullable(); $table->string('account_type')->nullable(); $table->boolean('status')->default('0'); $table->boolean('flag')->default('0'); $table->boolean('other')->default('0'); $table->boolean('newsletterConfirm')->default('0'); $table->string('provider')->nullable(); $table->string('provider_id')->nullable(); $table->string('avatar')->nullable(); $table->string('passport')->nullable(); $table->text('permissions')->nullable(); $table->timestamp('last_login')->nullable(); $table->timestamps(); $table->engine = 'InnoDB'; $table->unique('email'); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::drop('activations'); Schema::drop('persistences'); Schema::drop('reminders'); Schema::drop('roles'); Schema::drop('role_users'); Schema::drop('throttle'); Schema::drop('users'); } }