Skip to content

Commit

Permalink
#10 - fix invalid columns in the initial migration for assets table.
Browse files Browse the repository at this point in the history
  • Loading branch information
spo committed Oct 24, 2024
1 parent 008fd1e commit 17d22c2
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions database/migrations/2024_08_15_073828_create_assets.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ public function up(): void
$table->foreign('organization_id')->references('id')->on('organizations')->onDelete('cascade');

$table->enum('storage_type', ['database', 'filesystem', 'online'])->default('database')->nullable(false);
$table->enum('data_type', ['file', 'string'])->nullable(true)->default('string')->comment('When storage type = database');
$table->text('pathname')->nullable(true)->comment('When storage type = filesystem');
$table->text('url')->nullable(true)->comment('When storage type = online');
$table->timestamps();
Expand All @@ -47,6 +46,6 @@ public function up(): void
(3, 'asset', 'asset', 0, 0, 0, 0, 0, 1, 0)
");

DB ::statement("alter table assets add column data longblob default null comment 'When storage type = database'");
DB ::statement("alter table assets add column data_content longblob default null comment 'When storage type = database'");
}
};

0 comments on commit 17d22c2

Please sign in to comment.