impress/db/migrate
Matchu 96998643b5 Add manifest_url to swf_assets table
Ok so, impress-2020 guesses the manifest URL every time based on common
URL patterns. But the right way to do this is to read it from the
modeling data! But also, we don't have a great way to get the modeling
data directly. (Though as I write this, I guess we do have that
auto-modeling trick we use in the DTI 2020 codebase, I wonder if that
could work for this too?)

So anyway, in this change, we update the modeling code to save the
manifest URL, and also the migration includes a big block that attempts
to run impress-2020's manifest-guessing logic for every asset and save
the result!

It's uhh. Not fast. It runs at about 1 asset per second (a lot of these
aren't cache hits), and sometimes stalls out. And we have >600k assets,
so the estimated wall time is uhh. Seven days?

I think there's something we could do here around like, concurrent
execution? Though tbqh with the nature of the slowness being seemingly
about hitting the slow underlying images.neopets.com server, I don't
actually have a lot of faith that concurrency would actually be faster?

I also think it could be sensible to like… extract this from the
migration, and run it as a script to infer missing manifest URLs. That
would be easier to run in chunks and resume if something goes wrong.
Cuz like, I think my reasoning here was that backfilling this data was
part of the migration process… but the thing is, this migration can't
reliably get a manifest for everything (both cuz it depends on an
external service and cuz not everything has one), so it's a perfectly
valid migration to just leave the column as null for all the rows to
start, and fill this in later. I wish I'd written it like that!

