FEATURE: add fields for languages

This commit is contained in:
Michal Kváček
2016-07-22 00:43:52 +02:00
parent 181e1fb721
commit 6021f1ea9a
3 changed files with 49 additions and 5 deletions
@@ -0,0 +1,37 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class AddFieldsIntoLanguages extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('languages', function (Blueprint $table) {
$table->string('script', 16)
->default('Latn')
->comment('ISO code for locale script (Latn, Arab, ...)');
$table->string('native')
->comment('Native name for language');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('languages', function (Blueprint $table) {
$table->dropColumn('script');
$table->dropColumn('native');
});
}
}