Skip to content

A self-hosted media server and file management system

fix: font attachment table timestamps don't use timestamptz

aminnausinc0135b58f5f1
diff --git a/database/migrations/2026_09_09_194335_fix_timestamps_on_font_attachments.php b/database/migrations/2026_09_09_194335_fix_timestamps_on_font_attachments.php
new file mode 100644
index 00000000..57aeb8b0
--- /dev/null
+++ b/database/migrations/2026_09_09_194335_fix_timestamps_on_font_attachments.php
@@ -0,0 +1,30 @@
+<?php
+
+use Illuminate\Database\Migrations\Migration;
+use Illuminate\Support\Facades\DB;
+
+return new class extends Migration {
+ /**
+ * Run the migrations.
+ */
+ public function up(): void {
+ DB::statement("ALTER TABLE font_attachments
+ ALTER COLUMN created_at TYPE timestamptz
+ USING created_at AT TIME ZONE 'UTC',
+ ALTER COLUMN updated_at TYPE timestamptz
+ USING updated_at AT TIME ZONE 'UTC'
+ ");
+ }
+
+ /**
+ * Reverse the migrations.
+ */
+ public function down(): void {
+ DB::statement("ALTER TABLE font_attachments
+ ALTER COLUMN created_at TYPE timestamp
+ USING created_at AT TIME ZONE 'UTC',
+ ALTER COLUMN updated_at TYPE timestamp
+ USING updated_at AT TIME ZONE 'UTC'
+ ");
+ }
+};