it's become increasingly clear that rebased is dead and I need to move (sound familiar?). there are a few ways I could go about this and I'll let you decide
@Cocoa Migrating to upstream shouldn't be too hard, just need to make a DB backup, revert some migrations (./bin/pleroma_ctl database rollback should do the trick, though I haven't tried it), possibly drop settings from DB config (which you shouldn't use anyway on singleuser instances), then clone the new repo and set it up as usual barring the config.exs changes.
@mint @Cocoa

> just need to make a DB backup, revert some migrations (./bin/pleroma_ctl database rollback should do the trick,

It is extremely important to note that you have to roll back using the old codebase.
@p @Cocoa Yeah, I said "then clone the new repo" after reverting migrations.
@p @Cocoa I might make a more detailed instruction a little later.
@Cocoa @p Alright, tested the process out on a VM with rebased that has like one user and three posts. I'm gonna assume you followed instructions on https://soapbox.pub/install/ during initial installation (which for whatever reason make you use some third-party package manager for Erlang/Elixir, which I think should work with base Pleroma). If not, you should already know whether something should be adjusted.
1. Stop pleromer (`systemctl stop pleroma` or whatever other init system you use)
2. Log in as pleroma user (`sudo -Hu pleroma bash`) and enter /opt/pleroma
3. Rollback vegan-specific migrations by executing following commands in that order:
MIX_ENV=prod mix pleroma.database rollback 20221207235104
MIX_ENV=prod mix pleroma.database rollback 20221029171353
MIX_ENV=prod mix pleroma.database rollback 20220927220033
MIX_ENV=prod mix pleroma.database rollback 20220819171321
MIX_ENV=prod mix pleroma.database rollback 20220624104914
MIX_ENV=prod mix pleroma.database rollback 20220225164000
MIX_ENV=prod mix pleroma.database rollback 20210612185407
4. Exit pleroma user (`exit`) and drop the column that can't be rolled back with mix: `sudo -Hu postgres psql pleroma -c "alter table users drop column location;"`
5. Go back to /opt, rename /opt/pleroma into something else (e.g. `mv /opt/pleroma /opt/glussy`), then clone upstream repo (`git clone https://git.pleroma.social/pleroma/pleroma`)
6. Copy config/prod.secret.exs from old directory to new.
7. Log back in as pleroma user, go to /opt/pleroma and run the following to compile the new version and migrate the DB
mix local.hex --force
mix local.rebar --force
mix deps.get
MIX_ENV=prod mix compile
MIX_ENV=prod mix ecto.migrate
8. After all that's done, log out and restart pleromer (`systemctl start pleroma`). If there are no invalid config entries, it should work out of box. If not, stop pleromer and try running it manually (`sudo -Hu pleroma MIX_ENV=prod mix phx.server`) then tell me what the error is. Worst case scenario, you'd have to remove DB configs (`TRUNCATE TABLE config`) and reconfigure it manually.
Follow

@mint @p @Cocoa @mint
Wow, that is an impressive number of rollbacks! Were there so many breaking changes to the data structures in Rebased? ๐Ÿค”
I was always thinking that it should be pretty minor and that most changes were on the frontend side ๐Ÿ˜†

ยท tut-tui ยท 2 ยท 0 ยท 4
@m0xee @mint @Cocoa They wanted stuff like birthdays, mailing lists, locations. You know, because Twitter has those fields.

@m0xee @p @Cocoa Compared to ackoma, it is fairly minor, with most changes being either adding fields that no one would use or making some index for certain activity type.

$ diff -uar <(ls -1 ackoma/priv/repo/migrations) <(ls -1 pleroma/priv/repo/migrations) --- /proc/self/fd/11 2024-07-06 20:48:25.221400761 +0300 +++ /proc/self/fd/12 2024-07-06 20:48:25.221400761 +0300 @@ -272,6 +272,7 @@ 20210222183840_remove_hashtags_objects_duplicate_index.exs 20210222184616_change_hashtags_name_to_text.exs 20210401143153_user_notification_settings_fix.exs +20210416051708_remove_mastofe_settings_from_users.exs 20210420204354_delete_hashtags_objects_cascade.exs 20210717000000_add_poll_to_notifications_enum.exs 20210818023112_add_user_id_to_apps.exs @@ -281,32 +282,36 @@ 20211222165256_add_last_status_at_to_users.exs 20211225154802_add_is_discoverable_index_to_users.exs 20211229075801_user_relationships_target_id_relationship_type_index.exs -20220108213213_add_mastofe_settings.exs +20220116183110_add_birthday_to_users.exs +20220125104429_add_birthday_month_day_index_to_users.exs +20220203224011_create_rules.exs 20220220135625_upload_filter_exiftool_to_exiftool_strip_location.exs 20220302013920_add_language_to_users.exs 20220308012601_create_announcements.exs +20220319000000_add_status_to_notifications_enum.exs 20220506175506_add_index_hotspots.exs 20220509180452_change_thread_visibility_to_be_local_only_aware.exs +20220527134341_add_quote_url_index_to_objects.exs +20220602052233_change_report_notes_content_to_text.exs 20220605185734_add_update_to_notifications_enum.exs -20220718102634_upgrade_oban_to_v11.exs -20220805123645_remove_remote_cancelled_follow_requests.exs -20220831170605_remove_local_cancelled_follows.exs +20220616163503_add_expires_at_to_user_relationships.exs +20220711182322_add_associated_object_id_function.exs +20220711192750_switch_to_associated_object_id_index.exs +20220807125023_data_migration_delete_context_objects.exs +20220821004840_change_thread_visibility_to_use_new_object_id_index.exs 20220905011454_generate_unset_user_keys.exs -20220911195347_add_user_frontend_profiles.exs -20220916115149_ensure_mastofe_settings.exs -20221020135943_add_nodeinfo.exs -20221123221956_add_has_request_signatures.exs -20221128103145_add_per_user_post_expiry.exs -20221129105331_add_notification_activity_id_index.exs -20221129110627_add_bookmarks_activity_id_index.exs -20221129110727_add_report_notes_activity_id_index.exs -20221129112022_add_cascade_to_report_notes_on_activity_delete.exs -20221203232118_add_user_follows_hashtag.exs -20221211234352_remove_unused_indices.exs -20230127143303_rename_index_users_ap_id_coalesce_follower_address_index.exs -20230522213837_add_unfollowed_dm_restrictions.exs +20221103014611_create_oban_peers.exs +20221103014728_swap_primary_oban_indexes.exs +20221111164213_deprecate_quack.exs +20221216052127_add_state_to_backups.exs +20230306112859_instances_add_metadata.exs +20230422154018_drop_unused_indexes.exs +20230504173400_remove_user_ap_enabled.exs +20231107200724_consolidate_email_queues.exs 20240207035927_create_rich_media_card.exs -20240210000000_drop_chat_tables.exs -20240213120000_add_permit_followback.exs -20240425120000_upload_filter_exiftool_to_exiftool_strip_location_real.exs -20240501190000_drop_unused_indexes.exs +20240223165000_create_bookmark_folders.exs +20240406000000_add_hint_to_rules.exs +20240527144418_oban_queues_refactor.exs +20240530011739_add_missing_foreign_keys.exs +20240608003957_upgrade_oban_jobs_to_v12.exs +20240619141319_deprecate_config_db_logger.exs

@mint @p @Cocoa
Adding an index for bookmarks looks like a good idea though.
Maybe few use them, but I do and I can clearly hear cogs turning with audible screeches in my Pelonmer when I switch to that tab ๐Ÿ˜‚

@m0xee @p @Cocoa Same. Backporting it might be a good idea, yeah.
Sign in to participate in the conversation
Librem Social

Librem Social is an opt-in public network. Messages are shared under Creative Commons BY-SA 4.0 license terms. Policy.

Stay safe. Please abide by our code of conduct.

(Source code)

image/svg+xml Librem Chat image/svg+xml