|
@@ -4,25 +4,33 @@ use Illuminate\Database\Migrations\Migration;
|
|
|
use Illuminate\Database\Schema\Blueprint;
|
|
|
use Illuminate\Support\Facades\Schema;
|
|
|
|
|
|
-return new class extends Migration
|
|
|
-{
|
|
|
+return new class extends Migration {
|
|
|
/**
|
|
|
* Run the migrations.
|
|
|
*/
|
|
|
public function up(): void
|
|
|
{
|
|
|
- Schema::table('task_container_file', function (Blueprint $table) {
|
|
|
- //
|
|
|
+ Schema::table('task', function (Blueprint $table) {
|
|
|
+ $table->json('custom_fields')->nullable()->comment("自定义字段");
|
|
|
+ });
|
|
|
+ Schema::table('files', function (Blueprint $table) {
|
|
|
+ $table->json('custom_fields')->nullable()->comment("自定义字段");
|
|
|
+ });
|
|
|
+ Schema::table('containers', function (Blueprint $table) {
|
|
|
+ $table->json('custom_fields')->nullable()->comment("自定义字段");
|
|
|
});
|
|
|
}
|
|
|
|
|
|
- /**
|
|
|
- * Reverse the migrations.
|
|
|
- */
|
|
|
public function down(): void
|
|
|
{
|
|
|
- Schema::table('task_container_file', function (Blueprint $table) {
|
|
|
- //
|
|
|
+ Schema::table('task', function (Blueprint $table) {
|
|
|
+ $table->dropColumn('custom_fields');
|
|
|
+ });
|
|
|
+ Schema::table('files', function (Blueprint $table) {
|
|
|
+ $table->dropColumn('custom_fields');
|
|
|
+ });
|
|
|
+ Schema::table('containers', function (Blueprint $table) {
|
|
|
+ $table->dropColumn('custom_fields');
|
|
|
});
|
|
|
}
|
|
|
};
|