Files
Website/database/migrations/2024_04_07_004908_create_tickets_table.php
2024-04-22 18:16:33 +10:00

32 lines
771 B
PHP

<?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('tickets', function (Blueprint $table) {
$table->id();
$table->unsignedInteger('status')->default(0);
$table->foreignUuid('user_id')->constrained();
$table->string('workshop_id');
$table->foreign('workshop_id')->references('id')->on('workshops');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('tickets');
}
};