-- Add codeSnippet field to Dealer table
-- This column may already exist from prisma db push, so we use IF NOT EXISTS
DO $$
BEGIN
    IF NOT EXISTS (
        SELECT 1 FROM information_schema.columns
        WHERE table_name = 'Dealer' AND column_name = 'codeSnippet'
    ) THEN
        ALTER TABLE "Dealer" ADD COLUMN "codeSnippet" TEXT;
    END IF;
END $$;
