mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-09 16:24:51 +00:00
Add new migration
This commit is contained in:
parent
463d9427c5
commit
1e16e18ae6
1 changed files with 40 additions and 0 deletions
|
@ -0,0 +1,40 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
|
||||||
|
class UpdateMediaAddAltText extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
Schema::table('media', function (Blueprint $table) {
|
||||||
|
$table->string('license')->nullable()->after('filter_class');
|
||||||
|
$table->boolean('is_nsfw')->default(false)->after('user_id');
|
||||||
|
$table->tinyInteger('version')->default(1);
|
||||||
|
$table->boolean('remote_media')->default(false)->after('is_nsfw');
|
||||||
|
$table->string('remote_url')->nullable()->after('thumbnail_url');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function down()
|
||||||
|
{
|
||||||
|
Schema::table('media', function (Blueprint $table) {
|
||||||
|
$table->dropColumn('license');
|
||||||
|
$table->dropColumn('is_nsfw');
|
||||||
|
$table->dropColumn('version');
|
||||||
|
$table->dropColumn('remote_media');
|
||||||
|
$table->dropColumn('remote_url');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue