#include <pslib.h>
#include <stdlib.h>

int main ()
{
    psDB            *dbh;

    dbh = psDBInit("localhost", "test", NULL, "test");
    if (!dbh) {
        exit(EXIT_FAILURE);
    }

    p_psDBRunQuery(dbh, "DROP TABLE IF EXISTS weather");
    p_psDBRunQuery(dbh, "DROP TABLE IF EXISTS skyp_transparency");
    p_psDBRunQuery(dbh, "DROP TABLE IF EXISTS skyp_absorption");
    p_psDBRunQuery(dbh, "DROP TABLE IF EXISTS skyp_emission");
    p_psDBRunQuery(dbh, "DROP TABLE IF EXISTS dimm");
    p_psDBRunQuery(dbh, "DROP TABLE IF EXISTS skyp_ir");
    p_psDBRunQuery(dbh, "DROP TABLE IF EXISTS dome");
    p_psDBRunQuery(dbh, "DROP TABLE IF EXISTS telescope");
    p_psDBRunQuery(dbh, "DROP TABLE IF EXISTS summitExp");
    p_psDBRunQuery(dbh, "DROP TABLE IF EXISTS pzPendingExp");
    p_psDBRunQuery(dbh, "DROP TABLE IF EXISTS pzPendingImfile");
    p_psDBRunQuery(dbh, "DROP TABLE IF EXISTS newExp");
    p_psDBRunQuery(dbh, "DROP TABLE IF EXISTS newImfile");
    p_psDBRunQuery(dbh, "DROP TABLE IF EXISTS rawDetrendExp");
    p_psDBRunQuery(dbh, "DROP TABLE IF EXISTS rawScienceExp");
    p_psDBRunQuery(dbh, "DROP TABLE IF EXISTS rawImfile");
    p_psDBRunQuery(dbh, "DROP TABLE IF EXISTS p1PendingExp");
    p_psDBRunQuery(dbh, "DROP TABLE IF EXISTS p2PendingExp");
    p_psDBRunQuery(dbh, "DROP TABLE IF EXISTS p2PendingImfile");
    p_psDBRunQuery(dbh, "DROP TABLE IF EXISTS p2DoneExp");
    p_psDBRunQuery(dbh, "DROP TABLE IF EXISTS p2DoneImfile");
    p_psDBRunQuery(dbh, "DROP TABLE IF EXISTS p3PendingExp");
    p_psDBRunQuery(dbh, "DROP TABLE IF EXISTS detRun");
    p_psDBRunQuery(dbh, "DROP TABLE IF EXISTS detInputExp");
    p_psDBRunQuery(dbh, "DROP TABLE IF EXISTS detProcessedImfile");
    p_psDBRunQuery(dbh, "DROP TABLE IF EXISTS detStackedImfile");
    p_psDBRunQuery(dbh, "DROP TABLE IF EXISTS detNormalizedImfile");
    p_psDBRunQuery(dbh, "DROP TABLE IF EXISTS detMasterFrame");
    p_psDBRunQuery(dbh, "DROP TABLE IF EXISTS detMasterImfile");
    p_psDBRunQuery(dbh, "DROP TABLE IF EXISTS detResidImfileAnalysis");
    p_psDBRunQuery(dbh, "DROP TABLE IF EXISTS detResidExpAnalysis");

    psDBCleanup(dbh);

    exit(EXIT_SUCCESS);
}
