More base setup and integration with AdminLTE
This commit is contained in:
45
database/migrations/2017_07_23_000400_create_site_table.php
Normal file
45
database/migrations/2017_07_23_000400_create_site_table.php
Normal 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');
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user