annotate database/migrations/2025_08_29_004806_create_clients_table.php @ 2:90296614b7e2 default tip

Adding in the base for the clients table
author luka
date Thu, 28 Aug 2025 20:55:40 -0400
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2
90296614b7e2 Adding in the base for the clients table
luka
parents:
diff changeset
1 <?php
90296614b7e2 Adding in the base for the clients table
luka
parents:
diff changeset
2
90296614b7e2 Adding in the base for the clients table
luka
parents:
diff changeset
3 use Illuminate\Database\Migrations\Migration;
90296614b7e2 Adding in the base for the clients table
luka
parents:
diff changeset
4 use Wizard\Framework\Database\MyBlueprint as Blueprint;
90296614b7e2 Adding in the base for the clients table
luka
parents:
diff changeset
5 use Wizard\Framework\Database\MySchema as Schema;
90296614b7e2 Adding in the base for the clients table
luka
parents:
diff changeset
6
90296614b7e2 Adding in the base for the clients table
luka
parents:
diff changeset
7 return new class extends Migration
90296614b7e2 Adding in the base for the clients table
luka
parents:
diff changeset
8 {
90296614b7e2 Adding in the base for the clients table
luka
parents:
diff changeset
9 /**
90296614b7e2 Adding in the base for the clients table
luka
parents:
diff changeset
10 * Run the migrations.
90296614b7e2 Adding in the base for the clients table
luka
parents:
diff changeset
11 */
90296614b7e2 Adding in the base for the clients table
luka
parents:
diff changeset
12 public function up(): void
90296614b7e2 Adding in the base for the clients table
luka
parents:
diff changeset
13 {
90296614b7e2 Adding in the base for the clients table
luka
parents:
diff changeset
14 Schema::create('clients', function (Blueprint $table) {
90296614b7e2 Adding in the base for the clients table
luka
parents:
diff changeset
15 $table->baseColumns();
90296614b7e2 Adding in the base for the clients table
luka
parents:
diff changeset
16 $table->string('name');
90296614b7e2 Adding in the base for the clients table
luka
parents:
diff changeset
17 $table->string('email')->nullable();
90296614b7e2 Adding in the base for the clients table
luka
parents:
diff changeset
18 $table->string('phone_number')->nullable();
90296614b7e2 Adding in the base for the clients table
luka
parents:
diff changeset
19 $table->string('address')->nullable();
90296614b7e2 Adding in the base for the clients table
luka
parents:
diff changeset
20 $table->text('notes')->nullable();
90296614b7e2 Adding in the base for the clients table
luka
parents:
diff changeset
21 });
90296614b7e2 Adding in the base for the clients table
luka
parents:
diff changeset
22 }
90296614b7e2 Adding in the base for the clients table
luka
parents:
diff changeset
23
90296614b7e2 Adding in the base for the clients table
luka
parents:
diff changeset
24 /**
90296614b7e2 Adding in the base for the clients table
luka
parents:
diff changeset
25 * Reverse the migrations.
90296614b7e2 Adding in the base for the clients table
luka
parents:
diff changeset
26 */
90296614b7e2 Adding in the base for the clients table
luka
parents:
diff changeset
27 public function down(): void
90296614b7e2 Adding in the base for the clients table
luka
parents:
diff changeset
28 {
90296614b7e2 Adding in the base for the clients table
luka
parents:
diff changeset
29 Schema::dropIfExists('clients');
90296614b7e2 Adding in the base for the clients table
luka
parents:
diff changeset
30 }
90296614b7e2 Adding in the base for the clients table
luka
parents:
diff changeset
31 };