このリポジトリは2023-09-09にアーカイブされています。 ファイルの閲覧とクローンは可能ですが、プッシュ、イシューの作成、プルリクエストはできません。
2021-09-29 12:43:36 +09:00
|
|
|
<?php
|
|
|
|
|
|
|
|
use Illuminate\Database\Migrations\Migration;
|
|
|
|
use Illuminate\Database\Schema\Blueprint;
|
|
|
|
use Illuminate\Support\Facades\Schema;
|
|
|
|
|
|
|
|
class CreateSmssesTable extends Migration
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Run the migrations.
|
|
|
|
*
|
|
|
|
* @return void
|
|
|
|
*/
|
|
|
|
public function up()
|
|
|
|
{
|
|
|
|
Schema::create('smsses', function (Blueprint $table) {
|
|
|
|
$table->id();
|
|
|
|
$table->unsignedTinyInteger('send_id');
|
|
|
|
$table->unsignedBigInteger('receive_id');
|
2021-10-29 22:19:12 +09:00
|
|
|
$table->foreign('receive_id')->references('id')->on('children')->onDelete('cascade');
|
2021-09-29 12:43:36 +09:00
|
|
|
$table->unsignedTinyInteger('is_sent')->default(0);
|
|
|
|
$table->timestamps();
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Reverse the migrations.
|
|
|
|
*
|
|
|
|
* @return void
|
|
|
|
*/
|
|
|
|
public function down()
|
|
|
|
{
|
|
|
|
Schema::dropIfExists('smsses');
|
|
|
|
}
|
|
|
|
}
|