You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

42 lines
951 B
PHP

<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateHospitalsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('hospitals', function (Blueprint $table) {
$table->id();
$table->string('name', 50);
$table->string('code', 50);
$table->string('address', 100);
$table->decimal('longitude', 10, 6);
$table->decimal('latitude', 10, 6);
$table->string('logo', 100);
$table->tinyInteger('dev')->comment('1:测试机构, 2:正式机构');
$table->string('phone', 20);
$table->tinyInteger('status');
$table->tinyInteger('del')->default(2);
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('hospitals');
}
}