topnotch_website/database/migrations/009_create_packing_slips_table.php

30 lines
825 B
PHP
Raw Normal View History

2024-09-03 15:15:57 -07:00
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
2024-09-09 15:29:31 -07:00
return new class extends Migration
{
2024-09-03 15:15:57 -07:00
public function up(): void
{
Schema::create('packing_slips', function (Blueprint $table) {
$table->id();
2025-01-07 14:32:17 -05:00
$table->foreignId('order_id')->nullable()->constrained(); //todo: replace this once orders are actually in da system
2024-09-03 15:15:57 -07:00
$table->foreignId('customer_id')->nullable()->constrained();
$table->date('date_received');
2025-01-07 14:32:17 -05:00
$table->string('amount')->nullable();
2024-09-03 15:15:57 -07:00
$table->string('contents');
$table->softDeletes();
$table->timestamps();
});
}
public function down(): void
{
Schema::dropIfExists('packing_slips');
}
};