-- Drop the explicit index (if not dropped automatically with the table)
DROP INDEX IF EXISTS "public"."profiles_user_id_idx";

-- Drop tables in reverse order to avoid foreign key conflicts
DROP TABLE IF EXISTS "public"."profiles" CASCADE;
DROP TABLE IF EXISTS "public"."post_votes" CASCADE;
DROP TABLE IF EXISTS "public"."post_tags" CASCADE;
DROP TABLE IF EXISTS "public"."tags" CASCADE;
DROP TABLE IF EXISTS "public"."likes" CASCADE;
DROP TABLE IF EXISTS "public"."favorites" CASCADE;
DROP TABLE IF EXISTS "public"."comments" CASCADE;
DROP TABLE IF EXISTS "public"."bookmarks" CASCADE;
DROP TABLE IF EXISTS "public"."posts" CASCADE;
DROP TABLE IF EXISTS "public"."blogs" CASCADE;
DROP TABLE IF EXISTS "public"."users" CASCADE;
DROP TABLE IF EXISTS "public"."categories" CASCADE;

-- Optionally, if the up migration created the schema (and you want to remove it):
-- DROP SCHEMA IF EXISTS "public" CASCADE;
