2018-04-16 00:52:22 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
use Illuminate\Support\Facades\Schema;
|
|
|
|
use Illuminate\Database\Schema\Blueprint;
|
|
|
|
use Illuminate\Database\Migrations\Migration;
|
|
|
|
|
|
|
|
class CreateProfilesTable extends Migration
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Run the migrations.
|
|
|
|
*
|
|
|
|
* @return void
|
|
|
|
*/
|
|
|
|
public function up()
|
|
|
|
{
|
|
|
|
Schema::create('profiles', function (Blueprint $table) {
|
2018-05-20 02:56:20 +00:00
|
|
|
$table->bigIncrements('id');
|
2018-04-16 00:52:22 +00:00
|
|
|
$table->unsignedInteger('user_id')->nullable();
|
2018-04-21 02:43:41 +00:00
|
|
|
$table->string('domain')->nullable();
|
|
|
|
$table->string('username')->nullable()->index();
|
2018-04-16 00:52:22 +00:00
|
|
|
$table->string('name')->nullable();
|
|
|
|
$table->string('bio', 150)->nullable();
|
|
|
|
$table->string('location')->nullable();
|
|
|
|
$table->string('website')->nullable();
|
|
|
|
$table->text('keybase_proof')->nullable();
|
|
|
|
$table->boolean('is_private')->default(false);
|
2018-05-20 02:56:20 +00:00
|
|
|
// ActivityPub
|
|
|
|
$table->string('sharedInbox')->nullable()->index();
|
2018-04-21 02:43:41 +00:00
|
|
|
// PuSH/WebSub
|
|
|
|
$table->string('verify_token')->nullable();
|
|
|
|
$table->string('secret')->nullable();
|
|
|
|
// RSA Key Pair
|
|
|
|
$table->text('private_key')->nullable();
|
|
|
|
$table->text('public_key')->nullable();
|
|
|
|
// URLs
|
|
|
|
$table->string('remote_url')->nullable();
|
|
|
|
$table->string('salmon_url')->nullable();
|
|
|
|
$table->string('hub_url')->nullable();
|
|
|
|
$table->unique(['domain', 'username']);
|
2018-04-16 00:52:22 +00:00
|
|
|
$table->timestamps();
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Reverse the migrations.
|
|
|
|
*
|
|
|
|
* @return void
|
|
|
|
*/
|
|
|
|
public function down()
|
|
|
|
{
|
|
|
|
Schema::dropIfExists('profiles');
|
|
|
|
}
|
|
|
|
}
|