Commit 3e1de366 authored by Maik Messerschmidt's avatar Maik Messerschmidt
Browse files

Added create_inputs migration.

parent f011c28f
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateInputsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('inputs', function (Blueprint $table) {
$table->uuid('id');
$table->timestamps();
$table
->string('increments')
->default('auto')
->comment('How and when to increment the use count. auto: when requested, manual: by /used, never: never.');
$table
->integer('uses')
->default(0)
->unsigned()
->comment("How often this input was used.");
$table
->integer('max_uses')
->default(null)
->nullable()
->unsigned()
->comment("How often this input can be used. Use NULL for inifinite often.");
$table
->boolean('listed')
->default(true)
->comment("Whether this input should be available by /next or only by uuid.");
$table
->text("data")
->comment("The actual input data.");
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('inputs');
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment