mirror of
https://git.meshkee.com/cssd/cssd-back.git
synced 2026-10-13 00:51:07 +03:30
fix migrations
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class CreateInputsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('inputs', function (Blueprint $table) {
|
||||
$table->bigIncrements('id');
|
||||
$table->string('name')->nullable();
|
||||
$table->enum('type', ['Text', 'Form', 'Checkbox', 'Select', 'Time', 'Temperature', 'Radiobutton', 'Switch', 'Range', 'Date', 'Pressure']);
|
||||
$table->unsignedBigInteger('test_type_id');
|
||||
$table->foreign('test_type_id')->references('id')->on('test_types');
|
||||
$table->unsignedBigInteger('parent_id')->nullable();
|
||||
$table->foreign('parent_id')->references('id')->on('inputs');
|
||||
$table->string('size')->nullable();
|
||||
$table->string('value')->nullable();
|
||||
$table->tinyInteger('require_scanner')->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('inputs');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user