# Copyright (C) 2016-2018 Internet Systems Consortium, Inc. ("ISC")
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

# Turn off foreign key checks as CASCADE isn't really supported in MySQL
SET SESSION FOREIGN_KEY_CHECKS = 0;
DROP TABLE IF EXISTS lease4;
DROP TABLE IF EXISTS lease6;
DROP TABLE IF EXISTS lease6_types;
DROP TABLE IF EXISTS lease_hwaddr_source;
DROP TABLE IF EXISTS schema_version;
DROP TABLE IF EXISTS ipv6_reservations;
DROP TABLE IF EXISTS hosts;
DROP TABLE IF EXISTS dhcp4_options;
DROP TABLE IF EXISTS dhcp6_options;
DROP TABLE IF EXISTS host_identifier_type;
DROP TABLE IF EXISTS lease_state;
DROP TABLE IF EXISTS dhcp_option_scope;
DROP TRIGGER IF EXISTS host_BDEL;
DROP PROCEDURE IF EXISTS lease4DumpHeader;
DROP PROCEDURE IF EXISTS lease4DumpData;
DROP PROCEDURE IF EXISTS lease6DumpHeader;
DROP PROCEDURE IF EXISTS lease6DumpData;
DROP TRIGGER IF EXISTS lease4_stat_insert;
DROP TRIGGER IF EXISTS lease4_stat_update;
DROP TRIGGER IF EXISTS lease4_stat_delete;
DROP TABLE IF EXISTS lease4_stat;
DROP TRIGGER IF EXISTS lease6_stat_insert;
DROP TRIGGER IF EXISTS lease6_stat_update;
DROP TRIGGER IF EXISTS lease6_stat_delete;
DROP TABLE IF EXISTS lease6_stat;
DROP TABLE IF EXISTS logs;
DROP TABLE IF EXISTS dhcp4_audit;
DROP TABLE IF EXISTS dhcp4_global_parameter;
DROP TABLE IF EXISTS dhcp4_global_parameter_server;
DROP TABLE IF EXISTS dhcp4_option_def;
DROP TABLE IF EXISTS dhcp4_option_def_server;
DROP TABLE IF EXISTS dhcp4_options_server;
DROP TABLE IF EXISTS dhcp4_pool;
DROP TABLE IF EXISTS dhcp4_server;
DROP TABLE IF EXISTS dhcp4_shared_network;
DROP TABLE IF EXISTS dhcp4_shared_network_server;
DROP TABLE IF EXISTS dhcp4_subnet;
DROP TABLE IF EXISTS dhcp4_subnet_server;
DROP TABLE IF EXISTS dhcp6_audit;
DROP TABLE IF EXISTS dhcp6_global_parameter;
DROP TABLE IF EXISTS dhcp6_global_parameter_server;
DROP TABLE IF EXISTS dhcp6_option_def;
DROP TABLE IF EXISTS dhcp6_option_def_server;
DROP TABLE IF EXISTS dhcp6_options_server;
DROP TABLE IF EXISTS dhcp6_pd_pool;
DROP TABLE IF EXISTS dhcp6_pool;
DROP TABLE IF EXISTS dhcp6_server;
DROP TABLE IF EXISTS dhcp6_shared_network;
DROP TABLE IF EXISTS dhcp6_shared_network_server;
DROP TABLE IF EXISTS dhcp6_subnet;
DROP TABLE IF EXISTS dhcp6_subnet_server;
DROP TABLE IF EXISTS modification;
