restore composer.json, add mysqli extension
This commit is contained in:
35
database/migrations/2019_09_19_153723_create_cities_table.php
Executable file
35
database/migrations/2019_09_19_153723_create_cities_table.php
Executable file
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateCitiesTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('cities', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->jsonb('name');
|
||||
$table->unsignedBigInteger('region_id');
|
||||
$table->timestamps();
|
||||
|
||||
$table->foreign('region_id')->references('id')->on('regions');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('cities');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user