1
0
Fork 1
mirror of https://github.com/pixelfed/pixelfed.git synced 2024-12-23 08:14:10 +00:00

Add new media migration

This commit is contained in:
Daniel Supernault 2018-06-13 17:14:44 -06:00
parent 3f0ad3ffe2
commit 5cb3e5c17b

View file

@ -0,0 +1,34 @@
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class AddFiltersToMediaTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('media', function (Blueprint $table) {
$table->string('filter_name')->nullable()->after('orientation');
$table->string('filter_class')->nullable()->after('filter_name');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('media', function (Blueprint $table) {
$table->dropColumn('filter_name');
$table->dropColumn('filter_class');
});
}
}