Skip to content

Instantly share code, notes, and snippets.

@fredkingham
Created December 21, 2022 10:21
Show Gist options
  • Save fredkingham/f69bbfc1a01995b06b075c0a73b90f18 to your computer and use it in GitHub Desktop.
Save fredkingham/f69bbfc1a01995b06b075c0a73b90f18 to your computer and use it in GitHub Desktop.
Deletes the lab module
DELETE FROM django_migrations WHERE app='lab';
DELETE FROM auth_permission WHERE content_type_id in (SELECT id FROM django_content_type WHERE app_label='lab');
DELETE FROM django_admin_log WHERE content_type_id in (SELECT id FROM django_content_type WHERE app_label = 'lab');
DELETE FROM reversion_version WHERE content_type_id in (
SELECT id FROM django_content_type WHERE app_label = 'lab'
);
DELETE FROM django_content_type WHERE app_label='lab';
DROP TABLE lab_labtest CASCADE;
DROP TABLE lab_labtest_resistant_antibiotics CASCADE;
DROP TABLE lab_labtest_sensitive_antibiotics CASCADE;
DROP TABLE lab_observation CASCADE;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment