This commit is contained in:
Tom K.H. Lin 2018-07-26 19:38:40 +08:00
parent 4122cd1fdd
commit d7f4fc67db
33 changed files with 111 additions and 106 deletions

View File

@ -1,35 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateUsersTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('users', function (Blueprint $table) {
$table->increments('id');
$table->string('name');
$table->string('email')->unique();
$table->string('password');
$table->rememberToken();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('users');
}
}

View File

@ -1,32 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreatePasswordResetsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('password_resets', function (Blueprint $table) {
$table->string('email')->index();
$table->string('token');
$table->timestamp('created_at')->nullable();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('password_resets');
}
}

View File

@ -1,37 +0,0 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateAdminTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('Admin', function (Blueprint $table) {
$table->string('ID');
$table->string('password');
$table->string('name');
$table->string('nick_name');
$table->string('email');
$table->string('phone_number');
$table->timestamps();
$table->primary('ID');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('admin');
}
}

View File

@ -0,0 +1,38 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateAdminTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('Admin', function(Blueprint $table)
{
$table->string('ID')->primary();
$table->string('password');
$table->string('name');
$table->string('nick_name');
$table->string('email');
$table->string('phone_number');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('Admin');
}
}

View File

@ -0,0 +1,34 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreatePasswordResetsTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('password_resets', function(Blueprint $table)
{
$table->string('email')->index();
$table->string('token');
$table->dateTime('created_at')->nullable();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('password_resets');
}
}

View File

@ -0,0 +1,37 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateUsersTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('users', function(Blueprint $table)
{
$table->increments('id');
$table->string('name');
$table->string('email')->unique();
$table->string('password');
$table->string('remember_token', 100)->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('users');
}
}

View File

@ -14,8 +14,8 @@ class AddForeignKeysToBeClassifiedAsTable extends Migration {
{
Schema::table('BeClassifiedAs', function(Blueprint $table)
{
$table->foreign('CID', 'beclassifiedas_ibfk_1')->references('C_ID')->on('theclass')->onUpdate('CASCADE')->onDelete('CASCADE');
$table->foreign('CBID', 'beclassifiedas_ibfk_2')->references('CBID')->on('casebuilder')->onUpdate('RESTRICT')->onDelete('RESTRICT');
$table->foreign('CID', 'beclassifiedas_ibfk_1')->references('CID')->on('TheClass')->onUpdate('CASCADE')->onDelete('CASCADE');
$table->foreign('CBID', 'beclassifiedas_ibfk_2')->references('CBID')->on('CaseBuilder')->onUpdate('RESTRICT')->onDelete('RESTRICT');
});
}