Skip to content

Instantly share code, notes, and snippets.

@willkg
Last active November 28, 2018 21:03
Show Gist options
  • Save willkg/ef8fa69973652fb6b819434ed019e732 to your computer and use it in GitHub Desktop.
Save willkg/ef8fa69973652fb6b819434ed019e732 to your computer and use it in GitHub Desktop.
--
-- Bug 1503383: drop everything
--
-- Drops all the stored procedures and things that we don't need anymore.
BEGIN WORK;
-- Drop functions
DROP FUNCTION IF EXISTS version_sort_digit(text) CASCADE;
DROP FUNCTION IF EXISTS major_version_sort(text) CASCADE;
DROP FUNCTION IF EXISTS add_new_product(text, major_version, text, text, numeric, numeric) CASCADE;
DROP FUNCTION IF EXISTS add_new_release(citext, citext, citext, numeric, citext, integer, text, text, boolean, boolean) CASCADE;
DROP FUNCTION IF EXISTS build_date(numeric) CASCADE;
DROP FUNCTION IF EXISTS build_numeric(character varying) CASCADE;
DROP FUNCTION IF EXISTS is_rapid_beta(text, text, text) CASCADE;
DROP FUNCTION IF EXISTS major_version(text) CASCADE;
DROP FUNCTION IF EXISTS nonzero_string(citext) CASCADE;
DROP FUNCTION IF EXISTS nonzero_string(text) CASCADE;
DROP FUNCTION IF EXISTS old_version_sort(text) CASCADE;
DROP FUNCTION IF EXISTS product_version_sort_number(text) CASCADE;
DROP FUNCTION IF EXISTS sunset_date(numeric, text) CASCADE;
DROP FUNCTION IF EXISTS to_major_version(text) CASCADE;
DROP FUNCTION IF EXISTS update_product_versions(integer) CASCADE;
DROP FUNCTION IF EXISTS version_matches_channel(text, citext) CASCADE;
DROP FUNCTION IF EXISTS version_sort(text, integer, citext) CASCADE;
DROP FUNCTION IF EXISTS version_sort_trigger() CASCADE;
DROP FUNCTION IF EXISTS version_sort_update_trigger_after() CASCADE;
DROP FUNCTION IF EXISTS version_sort_update_trigger_before() CASCADE;
DROP FUNCTION IF EXISTS version_string(text, integer) CASCADE;
DROP FUNCTION IF EXISTS version_string(text, integer, text) CASCADE;
-- Drop tables we definitely don't need
DROP TABLE IF EXISTS crontabber_log;
DROP TABLE IF EXISTS crontabber;
DROP TABLE IF EXISTS product_build_types;
DROP TABLE IF EXISTS product_productid_map;
DROP TABLE IF EXISTS product_release_channels;
DROP TABLE IF EXISTS product_version_builds;
DROP TABLE IF EXISTS product_versions;
DROP TABLE IF EXISTS products;
DROP TABLE IF EXISTS release_channels;
DROP TABLE IF EXISTS release_repositories;
DROP TABLE IF EXISTS releases_raw;
DROP TABLE IF EXISTS special_product_platforms;
COMMIT WORK;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment