26 lines
866 B
PHP
26 lines
866 B
PHP
<?php
|
|
|
|
use A7kz\Platform\Modules\Platform\Segment\Facades\Segment;
|
|
use Illuminate\Database\Migrations\Migration;
|
|
use Illuminate\Database\Schema\Blueprint;
|
|
use Illuminate\Support\Facades\Schema;
|
|
|
|
|
|
return new class extends Migration
|
|
{
|
|
public function up(): void
|
|
{
|
|
$segments = Segment::listActive();
|
|
foreach ($segments as $segment) {
|
|
Schema::connection($segment->connector)->create('pipi_faq', static function (Blueprint $table) {
|
|
$table->id();
|
|
$table->longText('text')->nullable()->comment('Текст');
|
|
$table->string('category')->nullable()->comment('Категория');
|
|
$table->string('subcategory')->nullable()->comment('Подкатегория');
|
|
$table->timestamps();
|
|
$table->softDeletes();
|
|
});
|
|
}
|
|
}
|
|
};
|