But anyway, I'm just running this for now, and taking a break for the
night. Maybe later I'll come around and extract this into a separate
task to just try this on all assets missing manifests instead!
2023-11-09 21:42:51 -08:00
..
20101109021049_create_outfits.rb Oops, should've used migration version 4.2 2023-10-23 19:05:08 -07:00
20101109021147_create_item_outfit_relationships.rb Oops, should've used migration version 4.2 2023-10-23 19:05:08 -07:00
20101110213044_add_name_and_starred_to_outfits.rb Oops, should've used migration version 4.2 2023-10-23 19:05:08 -07:00
20101125153424_treat_sold_in_mall_as_a_boolean.rb Oops, should've used migration version 4.2 2023-10-23 19:05:08 -07:00
20101125154435_allow_null_for_some_objects_fields.rb Oops, should've used migration version 4.2 2023-10-23 19:05:08 -07:00
20101125160843_add_swf_assets_type_and_id_index.rb Oops, should've used migration version 4.2 2023-10-23 19:05:08 -07:00
20110126180835_users_devise.rb Oops, should've used migration version 4.2 2023-10-23 19:05:08 -07:00
20110210222230_guest_outfits.rb Oops, should've used migration version 4.2 2023-10-23 19:05:08 -07:00
20110514145602_add_has_image_to_swf_assets.rb Oops, should've used migration version 4.2 2023-10-23 19:05:08 -07:00
20110515134542_add_image_requested_to_swf_assets.rb Oops, should've used migration version 4.2 2023-10-23 19:05:08 -07:00
20110626202605_add_image_mode_tester_to_users.rb Oops, should've used migration version 4.2 2023-10-23 19:05:08 -07:00
20110712232259_create_closet_hangers.rb Oops, should've used migration version 4.2 2023-10-23 19:05:08 -07:00
20110713162012_set_closet_hangers_quantity_default_to_zero.rb Oops, should've used migration version 4.2 2023-10-23 19:05:08 -07:00
20110720183722_add_neopets_username_to_users.rb Oops, should've used migration version 4.2 2023-10-23 19:05:08 -07:00
20110722180616_add_owned_to_closet_hangers.rb Oops, should've used migration version 4.2 2023-10-23 19:05:08 -07:00
20110726231143_create_closet_lists.rb Oops, should've used migration version 4.2 2023-10-23 19:05:08 -07:00
20110730174148_add_closet_hangers_visibility_to_users.rb Oops, should've used migration version 4.2 2023-10-23 19:05:08 -07:00
20110731021808_add_visibility_to_closet_lists.rb Oops, should've used migration version 4.2 2023-10-23 19:05:08 -07:00
20110804134432_add_timestamps_to_items.rb Oops, should've used migration version 4.2 2023-10-23 19:05:08 -07:00
20110807212936_add_conversion_timestamps_to_swf_assets.rb Oops, should've used migration version 4.2 2023-10-23 19:05:08 -07:00
20120112204234_rename_swf_assets_id_to_remote_id.rb Oops, should've used migration version 4.2 2023-10-23 19:05:08 -07:00
20120308205324_add_image_to_outfits.rb Oops, should've used migration version 4.2 2023-10-23 19:05:08 -07:00
20120321214802_index_associations.rb Oops, should've used migration version 4.2 2023-10-23 19:05:08 -07:00
20120321222001_index_closet_hanger_query.rb Oops, should've used migration version 4.2 2023-10-23 19:05:08 -07:00
20120321231507_index_closet_hanger_query2.rb Oops, should've used migration version 4.2 2023-10-23 19:05:08 -07:00
20120521164652_add_female_and_mood_and_unconverted_and_labeled_to_pet_states.rb Oops, should've used migration version 4.2 2023-10-23 19:05:08 -07:00
20120716193946_add_image_layers_hash_to_outfit.rb Oops, should've used migration version 4.2 2023-10-23 19:05:08 -07:00
20120725232903_add_image_enqueued_to_outfits.rb Oops, should've used migration version 4.2 2023-10-23 19:05:08 -07:00
20121006010446_add_explicitly_body_specific_to_objects.rb Oops, should've used migration version 4.2 2023-10-23 19:05:08 -07:00
20130111213346_translate_items.rb Oops, should've used migration version 4.2 2023-10-23 19:05:08 -07:00
20130121193957_create_species.rb Oops, should've used migration version 4.2 2023-10-23 19:05:08 -07:00
20130121205607_create_colors.rb Oops, should've used migration version 4.2 2023-10-23 19:05:08 -07:00
20130121221226_create_zones.rb Oops, should've used migration version 4.2 2023-10-23 19:05:08 -07:00
20130128065543_remove_translated_fields_from_items.rb Oops, should've used migration version 4.2 2023-10-23 19:05:08 -07:00
20130427151327_add_glitched_to_pet_states.rb Oops, should've used migration version 4.2 2023-10-23 19:05:08 -07:00
20131016203607_add_image_manual_to_swf_assets.rb Oops, should've used migration version 4.2 2023-10-23 19:05:08 -07:00
20140117171729_create_neopets_connections.rb Oops, should've used migration version 4.2 2023-10-23 19:05:08 -07:00
20140119040646_add_contact_neopets_connection_id_to_users.rb Oops, should've used migration version 4.2 2023-10-23 19:05:08 -07:00
20140125202515_add_prank_to_colors.rb Oops, should've used migration version 4.2 2023-10-23 19:05:08 -07:00
20140331034031_add_artist_neopets_username_to_pet_state.rb Oops, should've used migration version 4.2 2023-10-23 19:05:08 -07:00
20140403034558_create_wardrobe_tips.rb Oops, should've used migration version 4.2 2023-10-23 19:05:08 -07:00
20140910014231_create_donations.rb Oops, should've used migration version 4.2 2023-10-23 19:05:08 -07:00
20140910030549_create_donation_features.rb Oops, should've used migration version 4.2 2023-10-23 19:05:08 -07:00
20140910181819_add_email_to_donations.rb Oops, should've used migration version 4.2 2023-10-23 19:05:08 -07:00
20140910204019_create_campaigns.rb Oops, should've used migration version 4.2 2023-10-23 19:05:08 -07:00
20140910204043_add_campaign_id_to_donation.rb Oops, should've used migration version 4.2 2023-10-23 19:05:08 -07:00
20150225194522_add_advertised_to_campaign.rb Oops, should've used migration version 4.2 2023-10-23 19:05:08 -07:00
20150728192329_add_description_to_campaigns.rb Oops, should've used migration version 4.2 2023-10-23 19:05:08 -07:00
20150728195029_add_name_to_campaigns.rb Oops, should've used migration version 4.2 2023-10-23 19:05:08 -07:00
20150802202909_add_theme_id_to_campaigns.rb Oops, should've used migration version 4.2 2023-10-23 19:05:08 -07:00
20150905181350_add_basic_image_hash_to_pet_types.rb Oops, should've used migration version 4.2 2023-10-23 19:05:08 -07:00
20150923052017_add_thanks_to_campaign.rb Oops, should've used migration version 4.2 2023-10-23 19:05:08 -07:00
20150927033046_create_news_posts.rb Oops, should've used migration version 4.2 2023-10-23 19:05:08 -07:00
20170105205222_add_purpose_to_campaigns.rb Oops, should've used migration version 4.2 2023-10-23 19:05:08 -07:00
20180509210338_add_manual_special_color_id_to_items.rb Oops, should've used migration version 4.2 2023-10-23 19:05:08 -07:00
20230729181111_drop_news_posts.rb Oops, should've used migration version 4.2 2023-10-23 19:05:08 -07:00
20230802195548_drop_wardrobe_tips.rb Oops, should've used migration version 4.2 2023-10-23 19:05:08 -07:00
20231024221826_delete_orphaned_closet_hangers.rb Stop orphaning hangers when deleting lists 2023-10-24 15:35:21 -07:00
20231110043543_add_manifest_url_to_swf_assets.rb Add manifest_url to swf_assets table 2023-11-09 21:42:51 -08:00