pixelfed/database/migrations/2020_12_25_220825_add_statu...

36 lines
809 B
PHP
Raw Normal View History

2020-12-27 03:18:13 +00:00
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class AddStatusProfileIdToLikesTable extends Migration
{
2021-06-01 05:26:40 +00:00
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('likes', function (Blueprint $table) {
$table->bigInteger('status_profile_id')->nullable()->unsigned()->index()->after('status_id');
$table->boolean('is_comment')->nullable()->index()->after('status_profile_id');
$table->dropColumn('flagged');
});
}
2020-12-27 03:18:13 +00:00
2021-06-01 05:26:40 +00:00
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('likes', function (Blueprint $table) {
$table->dropColumn(['status_profile_id','is_comment']);
$table->boolean('flagged')->default(false);
});
}
2020-12-27 03:18:13 +00:00
}