Add new migrations

pull/2533/head
Daniel Supernault 2020-12-26 20:18:13 -07:00
rodzic 99331b9b19
commit 7d0f7f7222
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 0DEF1C662C9033F7
2 zmienionych plików z 68 dodań i 0 usunięć

Wyświetl plik

@ -0,0 +1,36 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class AddStatusProfileIdToLikesTable extends Migration
{
/**
* 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');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('likes', function (Blueprint $table) {
$table->dropColumn('status_profile_id');
$table->dropColumn('is_comment');
$table->boolean('flagged')->default(false);
});
}
}

Wyświetl plik

@ -0,0 +1,32 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class AddTextColumnToMediaTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('media', function (Blueprint $table) {
$table->text('cdn_url')->nullable()->change();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('media', function (Blueprint $table) {
$table->string('cdn_url')->nullable()->change();
});
}
}