More base setup and integration with AdminLTE

This commit is contained in:
Deon George
2016-10-21 01:40:52 +11:00
parent 84ae365676
commit 3f54233c39
1495 changed files with 841197 additions and 20908 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::drop('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')->index();
$table->timestamp('created_at')->nullable();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('password_resets');
}
}

View File

@@ -0,0 +1,38 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateCountryTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('country', function(Blueprint $table)
{
$table->integer('id',TRUE);
$table->string('name', 128)->nullable()->unique('name_UNIQUE');
$table->string('description', 128)->nullable();
$table->string('notes', 128)->nullable();
$table->string('two_code', 16)->nullable()->unique('two_code_UNIQUE');
$table->string('three_code', 16)->nullable()->unique('three_code_UNIQUE');
$table->boolean('active')->nullable();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('country');
}
}

View File

@@ -0,0 +1,34 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateLanguageTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('language', function(Blueprint $table)
{
$table->integer('id',TRUE);
$table->string('name', 45)->nullable()->unique();
$table->string('iso', 5)->nullable()->unique();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('language');
}
}

View File

@@ -0,0 +1,41 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateCurrencyTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('currency', function(Blueprint $table)
{
$table->integer('id',TRUE);
$table->integer('country_id')->nullable();
$table->string('name', 128)->nullable();
$table->boolean('active')->nullable();
$table->text('convert_array')->nullable();
$table->string('notes', 128)->nullable();
$table->string('symbol', 16)->nullable();
$table->string('three_digit', 3)->nullable()->unique();
$table->foreign('country_id')->references('id')->on('country')->onUpdate('NO ACTION')->onDelete('NO ACTION');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('currency');
}
}

View File

@@ -0,0 +1,49 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateSetupTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('setup', function(Blueprint $table)
{
$table->integer('id',true);
$table->bigInteger('date_orig')->nullable();
$table->boolean('status')->nullable();
$table->integer('country_id');
$table->integer('language_id');
$table->integer('currency_id');
$table->string('url', 128)->unique();
$table->string('urldev',128)->nullable()->unique();
$table->integer('login_expire')->nullable();
$table->text('time_format', 65535)->nullable();
$table->text('date_format', 65535)->nullable();
$table->integer('decimal_place')->nullable();
$table->bigInteger('admin_id')->nullable();
$table->unique(['country_id','language_id','currency_id']);
$table->timestamps();
$table->foreign('country_id')->references('id')->on('country')->onUpdate('NO ACTION')->onDelete('NO ACTION');
$table->foreign('currency_id')->references('id')->on('currency')->onUpdate('NO ACTION')->onDelete('NO ACTION');
$table->foreign('language_id')->references('id')->on('language')->onUpdate('NO ACTION')->onDelete('NO ACTION');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('setup');
}
}

View File

@@ -0,0 +1,45 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateSiteTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('site', function(Blueprint $table)
{
$table->integer('id',TRUE);
$table->string('name', 64)->nullable();
$table->unique(['id','name']);
$table->string('description',128)->nullable();
$table->string('address1',128)->nullable();
$table->string('address2',128)->nullable();
$table->string('city',32)->nullable();
$table->string('state',3)->nullable();
$table->string('postalcode',8)->nullable();
$table->string('phone',16)->nullable();
$table->string('email',32)->nullable();
$table->integer('setup_id');
$table->foreign('setup_id')->references('id')->on('setup')->onUpdate('NO ACTION')->onDelete('NO ACTION');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('site');
}
}

View File

@@ -0,0 +1,39 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateSiteSocialTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('site_social', function(Blueprint $table)
{
$table->integer('id',TRUE);
$table->string('name', 64)->nullable();
$table->unique(['id','name']);
$table->string('client_id',64)->unique();
$table->string('secret_id',64);
$table->integer('site_id');
$table->foreign('site_id')->references('id')->on('site')->onUpdate('NO ACTION')->onDelete('NO ACTION');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('site_social');
}
}

View File

@@ -0,0 +1,52 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateAccountTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('account', function(Blueprint $table)
{
$table->integer('id',true);
$table->rememberToken();
$table->timestamps();
$table->integer('date_orig')->nullable();
$table->integer('date_last')->nullable();
$table->integer('date_expire')->nullable();
$table->integer('language_id')->nullable();
$table->integer('country_id');
$table->string('password', 128)->nullable();
$table->boolean('active')->nullable();
$table->string('first_name', 128)->nullable();
$table->string('last_name', 128)->nullable();
$table->string('title', 16)->nullable();
$table->string('email', 128)->nullable()->unique();
$table->string('address1', 128)->nullable();
$table->string('address2', 128)->nullable();
$table->string('city', 32)->nullable();
$table->string('state', 32)->nullable();
$table->string('zip', 16)->nullable();
$table->foreign('country_id')->references('id')->on('country')->onUpdate('NO ACTION')->onDelete('NO ACTION');
$table->foreign('language_id')->references('id')->on('language')->onUpdate('NO ACTION')->onDelete('NO ACTION');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('account');
}
}