Closed Bug 1266773 Opened 8 years ago Closed 8 years ago

Delete unused tables in MDN database

Categories

(Infrastructure & Operations Graveyard :: WebOps: Other, task)

task
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: jwhitlock, Unassigned)

Details

(Whiteboard: [kanban:https://webops.kanbanize.com/ctrl_board/2/2895] )

During some recent work on the MDN anonymizing scripts [1], I discovered that there are tables that are no longer created in the dev environment, and are empty in the production environment:

mysql> SELECT COUNT(*) from auth_message;
+----------+
| COUNT(*) |
+----------+
|        0 |
+----------+
1 row in set (0.01 sec)

mysql> SELECT COUNT(*) from django_cache;
+----------+
| COUNT(*) |
+----------+
|        0 |
+----------+
1 row in set (0.00 sec)

I'd like these tables dropped from the production database. I can do it myself, but I'm not sure if this will affect existing processes.

[1] https://github.com/mozilla/kuma/pull/3843
Whiteboard: [kanban:https://webops.kanbanize.com/ctrl_board/2/2895]
I don't think it would unless it's being referenced by the code.  I could perhaps restart Apache when you drop those tables to be sure?
The code doesn't reference them, an Apache restart isn't needed.
Sorry to be unclear before. "Not sure if this will affect existing processes" means "I'm not sure if things outside of the MDN code, like database backup scripts or IT monitoring tools, will break if these tables are removed from the database".  The code does not refer to these tables at all, and won't be affected if they are removed.
I don't think we monitor individual tables and I believe our backups would be of the entire DB, not table-by-table, so this shouldn't be a problem.  Remove away and let me know and I'll look for any alerts.
I backed up the schema for the two empty tables (/home/jwhitlock/obsolete_tables.prod.20160428.sql), and dropped the tables from the production database.
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Product: Infrastructure & Operations → Infrastructure & Operations Graveyard
You need to log in before you can comment on or make changes to this bug.