added tag column in course table
Cette révision appartient à :
Parent
182c7a14d8
révision
278e3a2fa2
28
database/migrations/2023_12_23_070253_add_tag_to_courses_table.php
Fichier normal
28
database/migrations/2023_12_23_070253_add_tag_to_courses_table.php
Fichier normal
@ -0,0 +1,28 @@
|
||||
<?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::table('courses', function (Blueprint $table) {
|
||||
$table->enum('tag', ['popular', 'featured', 'upcoming'])->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('courses', function (Blueprint $table) {
|
||||
$table->dropColumn('tag');
|
||||
});
|
||||
}
|
||||
};
|
||||
Chargement…
Référencer dans un nouveau ticket
Block a user