Created
April 21, 2017 01:46
-
-
Save mikehins/60d3eab6113e6f61b62cd4c09e6d3f1c to your computer and use it in GitHub Desktop.
create_translations_table
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use Illuminate\Support\Facades\Schema; | |
use Illuminate\Database\Schema\Blueprint; | |
use Illuminate\Database\Migrations\Migration; | |
class CreateTranslationsTable extends Migration | |
{ | |
/** | |
* Run the migrations. | |
* | |
* @return void | |
*/ | |
public function up() | |
{ | |
Schema::create('translations', function (Blueprint $table) { | |
$table->string('key'); | |
$table->text('value'); | |
$table->integer('translatable_id'); | |
$table->string('translatable_type'); | |
$table->string('locale'); | |
$table->timestamps(); | |
}); | |
} | |
/** | |
* Reverse the migrations. | |
* | |
* @return void | |
*/ | |
public function down() | |
{ | |
Schema::dropIfExists('translations'); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment