2024_04_14_105925_create_containers_table.php 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  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::create('containers', function (Blueprint $table) {
  13. $table->id();
  14. $table->string("name", 150);
  15. $table->integer("company_id");
  16. $table->integer("library_id")->nullable();
  17. $table->integer("naming_rule_id")->nullable();
  18. $table->string("doc_stage", 50)->nullable();
  19. $table->string("doc_type", 50)->nullable();
  20. $table->json("naming_rules")->nullable();
  21. $table->json('mailto')->nullable();
  22. $table->string('email_subject')->nullable();
  23. $table->string('acl')->default('private')->comment('private,custom');
  24. $table->string("whitelist")->nullable();
  25. $table->integer("created_by")->nullable();
  26. $table->integer("version")->default(1);
  27. $table->softDeletes();
  28. $table->timestamps();
  29. });
  30. }
  31. /**
  32. * Reverse the migrations.
  33. */
  34. public function down(): void
  35. {
  36. Schema::dropIfExists('containers');
  37. }
  38. };