mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-09-18 23:38:02 +00:00
38 lines
988 B
PHP
38 lines
988 B
PHP
<?php
|
|
|
|
use Illuminate\Database\Migrations\Migration;
|
|
use Illuminate\Database\Schema\Blueprint;
|
|
use Illuminate\Support\Facades\Schema;
|
|
|
|
class CreateGroupStoresTable extends Migration
|
|
{
|
|
/**
|
|
* Run the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function up()
|
|
{
|
|
Schema::create('group_stores', function (Blueprint $table) {
|
|
$table->bigIncrements('id');
|
|
$table->bigInteger('group_id')->unsigned()->nullable()->index();
|
|
$table->string('store_key')->index();
|
|
$table->json('store_value')->nullable();
|
|
$table->json('metadata')->nullable();
|
|
$table->unique(['group_id', 'store_key']);
|
|
$table->foreign('group_id')->references('id')->on('groups')->onDelete('cascade');
|
|
$table->timestamps();
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Reverse the migrations.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function down()
|
|
{
|
|
Schema::dropIfExists('group_stores');
|
|
}
|
|
}
|