dimagi / open-chat-studio

A web based platform for building Chatbots backed by Large Language Models
BSD 3-Clause "New" or "Revised" License
13 stars 7 forks source link

Move Participant models from the experiments app to the participants app #445

Closed SmittieC closed 2 weeks ago

SmittieC commented 3 weeks ago

There are three ways one can approach moving models to a new app. I opted for the django way where one create the migrations, but use the SeparateDatabaseAndState operation to update django's state by running the original migrations only on the state. The DB operations to delete the tables from the experiments app and create them in the participants app should be overwritten to rather just rename the table.

Initial testing showed that nothing breaks, but this doesn't mean it's working as expected. I still have to ensure I know exactly what happens to the indexes and unique constraints that would have been removed. My code just leaves them alone, which I suspect is wrong. Maybe we should rename them as well. For now, I'm parking this change until we decide to tackle it.

SmittieC commented 3 weeks ago

@snopoke for your review. Happy to create a ticket and link these changes for future implementation

SmittieC commented 2 weeks ago

Closing to minimize PR clutter. I created an issue to tackle this and linked this PR to it