mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-05 07:20:58 +08:00
41 lines
1.1 KiB
PHP
41 lines
1.1 KiB
PHP
<?php
|
|
|
|
use Illuminate\Database\Migrations\Migration;
|
|
use Illuminate\Database\Schema\Blueprint;
|
|
use Illuminate\Support\Facades\Schema;
|
|
|
|
class CreateLanguageTable extends Migration
|
|
{
|
|
/**
|
|
* Run the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function up()
|
|
{
|
|
if (Schema::hasTable('language')) {
|
|
return;
|
|
}
|
|
Schema::create('language', function (Blueprint $table) {
|
|
$table->smallIncrements('id');
|
|
$table->string('lang_name', 50)->default('');
|
|
$table->string('flagpic')->default('');
|
|
$table->unsignedTinyInteger('sub_lang')->default(1);
|
|
$table->unsignedTinyInteger('rule_lang')->default(0);
|
|
$table->unsignedTinyInteger('site_lang')->default(0);
|
|
$table->string('site_lang_folder')->default('');
|
|
$table->enum('trans_state', ['up-to-date', 'outdate', 'incomplete', 'need-new', 'unavailable'])->default('unavailable');
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Reverse the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function down()
|
|
{
|
|
Schema::dropIfExists('language');
|
|
}
|
|
}
|