master_template/database/migrations/2024_06_10_093737_create_tbl_formssubmissions.php

34 lines
988 B
PHP
Raw Normal View History

2024-06-10 12:21:58 +00:00
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('formssubmissions', function (Blueprint $table) {
$table->id('formsubmission_id');
$table->unsignedInteger('forms_id');
$table->longText('submitted_values')->charset('utf8mb4')->collation('utf8mb4_bin')->nullable(false)->check('json_valid(`submitted_values`)');
$table->integer('display_order')->default(0);
$table->integer('status')->default(1);
$table->timestamps();
$table->integer('createdby')->nullable();
$table->integer('updatedby')->nullable();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('formssubmissions');
}
};