classify admin
This commit is contained in:
44
database/migrations/2024_04_09_095310_v1.0.1.php
Normal file
44
database/migrations/2024_04_09_095310_v1.0.1.php
Normal file
@@ -0,0 +1,44 @@
|
||||
<?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 {
|
||||
|
||||
if (!Schema::hasColumn('items', 'clicks')) {
|
||||
Schema::table('items', static function (Blueprint $table) {
|
||||
$table->integer('clicks')->after('all_category_ids');
|
||||
});
|
||||
}
|
||||
|
||||
Schema::table('languages', static function (Blueprint $table) {
|
||||
$table->string('name_in_english', 32)->after('name');
|
||||
});
|
||||
|
||||
Schema::table('chats', static function (Blueprint $table) {
|
||||
$table->string('message')->nullable()->change();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void {
|
||||
Schema::table('items', static function (Blueprint $table) {
|
||||
$table->dropColumn('clicks');
|
||||
});
|
||||
|
||||
Schema::table('languages', static function (Blueprint $table) {
|
||||
$table->dropColumn('name_in_english');
|
||||
});
|
||||
|
||||
Schema::table('chats', static function (Blueprint $table) {
|
||||
$table->string('message')->change();
|
||||
});
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user