2024_03_13_112420_add_columns_to_assets.php 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?php
  2. use Illuminate\Database\Migrations\Migration;
  3. use Illuminate\Database\Schema\Blueprint;
  4. use Illuminate\Support\Facades\Schema;
  5. return new class extends Migration
  6. {
  7. /**
  8. * Run the migrations.
  9. */
  10. public function up(): void
  11. {
  12. Schema::table('assets', function (Blueprint $table) {
  13. //
  14. $table->string('equity_interest')->comment('净权益')->nullable();
  15. $table->string('developer')->comment('开发商')->nullable();
  16. $table->integer('date_completed')->comment('资产完成年份(纯年份)')->nullable();
  17. $table->string('total_floor_area')->comment('总建筑面积')->nullable();
  18. $table->string('contact_person')->comment('联系人')->nullable();
  19. $table->string('contact_phone')->comment('联系人电话')->nullable();
  20. $table->string('contact_email')->comment('联系人邮箱')->nullable();
  21. $table->string('property')->comment('物业')->nullable();
  22. $table->text('building_type_description')->comment('建筑类型描述')->nullable();
  23. });
  24. }
  25. /**
  26. * Reverse the migrations.
  27. */
  28. public function down(): void
  29. {
  30. Schema::table('assets', function (Blueprint $table) {
  31. //
  32. $table->dropColumn(['equity_interest','developer','date_completed','total_floor_area','contact_person','contact_phone','contact_email','property','building_type_description']);
  33. });
  34. }
  35. };