DROP VIEW IF EXISTS tagged_media_view;
DROP VIEW IF EXISTS tag_count_view;
DROP TABLE IF EXISTS media_tag;
DROP INDEX IF EXISTS tag_display_idx;
DROP TABLE IF EXISTS tag;
DROP TABLE IF EXISTS kind;
DROP TABLE IF EXISTS media;
