28 lines
646 B
PHP
28 lines
646 B
PHP
<?php
|
|
|
|
namespace itguild\forms\form\migrations;
|
|
use Illuminate;
|
|
|
|
class InputsValueMigrations
|
|
{
|
|
|
|
public static function up(): void
|
|
{
|
|
|
|
Illuminate\Database\Capsule\Manager::schema()->create("input_value", function ($table) {
|
|
$table->id('id');
|
|
$table->unsignedBigInteger('form_input_id');
|
|
$table->string('value');
|
|
$table->timestamps();
|
|
|
|
$table->foreign('form_input_id', 'fk_form_input')->references('id')->on('form_input');
|
|
});
|
|
|
|
}
|
|
|
|
public static function down(): void
|
|
{
|
|
Illuminate\Database\Capsule\Manager::schema()->drop("input_value");
|
|
}
|
|
|
|
} |