Delete unused tables in MDN database

RESOLVED FIXED

Status

Infrastructure & Operations
WebOps: Other
RESOLVED FIXED
2 years ago
2 years ago

People

(Reporter: jwhitlock, Unassigned)

Tracking

Details

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

(Reporter)

Description

2 years ago
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

Updated

2 years ago
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?
(Reporter)

Comment 2

2 years ago
The code doesn't reference them, an Apache restart isn't needed.
(Reporter)

Comment 3

2 years ago
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.
(Reporter)

Comment 5

2 years ago
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
Last Resolved: 2 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.