m2ms / fragalysis-frontend

The React, Redux frontend built by webpack
Other
1 stars 1 forks source link

Migrate Discourse links in database to become relative URLs #770

Open duncanpeacock opened 2 years ago

duncanpeacock commented 2 years ago

Discourse links in Fragalysis are currently stored as absolute URLs linking to the production version of Discourse. To enable a copy to staging, both the Fragalysis and Discourse databases will be copied over.

Hence the Fragalysis data from production to staging will need to be able to link to the staging version of Discourse.

duncanpeacock commented 2 years ago

Investigation into where absolute URLs are stored in Fragalysis.

At the moment absolute URLs appear to be stored in just a couple of tables:

For the snapshot actions the data seemed to be encoded - if Boris can check the frontend?.

Notes: viewer_sessionprojecttag

This also has a discourse_url -> we should make sure that this is not ever filled with an absolute url.

Frontend/Backend next steps to be investigated.

duncanpeacock commented 2 years ago

Discussed with Boris:

Following that the duplicate of the data/media from production to staging should work (assuming the discourse data has also been duplicated so the relative links work on the staging discourse server).

phraenquex commented 2 years ago

Fixed in the frontend