Add migrations for existing database

This commit is contained in:
Deon George
2018-06-18 21:18:34 +10:00
parent bc92de7b95
commit 047693f6cd
138 changed files with 5576 additions and 0 deletions

View File

@@ -0,0 +1,49 @@
<?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->timestamps();
$table->integer('site_id');
$table->string('email', 191);
$table->string('password', 191)->nullable();
$table->string('remember_token', 100)->nullable();
$table->boolean('active');
$table->string('title', 191)->nullable();
$table->string('firstname', 191);
$table->string('lastname', 191);
$table->integer('country_id');
$table->string('address1', 191)->nullable();
$table->string('address2', 191)->nullable();
$table->string('city', 191)->nullable();
$table->string('state', 191)->nullable();
$table->string('postcode', 191)->nullable();
$table->boolean('emailable')->default(1);
$table->unique(['site_id','email']);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('users');
}
}