Added Tagging, Update to Laravel 5.5, Enabled Video
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreatePersonVideoTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('person_video', function(Blueprint $table)
|
||||
{
|
||||
$table->bigInteger('id', true);
|
||||
$table->timestamps();
|
||||
$table->integer('person_id');
|
||||
$table->bigInteger('video_id')->index('fk_pp_ph_idx');
|
||||
$table->unique(['person_id','video_id'], 'UNIQUE');
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('person_video');
|
||||
}
|
||||
|
||||
}
|
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
|
||||
class CreateTagVideoTable extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('tag_video', function(Blueprint $table)
|
||||
{
|
||||
$table->bigInteger('id', true);
|
||||
$table->timestamps();
|
||||
$table->bigInteger('video_id');
|
||||
$table->bigInteger('tag_id')->index('pt_t_idx');
|
||||
$table->unique(['video_id','tag_id'], 'UNIQUE');
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop('tag_video');
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user