50 lines
1.4 KiB
PHP
50 lines
1.4 KiB
PHP
|
<?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');
|
||
|
}
|
||
|
}
|