You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2024_03_07_100000_create_asset_table.php 885B

123456789101112131415161718192021222324252627282930
  1. <?php
  2. use Illuminate\Database\Schema\Blueprint;
  3. use Illuminate\Support\Facades\Schema;
  4. use Statamic\Eloquent\Database\BaseMigration as Migration;
  5. return new class extends Migration
  6. {
  7. public function up()
  8. {
  9. Schema::create($this->prefix('assets_meta'), function (Blueprint $table) {
  10. $table->id();
  11. $table->string('container')->index();
  12. $table->string('folder')->index();
  13. $table->string('basename')->index();
  14. $table->string('filename')->index();
  15. $table->char('extension', 10)->index();
  16. $table->string('path')->index();
  17. $table->jsonb('meta')->nullable();
  18. $table->timestamps();
  19. $table->unique(['container', 'folder', 'basename']);
  20. });
  21. }
  22. public function down()
  23. {
  24. Schema::dropIfExists($this->prefix('assets_meta'));
  25. }
  26. };