1
0
Fork 0
forked from mirror/pixelfed

Add migration

This commit is contained in:
Daniel Supernault 2022-10-30 23:41:20 -06:00
parent 7ef383d1f6
commit fa43ec2333
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7
2 changed files with 32 additions and 3 deletions

View file

@ -23,14 +23,11 @@ class ProfileTransformer extends Fractal\TransformerAbstract
'followers' => $profile->permalink('/followers'),
'inbox' => $profile->permalink('/inbox'),
'outbox' => $profile->permalink('/outbox'),
//'featured' => $profile->permalink('/collections/featured'),
'preferredUsername' => $profile->username,
'name' => $profile->name,
'summary' => $profile->bio,
'url' => $profile->url(),
'manuallyApprovesFollowers' => (bool) $profile->is_private,
// 'follower_count' => $profile->followers()->count(),
// 'following_count' => $profile->following()->count(),
'publicKey' => [
'id' => $profile->permalink().'#main-key',
'owner' => $profile->permalink(),

View file

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