芝麻web文件管理V1.00
编辑当前文件:/home/sditechnicalteam/www/database/migrations/2022_08_03_101616_create_event_files_table.php
increments('id'); $table->integer('company_id')->unsigned()->nullable(); $table->foreign('company_id')->references('id')->on('companies')->onDelete('cascade')->onUpdate('cascade'); $table->integer('event_id')->unsigned(); $table->foreign('event_id') ->references('id') ->on('events') ->onDelete('cascade') ->onUpdate('cascade'); $table->string('filename', 200)->nullable(); $table->string('hashname', 200)->nullable(); $table->string('size', 200)->nullable(); $table->integer('added_by')->unsigned()->nullable(); $table->foreign('added_by')->references('id')->on('users')->onDelete('SET NULL')->onUpdate('cascade'); $table->integer('last_updated_by')->unsigned()->nullable(); $table->foreign('last_updated_by')->references('id')->on('users')->onDelete('SET NULL')->onUpdate('cascade'); $table->timestamps(); }); if (!Schema::hasColumn('events', 'event_link')) { Schema::table('events', function (Blueprint $table) { $table->string('event_link')->after('remind_type')->nullable(); }); } Schema::table('proposal_templates', function (Blueprint $table) { $table->dropForeign(['lead_id']); $table->dropColumn('lead_id'); $table->dropColumn('note'); $table->dropColumn('calculate_tax'); $table->dropColumn('status'); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('event_files'); } };