After the recent database migration, we're encountering an issue with our comment threads. The threadId values in our comments table no longer match the new database IDs, causing comments to display incorrectly.
The most efficient solution is to directly update the threadId in the database using a SQL UPDATE query with a mapping of old to new IDs
UPDATE comments
SET thread_id = new_ids.new_id
FROM (
SELECT old_id, new_id
FROM id_mapping_table -- Replace with the actual name of your mapping table
) AS new_ids
WHERE comments.thread_id = new_ids.old_id;
If you do not have the old thread ID, unfortunately, you will not be able to access it. As mentioned earlier, Retool does not provide a user-facing method to access or modify internal thread IDs. Since you're using Retool's new comment thread feature, the threads are stored within Retool's infrastructure, not your database and direct access to the underlying data is not available.
Your best option is to rebuild your comment threads with new IDs.
Yes @WidleStudioLLP is correct. If you have a self hosted instance of Retool, you would have access to the database table where the old comment IDs are stored.
It sounds like you are on the cloud and unfortunately these tables are not exposed to end users for security reasons. Our apologies for the confusion.