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)
developer.mozilla.org Graveyard
Demo Studio / Dev Derby
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: openjck, Assigned: robhudson)
References
Details
(Keywords: in-triage)
No description provided.
| Assignee | ||
Comment 1•10 years ago
|
||
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/?
| Reporter | ||
Comment 2•10 years ago
|
||
I think the latter? Maybe Jannis or John can say more.
Comment 3•10 years ago
|
||
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.
| Assignee | ||
Comment 4•10 years ago
|
||
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?
Comment 5•10 years ago
|
||
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 | ||
Updated•10 years ago
|
Assignee: nobody → robhudson
| Assignee | ||
Comment 6•10 years ago
|
||
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.
Comment 7•10 years ago
|
||
Commit pushed to master at https://github.com/mozilla/kuma
https://github.com/mozilla/kuma/commit/d73af0fdbbbd2bacc6e3248716744ab349758ce1
Fix bug 1238058 - Add migrations to remove demo studio tables
Updated•10 years ago
|
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Updated•10 years ago
|
Flags: needinfo?(cliang)
Updated•6 years ago
|
Product: developer.mozilla.org → developer.mozilla.org Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•