mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-09 16:24:51 +00:00
Fix migration sqlite support
This commit is contained in:
parent
cbdfb69436
commit
e3899d3684
18 changed files with 141 additions and 189 deletions
|
@ -27,8 +27,7 @@ class AddFiltersToMediaTable extends Migration
|
||||||
public function down()
|
public function down()
|
||||||
{
|
{
|
||||||
Schema::table('media', function (Blueprint $table) {
|
Schema::table('media', function (Blueprint $table) {
|
||||||
$table->dropColumn('filter_name');
|
$table->dropColumn(['filter_name','filter_class']);
|
||||||
$table->dropColumn('filter_class');
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,10 +29,7 @@ class Add2faToUsersTable extends Migration
|
||||||
public function down()
|
public function down()
|
||||||
{
|
{
|
||||||
Schema::table('users', function (Blueprint $table) {
|
Schema::table('users', function (Blueprint $table) {
|
||||||
$table->dropColumn('2fa_enabled');
|
$table->dropColumn(['2fa_enabled','2fa_secret','2fa_backup_codes','2fa_setup_at']);
|
||||||
$table->dropColumn('2fa_secret');
|
|
||||||
$table->dropColumn('2fa_backup_codes');
|
|
||||||
$table->dropColumn('2fa_setup_at');
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,10 +29,7 @@ class UpdateSettingsTable extends Migration
|
||||||
public function down()
|
public function down()
|
||||||
{
|
{
|
||||||
Schema::table('user_settings', function (Blueprint $table) {
|
Schema::table('user_settings', function (Blueprint $table) {
|
||||||
$table->dropColumn('show_profile_followers');
|
$table->dropColumn(['show_profile_followers','show_profile_follower_count','show_profile_following','show_profile_following_count']);
|
||||||
$table->dropColumn('show_profile_follower_count');
|
|
||||||
$table->dropColumn('show_profile_following');
|
|
||||||
$table->dropColumn('show_profile_following_count');
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,13 +32,7 @@ class UpdateMediaTableAddAltText extends Migration
|
||||||
public function down()
|
public function down()
|
||||||
{
|
{
|
||||||
Schema::table('media', function (Blueprint $table) {
|
Schema::table('media', function (Blueprint $table) {
|
||||||
$table->dropColumn('original_sha256');
|
$table->dropColumn(['original_sha256','optimized_sha256','caption','hls_path','hls_transcoded_at','key','metadata']);
|
||||||
$table->dropColumn('optimized_sha256');
|
|
||||||
$table->dropColumn('caption');
|
|
||||||
$table->dropColumn('hls_path');
|
|
||||||
$table->dropColumn('hls_transcoded_at');
|
|
||||||
$table->dropColumn('key');
|
|
||||||
$table->dropColumn('metadata');
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,8 +27,7 @@ class UpdateFollowerTableAddRemoteFlags extends Migration
|
||||||
public function down()
|
public function down()
|
||||||
{
|
{
|
||||||
Schema::table('followers', function (Blueprint $table) {
|
Schema::table('followers', function (Blueprint $table) {
|
||||||
$table->dropColumn('local_profile');
|
$table->dropColumn(['local_profile','local_following']);
|
||||||
$table->dropColumn('local_following');
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,11 +30,7 @@ class UpdateMediaAddAltText extends Migration
|
||||||
public function down()
|
public function down()
|
||||||
{
|
{
|
||||||
Schema::table('media', function (Blueprint $table) {
|
Schema::table('media', function (Blueprint $table) {
|
||||||
$table->dropColumn('license');
|
$table->dropColumn(['license','is_nsfw','version','remote_media','remote_url']);
|
||||||
$table->dropColumn('is_nsfw');
|
|
||||||
$table->dropColumn('version');
|
|
||||||
$table->dropColumn('remote_media');
|
|
||||||
$table->dropColumn('remote_url');
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,10 +16,7 @@ class AddAccountStatusToProfilesTable extends Migration
|
||||||
// Drop old columns, fix stories
|
// Drop old columns, fix stories
|
||||||
if(Schema::hasColumn('profiles', 'hub_url')) {
|
if(Schema::hasColumn('profiles', 'hub_url')) {
|
||||||
Schema::table('profiles', function (Blueprint $table) {
|
Schema::table('profiles', function (Blueprint $table) {
|
||||||
$table->dropColumn('verify_token');
|
$table->dropColumn(['verify_token','secret','salmon_url','hub_url']);
|
||||||
$table->dropColumn('secret');
|
|
||||||
$table->dropColumn('salmon_url');
|
|
||||||
$table->dropColumn('hub_url');
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -28,9 +28,7 @@ class UpdateProfilesTable extends Migration
|
||||||
public function down()
|
public function down()
|
||||||
{
|
{
|
||||||
Schema::table('profiles', function (Blueprint $table) {
|
Schema::table('profiles', function (Blueprint $table) {
|
||||||
$table->dropColumn('unlisted');
|
$table->dropColumn(['unlisted','cw','no_autolink']);
|
||||||
$table->dropColumn('cw');
|
|
||||||
$table->dropColumn('no_autolink');
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -62,12 +62,7 @@ class Stories extends Migration
|
||||||
Schema::dropIfExists('story_views');
|
Schema::dropIfExists('story_views');
|
||||||
|
|
||||||
Schema::table('stories', function (Blueprint $table) {
|
Schema::table('stories', function (Blueprint $table) {
|
||||||
$table->dropColumn('title');
|
$table->dropColumn(['title','preview_photo','local_only','is_live','broadcast_url','broadcast_key']);
|
||||||
$table->dropColumn('preview_photo');
|
|
||||||
$table->dropColumn('local_only');
|
|
||||||
$table->dropColumn('is_live');
|
|
||||||
$table->dropColumn('broadcast_url');
|
|
||||||
$table->dropColumn('broadcast_key');
|
|
||||||
});
|
});
|
||||||
|
|
||||||
Schema::table('story_reactions', function (Blueprint $table) {
|
Schema::table('story_reactions', function (Blueprint $table) {
|
||||||
|
|
|
@ -27,8 +27,7 @@ class AddRemoteToAvatarsTable extends Migration
|
||||||
public function down()
|
public function down()
|
||||||
{
|
{
|
||||||
Schema::table('avatars', function (Blueprint $table) {
|
Schema::table('avatars', function (Blueprint $table) {
|
||||||
$table->dropColumn('remote_url');
|
$table->dropColumn(['remote_url','last_fetched_at']);
|
||||||
$table->dropColumn('last_fetched_at');
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,8 +27,7 @@ class AddRepliesCountToStatusesTable extends Migration
|
||||||
public function down()
|
public function down()
|
||||||
{
|
{
|
||||||
Schema::table('statuses', function (Blueprint $table) {
|
Schema::table('statuses', function (Blueprint $table) {
|
||||||
$table->dropColumn('reply_count');
|
$table->dropColumn(['reply_count','comments_disabled']);
|
||||||
$table->dropColumn('comments_disabled');
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,8 +32,7 @@ class AddLayoutToProfilesTable extends Migration
|
||||||
public function down()
|
public function down()
|
||||||
{
|
{
|
||||||
Schema::table('profiles', function (Blueprint $table) {
|
Schema::table('profiles', function (Blueprint $table) {
|
||||||
$table->dropColumn('profile_layout');
|
$table->dropColumn(['profile_layout','post_layout']);
|
||||||
$table->dropColumn('post_layout');
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,12 +32,7 @@ class AddFetchedAtToProfilesTable extends Migration
|
||||||
public function down()
|
public function down()
|
||||||
{
|
{
|
||||||
Schema::table('profiles', function (Blueprint $table) {
|
Schema::table('profiles', function (Blueprint $table) {
|
||||||
$table->dropColumn('last_fetched_at');
|
$table->dropColumn(['last_fetched_at','status_count','followers_count','following_count','webfinger','avatar_url']);
|
||||||
$table->dropColumn('status_count');
|
|
||||||
$table->dropColumn('followers_count');
|
|
||||||
$table->dropColumn('following_count');
|
|
||||||
$table->dropColumn('webfinger');
|
|
||||||
$table->dropColumn('avatar_url');
|
|
||||||
$table->text('keybase_proof')->nullable()->after('post_layout');
|
$table->text('keybase_proof')->nullable()->after('post_layout');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,16 +36,10 @@ class AddRemoteUrlToStoriesTable extends Migration
|
||||||
public function down()
|
public function down()
|
||||||
{
|
{
|
||||||
Schema::table('stories', function (Blueprint $table) {
|
Schema::table('stories', function (Blueprint $table) {
|
||||||
$table->dropColumn('remote_url');
|
$table->dropColumn(['remote_url','media_url','is_archived','name']);
|
||||||
$table->dropColumn('media_url');
|
|
||||||
$table->dropColumn('is_archived');
|
|
||||||
$table->dropColumn('name');
|
|
||||||
});
|
});
|
||||||
Schema::table('media', function (Blueprint $table) {
|
Schema::table('media', function (Blueprint $table) {
|
||||||
$table->dropColumn('blurhash');
|
$table->dropColumn(['blurhash','srcset','width','height']);
|
||||||
$table->dropColumn('srcset');
|
|
||||||
$table->dropColumn('width');
|
|
||||||
$table->dropColumn('height');
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,9 +28,7 @@ class AddTypeToDirectMessagesTable extends Migration
|
||||||
public function down()
|
public function down()
|
||||||
{
|
{
|
||||||
Schema::table('direct_messages', function (Blueprint $table) {
|
Schema::table('direct_messages', function (Blueprint $table) {
|
||||||
$table->dropColumn('type');
|
$table->dropColumn(['type','is_hidden','meta']);
|
||||||
$table->dropColumn('is_hidden');
|
|
||||||
$table->dropColumn('meta');
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,8 +28,7 @@ class AddStatusProfileIdToLikesTable extends Migration
|
||||||
public function down()
|
public function down()
|
||||||
{
|
{
|
||||||
Schema::table('likes', function (Blueprint $table) {
|
Schema::table('likes', function (Blueprint $table) {
|
||||||
$table->dropColumn('status_profile_id');
|
$table->dropColumn(['status_profile_id','is_comment']);
|
||||||
$table->dropColumn('is_comment');
|
|
||||||
$table->boolean('flagged')->default(false);
|
$table->boolean('flagged')->default(false);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,8 +27,7 @@ class AddSkipOptimizeToMediaTable extends Migration
|
||||||
public function down()
|
public function down()
|
||||||
{
|
{
|
||||||
Schema::table('media', function (Blueprint $table) {
|
Schema::table('media', function (Blueprint $table) {
|
||||||
$table->dropColumn('skip_optimize');
|
$table->dropColumn(['skip_optimize','replicated_at']);
|
||||||
$table->dropColumn('replicated_at');
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,9 +29,7 @@ class AddCdnUrlToAvatarsTable extends Migration
|
||||||
public function down()
|
public function down()
|
||||||
{
|
{
|
||||||
Schema::table('avatars', function (Blueprint $table) {
|
Schema::table('avatars', function (Blueprint $table) {
|
||||||
$table->dropColumn('cdn_url');
|
$table->dropColumn(['cdn_url','size','is_remote']);
|
||||||
$table->dropColumn('size');
|
|
||||||
$table->dropColumn('is_remote');
|
|
||||||
$table->string('thumb_path')->nullable();
|
$table->string('thumb_path')->nullable();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue