Forked from nissicreative/create_countries_table.php
Created
October 19, 2018 06:50
-
-
Save devuri/aba67ee09ccde6ebd93fe1c0ac8cd9c7 to your computer and use it in GitHub Desktop.
Laravel Countries Table Migration
This file contains hidden or 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 CreateCountriesTable extends Migration | |
| { | |
| /** | |
| * Run the migrations. | |
| * | |
| * @return void | |
| */ | |
| public function up() | |
| { | |
| Schema::create('countries', function (Blueprint $table) { | |
| $table->increments('id'); | |
| $table->string('code'); | |
| $table->string('name'); | |
| }); | |
| } | |
| /** | |
| * Reverse the migrations. | |
| * | |
| * @return void | |
| */ | |
| public function down() | |
| { | |
| Schema::dropIfExists('countries'); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment