Merge pull request #4884 from pixelfed/staging

Staging
This commit is contained in:
daniel 2024-01-29 22:25:32 -07:00 committed by GitHub
commit 29785b5654
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 43 additions and 25 deletions

View file

@ -54,12 +54,14 @@ class AddAccountStatusToProfilesTable extends Migration
$table->string('hub_url')->nullable(); $table->string('hub_url')->nullable();
}); });
Schema::table('stories', function (Blueprint $table) { if (Schema::hasTable('stories')) {
$table->dropColumn('id'); Schema::table('stories', function (Blueprint $table) {
}); $table->dropColumn('id');
Schema::table('stories', function (Blueprint $table) { });
$table->bigIncrements('bigIncrements')->first(); Schema::table('stories', function (Blueprint $table) {
}); $table->bigIncrements('bigIncrements')->first();
});
}
Schema::table('profiles', function (Blueprint $table) { Schema::table('profiles', function (Blueprint $table) {
$table->dropColumn('status'); $table->dropColumn('status');

View file

@ -60,13 +60,7 @@ class Stories extends Migration
{ {
Schema::dropIfExists('story_items'); Schema::dropIfExists('story_items');
Schema::dropIfExists('story_views'); Schema::dropIfExists('story_views');
Schema::dropIfExists('story_reactions');
Schema::table('stories', function (Blueprint $table) { Schema::dropIfExists('stories');
$table->dropColumn(['title','preview_photo','local_only','is_live','broadcast_url','broadcast_key']);
});
Schema::table('story_reactions', function (Blueprint $table) {
$table->dropColumn('story_id');
});
} }
} }

View file

@ -40,6 +40,6 @@ class CreateNewsroomTable extends Migration
*/ */
public function down() public function down()
{ {
Schema::dropIfExists('site_news'); Schema::dropIfExists('newsroom');
} }
} }

View file

@ -27,6 +27,6 @@ class AddCacheLocksTable extends Migration
*/ */
public function down() public function down()
{ {
Schema::dropTable('cache_locks'); Schema::dropIfExists('cache_locks');
} }
} }

View file

@ -33,14 +33,25 @@ class AddComposeSettingsToUserSettingsTable extends Migration
public function down() public function down()
{ {
Schema::table('user_settings', function (Blueprint $table) { 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) { Schema::table('media', function (Blueprint $table) {
$table->string('caption')->change(); $table->string('caption')->change();
$table->dropIndex('profile_id');
$table->dropIndex('mime'); $schemaManager = Schema::getConnection()->getDoctrineSchemaManager();
$table->dropIndex('license'); $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');
}
}); });
} }
} }

View file

@ -28,7 +28,7 @@ return new class extends Migration
$schemaManager = Schema::getConnection()->getDoctrineSchemaManager(); $schemaManager = Schema::getConnection()->getDoctrineSchemaManager();
$indexesFound = $schemaManager->listTableIndexes('user_roles'); $indexesFound = $schemaManager->listTableIndexes('user_roles');
if (array_key_exists('user_roles_profile_id_unique', $indexesFound)) { 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(); $table->unsignedBigInteger('profile_id')->unique()->nullable()->index()->change();
}); });
@ -42,7 +42,11 @@ return new class extends Migration
Schema::dropIfExists('parental_controls'); Schema::dropIfExists('parental_controls');
Schema::table('user_roles', function (Blueprint $table) { 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(); $table->unsignedBigInteger('profile_id')->unique()->index()->change();
}); });
} }

View file

@ -1204,12 +1204,19 @@ export default {
}, 300); }, 300);
}).catch(function(e) { }).catch(function(e) {
switch(e.response.status) { 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: case 413:
self.uploading = false; self.uploading = false;
io.value = null; 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'); 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; self.page = 2;
break; break;
case 451: case 451:
self.uploading = false; self.uploading = false;

View file

@ -31,5 +31,5 @@ return [
'unhealthy_backup_found_empty' => 'このアプリケーションのバックアップはありません。', 'unhealthy_backup_found_empty' => 'このアプリケーションのバックアップはありません。',
'unhealthy_backup_found_old' => ':date に作成されたバックアップは古すぎます。', 'unhealthy_backup_found_old' => ':date に作成されたバックアップは古すぎます。',
'unhealthy_backup_found_unknown' => '正確な原因が特定できませんでした。', 'unhealthy_backup_found_unknown' => '正確な原因が特定できませんでした。',
'unhealthy_backup_found_full' => 'バックアップが使用できる容量(:disk_limit)を超えています。(現在の使用量 :disk_usage), 'unhealthy_backup_found_full' => 'バックアップが使用できる容量(:disk_limit)を超えています。(現在の使用量 :disk_usage)',
]; ];

View file

@ -654,7 +654,7 @@
<tr> <tr>
<td><span class="badge badge-primary">MEDIA</span></td> <td><span class="badge badge-primary">MEDIA</span></td>
<td><strong>MEDIA_EXIF_DATABASE</strong></td> <td><strong>MEDIA_EXIF_DATABASE</strong></td>
<td><span>{{config_cache('media.exif.batabase') ? '✅ true' : '❌ false' }}</span></td> <td><span>{{config_cache('media.exif.database') ? '✅ true' : '❌ false' }}</span></td>
</tr> </tr>
<tr> <tr>