28 lines
614 B
PHP
28 lines
614 B
PHP
<?php
|
|
|
|
namespace itguild\forms\form\migrations;
|
|
use Illuminate;
|
|
|
|
class FormsResMigration
|
|
{
|
|
|
|
public static function up(): void
|
|
{
|
|
|
|
Illuminate\Database\Capsule\Manager::schema()->create("form_res", function ($table) {
|
|
$table->id('id');
|
|
$table->unsignedBigInteger('form_id');
|
|
$table->json('data');
|
|
$table->timestamps();
|
|
|
|
$table->foreign('form_id', 'fk_form_form')->references('id')->on('form');
|
|
});
|
|
|
|
}
|
|
|
|
public static function down(): void
|
|
{
|
|
Illuminate\Database\Capsule\Manager::schema()->drop("form_res");
|
|
}
|
|
|
|
} |