mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-22 06:21:27 +00:00
commit
29785b5654
9 changed files with 43 additions and 25 deletions
|
@ -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');
|
||||
|
|
|
@ -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');
|
||||
}
|
||||
}
|
||||
|
|
|
@ -40,6 +40,6 @@ class CreateNewsroomTable extends Migration
|
|||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('site_news');
|
||||
Schema::dropIfExists('newsroom');
|
||||
}
|
||||
}
|
||||
|
|
|
@ -27,6 +27,6 @@ class AddCacheLocksTable extends Migration
|
|||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropTable('cache_locks');
|
||||
Schema::dropIfExists('cache_locks');
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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');
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
});
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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)',
|
||||
];
|
||||
|
|
|
@ -654,7 +654,7 @@
|
|||
<tr>
|
||||
<td><span class="badge badge-primary">MEDIA</span></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>
|
||||
|
|
Loading…
Reference in a new issue