|
|
@@ -15,11 +15,12 @@ class CreateRelationsTable extends Migration
|
|
|
{
|
|
|
Schema::create('relations', function (Blueprint $table) {
|
|
|
$table->uuid('id')->primary()->default(DB::raw('uuid_generate_v1mc()'));
|
|
|
- $table->string('name',256)->unique();
|
|
|
- $table->json('case')->nullable();
|
|
|
+ $table->string('name',256)->index();
|
|
|
+ $table->string('case',16)->nullable()->index();
|
|
|
$table->json('to')->nullable();
|
|
|
$table->uuid('editor_id');
|
|
|
$table->timestamps();
|
|
|
+ $table->unique(["name", "case"]);
|
|
|
});
|
|
|
}
|
|
|
|