CREATE TABLE public.career_applications (
 id uuid PRIMARY KEY DEFAULT gen_random_uuid(),
 created_at timestamptz NOT NULL DEFAULT now(),
 name text NOT NULL,
 email text NOT NULL,
 phone text NOT NULL DEFAULT '',
 position text NOT NULL,
 message text NOT NULL DEFAULT '',
 resume_path text NOT NULL UNIQUE,
 resume_filename text NOT NULL,
 resume_size integer NOT NULL
);
GRANT ALL ON public.career_applications TO service_role;
ALTER TABLE public.career_applications ENABLE ROW LEVEL SECURITY;
COMMENT ON TABLE public.career_applications IS 'Private job applications; service-role access only. Resume files are in the private career-resumes bucket.';