marc-leopold/cms/plugins/graker/photoalbums/updates/create_photos_table.php

29 lines
738 B
PHP
Raw Permalink Normal View History

2019-02-25 14:56:59 +00:00
<?php namespace Graker\PhotoAlbums\Updates;
use Schema;
use October\Rain\Database\Updates\Migration;
class CreatePhotosTable extends Migration
{
public function up()
{
Schema::create('graker_photoalbums_photos', function($table)
{
$table->engine = 'InnoDB';
$table->increments('id');
$table->integer('user_id')->unsigned()->nullable()->index();
$table->integer('album_id')->unsigned()->nullable()->index();
$table->string('title')->nullable();
$table->text('description')->nullable();
$table->timestamps();
});
}
public function down()
{
Schema::dropIfExists('graker_photoalbums_photos');
}
}