diff --git a/database/migrations/2018_12_22_055940_add_account_status_to_profiles_table.php b/database/migrations/2018_12_22_055940_add_account_status_to_profiles_table.php index 04a88060..097e8675 100644 --- a/database/migrations/2018_12_22_055940_add_account_status_to_profiles_table.php +++ b/database/migrations/2018_12_22_055940_add_account_status_to_profiles_table.php @@ -54,12 +54,14 @@ class AddAccountStatusToProfilesTable extends Migration $table->string('hub_url')->nullable(); }); - Schema::table('stories', function (Blueprint $table) { - $table->dropColumn('id'); - }); - Schema::table('stories', function (Blueprint $table) { - $table->bigIncrements('bigIncrements')->first(); - }); + if (Schema::hasTable('stories')) { + Schema::table('stories', function (Blueprint $table) { + $table->dropColumn('id'); + }); + Schema::table('stories', function (Blueprint $table) { + $table->bigIncrements('bigIncrements')->first(); + }); + } Schema::table('profiles', function (Blueprint $table) { $table->dropColumn('status'); diff --git a/database/migrations/2019_01_12_054413_stories.php b/database/migrations/2019_01_12_054413_stories.php index a61c447d..f58a8cf3 100644 --- a/database/migrations/2019_01_12_054413_stories.php +++ b/database/migrations/2019_01_12_054413_stories.php @@ -60,13 +60,7 @@ class Stories extends Migration { Schema::dropIfExists('story_items'); Schema::dropIfExists('story_views'); - - Schema::table('stories', function (Blueprint $table) { - $table->dropColumn(['title','preview_photo','local_only','is_live','broadcast_url','broadcast_key']); - }); - - Schema::table('story_reactions', function (Blueprint $table) { - $table->dropColumn('story_id'); - }); + Schema::dropIfExists('story_reactions'); + Schema::dropIfExists('stories'); } } diff --git a/database/migrations/2019_12_10_023604_create_newsroom_table.php b/database/migrations/2019_12_10_023604_create_newsroom_table.php index 2651d5c4..b463f562 100644 --- a/database/migrations/2019_12_10_023604_create_newsroom_table.php +++ b/database/migrations/2019_12_10_023604_create_newsroom_table.php @@ -40,6 +40,6 @@ class CreateNewsroomTable extends Migration */ public function down() { - Schema::dropIfExists('site_news'); + Schema::dropIfExists('newsroom'); } } diff --git a/database/migrations/2021_01_14_034521_add_cache_locks_table.php b/database/migrations/2021_01_14_034521_add_cache_locks_table.php index 121c69a3..07889b49 100644 --- a/database/migrations/2021_01_14_034521_add_cache_locks_table.php +++ b/database/migrations/2021_01_14_034521_add_cache_locks_table.php @@ -27,6 +27,6 @@ class AddCacheLocksTable extends Migration */ public function down() { - Schema::dropTable('cache_locks'); + Schema::dropIfExists('cache_locks'); } } diff --git a/database/migrations/2021_07_23_062326_add_compose_settings_to_user_settings_table.php b/database/migrations/2021_07_23_062326_add_compose_settings_to_user_settings_table.php index 58837cab..49a9b2c5 100644 --- a/database/migrations/2021_07_23_062326_add_compose_settings_to_user_settings_table.php +++ b/database/migrations/2021_07_23_062326_add_compose_settings_to_user_settings_table.php @@ -33,14 +33,25 @@ class AddComposeSettingsToUserSettingsTable extends Migration public function down() { Schema::table('user_settings', function (Blueprint $table) { - $table->dropColumn('compose_settings'); + if (Schema::hasColumn('user_settings', 'compose_settings')) { + $table->dropColumn('compose_settings'); + } }); Schema::table('media', function (Blueprint $table) { $table->string('caption')->change(); - $table->dropIndex('profile_id'); - $table->dropIndex('mime'); - $table->dropIndex('license'); + + $schemaManager = Schema::getConnection()->getDoctrineSchemaManager(); + $indexesFound = $schemaManager->listTableIndexes('media'); + if (array_key_exists('media_profile_id_index', $indexesFound)) { + $table->dropIndex('media_profile_id_index'); + } + if (array_key_exists('media_mime_index', $indexesFound)) { + $table->dropIndex('media_mime_index'); + } + if (array_key_exists('media_license_index', $indexesFound)) { + $table->dropIndex('media_license_index'); + } }); } } diff --git a/database/migrations/2024_01_09_052419_create_parental_controls_table.php b/database/migrations/2024_01_09_052419_create_parental_controls_table.php index bf803e4c..6713e684 100644 --- a/database/migrations/2024_01_09_052419_create_parental_controls_table.php +++ b/database/migrations/2024_01_09_052419_create_parental_controls_table.php @@ -28,7 +28,7 @@ return new class extends Migration $schemaManager = Schema::getConnection()->getDoctrineSchemaManager(); $indexesFound = $schemaManager->listTableIndexes('user_roles'); if (array_key_exists('user_roles_profile_id_unique', $indexesFound)) { - $table->dropIndex('user_roles_profile_id_unique'); + $table->dropUnique('user_roles_profile_id_unique'); } $table->unsignedBigInteger('profile_id')->unique()->nullable()->index()->change(); }); @@ -42,7 +42,11 @@ return new class extends Migration Schema::dropIfExists('parental_controls'); Schema::table('user_roles', function (Blueprint $table) { - $table->dropIndex('user_roles_profile_id_unique'); + $schemaManager = Schema::getConnection()->getDoctrineSchemaManager(); + $indexesFound = $schemaManager->listTableIndexes('user_roles'); + if (array_key_exists('user_roles_profile_id_unique', $indexesFound)) { + $table->dropUnique('user_roles_profile_id_unique'); + } $table->unsignedBigInteger('profile_id')->unique()->index()->change(); }); } diff --git a/resources/assets/js/components/ComposeModal.vue b/resources/assets/js/components/ComposeModal.vue index 4ffd8466..2c4e3ba4 100644 --- a/resources/assets/js/components/ComposeModal.vue +++ b/resources/assets/js/components/ComposeModal.vue @@ -1204,12 +1204,19 @@ export default { }, 300); }).catch(function(e) { switch(e.response.status) { + case 403: + self.uploading = false; + io.value = null; + swal('Account size limit reached', 'Contact your admin for assistance.', 'error'); + self.page = 2; + break; + case 413: self.uploading = false; io.value = null; swal('File is too large', 'The file you uploaded has the size of ' + self.formatBytes(io.size) + '. Unfortunately, only images up to ' + self.formatBytes(self.config.uploader.max_photo_size * 1024) + ' are supported.\nPlease resize the file and try again.', 'error'); self.page = 2; - break; + break; case 451: self.uploading = false; diff --git a/resources/lang/vendor/backup/ja/notifications.php b/resources/lang/vendor/backup/ja/notifications.php index 911fa4ab..b8fff4a2 100644 --- a/resources/lang/vendor/backup/ja/notifications.php +++ b/resources/lang/vendor/backup/ja/notifications.php @@ -31,5 +31,5 @@ return [ 'unhealthy_backup_found_empty' => 'このアプリケーションのバックアップはありません。', 'unhealthy_backup_found_old' => ':date に作成されたバックアップは古すぎます。', 'unhealthy_backup_found_unknown' => '正確な原因が特定できませんでした。', - 'unhealthy_backup_found_full' => 'バックアップが使用できる容量(:disk_limit)を超えています。(現在の使用量 :disk_usage), + 'unhealthy_backup_found_full' => 'バックアップが使用できる容量(:disk_limit)を超えています。(現在の使用量 :disk_usage)', ]; diff --git a/resources/views/admin/diagnostics/home.blade.php b/resources/views/admin/diagnostics/home.blade.php index bf2b5d74..db44a233 100644 --- a/resources/views/admin/diagnostics/home.blade.php +++ b/resources/views/admin/diagnostics/home.blade.php @@ -654,7 +654,7 @@ MEDIA MEDIA_EXIF_DATABASE - {{config_cache('media.exif.batabase') ? '✅ true' : '❌ false' }} + {{config_cache('media.exif.database') ? '✅ true' : '❌ false' }}