Closed Bug 1238058 Opened 10 years ago Closed 10 years ago

Add migrations to remove Demo Studio database tables

Categories

(developer.mozilla.org Graveyard :: Demo Studio / Dev Derby, defect)

defect
Not set
minor

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: openjck, Assigned: robhudson)

References

Details

(Keywords: in-triage)

No description provided.
Severity: normal → minor
Keywords: in-triage
This still needs to be done. I'm not sure of the protocol around removing tables from a django app that has been removed. Do we do it manually from the SQL shell? Do we write a migration and put it in kuma/core/?
I think the latter? Maybe Jannis or John can say more.
We've been inconsistent in the past with removing tables we don't need anymore, so let's remove them this time when we deploy the removal of the code as well. We can create an empty data migration in the kuma.core app for that.
We'll have to be sure we no longer need the data. Should we dump those tables in an easy to import format and store it somewhere?
That's a good idea, but I don't know where to store that data tbh. C, has anything like that been done in the past?
Flags: needinfo?(cliang)
Assignee: nobody → robhudson
I was hoping we could use Django's migrations for this but after looking for docs on best practices about this I found there are no docs about this. I tried commenting out the models.py file and running makemigrations which was successful to some degree until I got to demos/models.py which references some custom fields and things don't work well because they are referenced in the 0001_initial migration. It would seem as if we would need to push code to remove the tables before we actually remove the code and this could still be problematic. So I used the output of the above step to help guide me to what to delete using raw SQL. We can wrap this SQL in a `migrations.RunSQL` operation.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Flags: needinfo?(cliang)
Product: developer.mozilla.org → developer.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.