You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
1.1 KiB
33 lines
1.1 KiB
<?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('courses', function (Blueprint $table) {
|
|
$table->string('location', 255)->nullable()->after('teach_end_date')->comment('上课地点');
|
|
$table->time('teach_start_time')->nullable()->after('location')->comment('开课开始时间');
|
|
$table->time('teach_end_time')->nullable()->after('teach_start_time')->comment('开课结束时间');
|
|
$table->json('recruit_targets')->nullable()->after('teach_end_time')->comment('招生对象列表');
|
|
$table->json('main_speakers')->nullable()->after('recruit_targets')->comment('主讲师资');
|
|
});
|
|
}
|
|
|
|
public function down(): void
|
|
{
|
|
Schema::table('courses', function (Blueprint $table) {
|
|
$table->dropColumn([
|
|
'location',
|
|
'teach_start_time',
|
|
'teach_end_time',
|
|
'recruit_targets',
|
|
'main_speakers',
|
|
]);
|
|
});
|
|
}
|
|
};
|