first commit
This commit is contained in:
28
migrations/FormsResMigration.php
Normal file
28
migrations/FormsResMigration.php
Normal file
@ -0,0 +1,28 @@
|
||||
<?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");
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user