blob: 7975200b1257b316a6ebfaa81c808fd2b0ee771c (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration {
public function up(): void
{
Schema::table('teachers', function (Blueprint $table) {
$table->string('api_token', 80)->unique()->nullable()->after('password');
});
}
public function down(): void
{
Schema::table('teachers', function (Blueprint $table) {
$table->dropColumn('api_token');
});
}
};
|