2024_03_29_201010_add_source_files_table.php 639 B

12345678910111213141516171819202122232425262728
  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('files', function (Blueprint $table) {
  13. $table->tinyInteger("source")->default(1)->comment("1-附件;2-富文本编辑器");
  14. });
  15. }
  16. /**
  17. * Reverse the migrations.
  18. */
  19. public function down(): void
  20. {
  21. Schema::table('files', function (Blueprint $table) {
  22. $table->dropColumn("source");
  23. });
  24. }
  25. };