pixelfed/database/migrations/2019_02_01_023357_add_remot...

34 lines
793 B
PHP
Raw Permalink Normal View History

2019-02-03 21:50:45 +00:00
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class AddRemoteToAvatarsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('avatars', function (Blueprint $table) {
$table->string('remote_url')->nullable()->index()->after('thumb_path');
$table->timestamp('last_fetched_at')->nullable()->after('change_count');
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('avatars', function (Blueprint $table) {
2021-06-01 05:26:40 +00:00
$table->dropColumn(['remote_url','last_fetched_at']);
2019-02-03 21:50:45 +00:00
});
}
}