タグ登録機能の追加

This commit is contained in:
shibafu committed 2018-01-08 08:50:22 +09:00
1 parent d7b16cd6d5
commit b1dcc36565
7 files changed
+96 -12

No files matched your search

@@ -0,0 +1,40 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateTagsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('tags', function (Blueprint $table) {
$table->increments('id');
$table->string('name');
$table->timestamps();
});
Schema::create('ejaculation_tag', function (Blueprint $table) {
$table->increments('id');
$table->integer('ejaculation_id')->index();
$table->integer('tag_id')->index();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('tags');
Schema::dropIfExists('ejaculation_tag');
}
}