1
0
Fork 1
mirror of https://github.com/pixelfed/pixelfed.git synced 2024-12-24 00:35:59 +00:00

Add db migration

This commit is contained in:
Daniel Supernault 2019-02-03 14:50:45 -07:00
parent 348ff3123e
commit 8934678123
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7

View file

@ -0,0 +1,34 @@
<?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) {
$table->dropColumn('remote_url');
$table->dropColumn('last_fetched_at');
});
}
}