Closed Bug 1498441 Opened 6 years ago Closed 6 years ago

move "os_names" table to Django

Categories

(Socorro :: Database, task, P2)

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: willkg, Assigned: willkg)

References

Details

Attachments

(2 files)

There's an OsName model with a os_names table defined in the sqlalchemy models. This holds platform information that's predominantly static.

This bug covers moving that table over to Django.
Step 1:

1. Create Django model, migration, and Django admin view
2. Create a data migration script to copy data from old table to new table

Step 2:

1. Rewrite /api/Platforms/ to use new table
2. Rewrite all the views that use that

Step 3:

1. Delete old table


One thing is that we add items to this table in socorro/external/postgresql/staticdata.py as part of bootstrapping the local dev environment. We're going to want to set up something similar for Django-managed data. Probably a fixture.
Assignee: nobody → willkg
Status: NEW → ASSIGNED
Priority: -- → P2
Commits pushed to master at https://github.com/mozilla-services/socorro

https://github.com/mozilla-services/socorro/commit/6bc50c7c660ee0a8b0bad2340c2b5673c551f879
bug 1498441: create Platform Django model and migration script

https://github.com/mozilla-services/socorro/commit/ef3fdfcfe003c027ab5516c2dfc09e3eb854a572
Merge pull request #4646 from willkg/1498441-os-names

bug 1498441: create Platform Django model and migration script
Commits pushed to master at https://github.com/mozilla-services/socorro

https://github.com/mozilla-services/socorro/commit/f47d25d8445727fa6a63c85b22ff2e1dfe299496
bug 1498441: rewrite everything to use new Platform model

This rewrites everything to use the new Platform Django model.

This also removes the /api/Platforms/ endpoint. I checked the dashboards
and it's not being used. It returned a static result, so anyone can just
hardcode that.

This removes the staticdata for the OsName model. In its place, it adds
a Django fixture and adds a line to the setup script to load that.

This also adds a schema migration to fix the crashstats_platform table
so that "name" is unique.

https://github.com/mozilla-services/socorro/commit/eb491e6f187ddc58f0c145254fc2de0edd6f2213
Merge pull request #4647 from willkg/1498441-platform-step-2

bug 1498441: rewrite everything to use new Platform model
Last thing to do here is delete the "os_names" and "os_name_matche" tables.
I created a new bug to delete tables. Marking this one as FIXED.
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: