﻿--
-- PostgreSQL database dump
--

\restrict qHRWo8cyw1bDx3e3Oui3lv9Tyh5YDm8rfMjXFkIL3SrJTaLGiDB1CShZexcwh48

-- Dumped from database version 18.4 (Ubuntu 18.4-0ubuntu0.26.04.1)
-- Dumped by pg_dump version 18.4 (Ubuntu 18.4-0ubuntu0.26.04.1)

SET statement_timeout = 0;
SET lock_timeout = 0;
SET idle_in_transaction_session_timeout = 0;
SET transaction_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SELECT pg_catalog.set_config('search_path', '', false);
SET check_function_bodies = false;
SET xmloption = content;
SET client_min_messages = warning;
SET row_security = off;

SET default_tablespace = '';

SET default_table_access_method = heap;

--
-- Name: audit_logs; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.audit_logs (
    id integer NOT NULL,
    user_id integer,
    username character varying(50),
    action character varying(200),
    ip_address character varying(50),
    "timestamp" timestamp without time zone
);


--
-- Name: audit_logs_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

CREATE SEQUENCE public.audit_logs_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


--
-- Name: audit_logs_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.audit_logs_id_seq OWNED BY public.audit_logs.id;


--
-- Name: companies; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.companies (
    id integer NOT NULL,
    name character varying(100),
    is_active boolean,
    created_at timestamp without time zone
);


--
-- Name: companies_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

CREATE SEQUENCE public.companies_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


--
-- Name: companies_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.companies_id_seq OWNED BY public.companies.id;


--
-- Name: holidays; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.holidays (
    id integer NOT NULL,
    company_id integer NOT NULL,
    date date,
    name character varying(100)
);


--
-- Name: holidays_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

CREATE SEQUENCE public.holidays_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


--
-- Name: holidays_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.holidays_id_seq OWNED BY public.holidays.id;


--
-- Name: kanban_columns; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.kanban_columns (
    id integer NOT NULL,
    project_id integer,
    name character varying(50),
    "order" integer
);


--
-- Name: kanban_columns_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

CREATE SEQUENCE public.kanban_columns_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


--
-- Name: kanban_columns_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.kanban_columns_id_seq OWNED BY public.kanban_columns.id;


--
-- Name: kb_articles; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.kb_articles (
    id integer NOT NULL,
    title character varying(200),
    content text,
    category character varying(100),
    author_id integer,
    views integer DEFAULT 0,
    is_published boolean DEFAULT true,
    created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP,
    updated_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP,
    company_id integer
);


--
-- Name: kb_articles_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

CREATE SEQUENCE public.kb_articles_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


--
-- Name: kb_articles_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.kb_articles_id_seq OWNED BY public.kb_articles.id;


--
-- Name: notifications; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.notifications (
    id integer NOT NULL,
    user_id integer,
    message text,
    link character varying(500),
    is_read boolean DEFAULT false,
    created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP
);


--
-- Name: notifications_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

CREATE SEQUENCE public.notifications_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


--
-- Name: notifications_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.notifications_id_seq OWNED BY public.notifications.id;


--
-- Name: project_comments; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.project_comments (
    id integer NOT NULL,
    project_id integer,
    user_id integer,
    content text,
    created_at timestamp without time zone
);


--
-- Name: project_comments_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

CREATE SEQUENCE public.project_comments_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


--
-- Name: project_comments_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.project_comments_id_seq OWNED BY public.project_comments.id;


--
-- Name: project_members; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.project_members (
    user_id integer NOT NULL,
    project_id integer NOT NULL
);


--
-- Name: project_report_versions; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.project_report_versions (
    id integer NOT NULL,
    project_id integer NOT NULL,
    version_name character varying(100) NOT NULL,
    report_html text NOT NULL,
    created_at timestamp without time zone DEFAULT timezone('utc'::text, now())
);


--
-- Name: project_report_versions_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

CREATE SEQUENCE public.project_report_versions_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


--
-- Name: project_report_versions_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.project_report_versions_id_seq OWNED BY public.project_report_versions.id;


--
-- Name: project_roadmap_versions; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.project_roadmap_versions (
    id integer NOT NULL,
    project_id integer NOT NULL,
    version_name character varying(100) NOT NULL,
    roadmap_objectives text,
    roadmap_deliverables text,
    roadmap_strategy text,
    roadmap_resources text,
    roadmap_deadlines text,
    roadmap_stakeholders text,
    created_at timestamp without time zone DEFAULT timezone('utc'::text, now())
);


--
-- Name: project_roadmap_versions_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

CREATE SEQUENCE public.project_roadmap_versions_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


--
-- Name: project_roadmap_versions_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.project_roadmap_versions_id_seq OWNED BY public.project_roadmap_versions.id;


--
-- Name: project_viewers; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.project_viewers (
    user_id integer NOT NULL,
    project_id integer NOT NULL
);


--
-- Name: projects; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.projects (
    id integer NOT NULL,
    name character varying(100),
    description text,
    created_at timestamp without time zone,
    is_archived boolean DEFAULT false,
    is_public boolean DEFAULT true,
    creator_id integer,
    assignee_id integer,
    team_id integer,
    company_id integer,
    roadmap_objectives text,
    roadmap_deliverables text,
    roadmap_strategy text,
    roadmap_resources text,
    roadmap_deadlines text,
    roadmap_stakeholders text
);


--
-- Name: projects_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

CREATE SEQUENCE public.projects_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


--
-- Name: projects_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.projects_id_seq OWNED BY public.projects.id;


--
-- Name: roles; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.roles (
    id integer NOT NULL,
    name character varying(50),
    description character varying(200)
);


--
-- Name: roles_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

CREATE SEQUENCE public.roles_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


--
-- Name: roles_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.roles_id_seq OWNED BY public.roles.id;


--
-- Name: subtasks; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.subtasks (
    id integer NOT NULL,
    task_id integer,
    title character varying(200),
    is_completed boolean,
    created_at timestamp without time zone
);


--
-- Name: subtasks_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

CREATE SEQUENCE public.subtasks_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


--
-- Name: subtasks_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.subtasks_id_seq OWNED BY public.subtasks.id;


--
-- Name: system_settings; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.system_settings (
    id integer NOT NULL,
    key character varying(50),
    value character varying(500),
    company_id integer
);


--
-- Name: system_settings_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

CREATE SEQUENCE public.system_settings_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


--
-- Name: system_settings_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.system_settings_id_seq OWNED BY public.system_settings.id;


--
-- Name: tags; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.tags (
    id integer NOT NULL,
    project_id integer,
    name character varying(50),
    color character varying(20)
);


--
-- Name: tags_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

CREATE SEQUENCE public.tags_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


--
-- Name: tags_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.tags_id_seq OWNED BY public.tags.id;


--
-- Name: task_attachments; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.task_attachments (
    id integer NOT NULL,
    task_id integer,
    filename character varying(255) NOT NULL,
    file_path character varying(500) NOT NULL,
    uploaded_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP
);


--
-- Name: task_attachments_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

CREATE SEQUENCE public.task_attachments_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


--
-- Name: task_attachments_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.task_attachments_id_seq OWNED BY public.task_attachments.id;


--
-- Name: task_comments; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.task_comments (
    id integer NOT NULL,
    task_id integer,
    user_id integer,
    content text,
    created_at timestamp without time zone
);


--
-- Name: task_comments_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

CREATE SEQUENCE public.task_comments_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


--
-- Name: task_comments_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.task_comments_id_seq OWNED BY public.task_comments.id;


--
-- Name: task_links; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.task_links (
    id integer NOT NULL,
    source_id character varying(50),
    target_id character varying(50),
    type character varying(10),
    project_id integer
);


--
-- Name: task_links_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

CREATE SEQUENCE public.task_links_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


--
-- Name: task_links_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.task_links_id_seq OWNED BY public.task_links.id;


--
-- Name: task_logs; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.task_logs (
    id integer NOT NULL,
    task_id integer,
    user_id integer,
    action character varying(100),
    "timestamp" timestamp without time zone
);


--
-- Name: task_logs_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

CREATE SEQUENCE public.task_logs_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


--
-- Name: task_logs_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.task_logs_id_seq OWNED BY public.task_logs.id;


--
-- Name: task_progress_history; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.task_progress_history (
    id integer NOT NULL,
    task_id integer,
    project_id integer,
    date timestamp without time zone,
    progress double precision
);


--
-- Name: task_progress_history_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

CREATE SEQUENCE public.task_progress_history_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


--
-- Name: task_progress_history_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.task_progress_history_id_seq OWNED BY public.task_progress_history.id;


--
-- Name: task_tags; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.task_tags (
    task_id integer NOT NULL,
    tag_id integer NOT NULL
);


--
-- Name: tasks; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.tasks (
    id integer NOT NULL,
    project_id integer,
    column_id integer,
    assignee_id integer,
    title character varying(200),
    description text,
    story_points integer,
    start_date timestamp without time zone,
    due_date timestamp without time zone,
    is_blocked boolean,
    "order" integer,
    created_at timestamp without time zone,
    completed_at timestamp without time zone,
    progress double precision DEFAULT 0.0,
    priority character varying(20) DEFAULT 'low'::character varying,
    team_id integer,
    baseline_start_date timestamp without time zone,
    baseline_end_date timestamp without time zone,
    estimated_hours double precision DEFAULT 0,
    resource_cost double precision DEFAULT 0
);


--
-- Name: tasks_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

CREATE SEQUENCE public.tasks_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


--
-- Name: tasks_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.tasks_id_seq OWNED BY public.tasks.id;


--
-- Name: team_members; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.team_members (
    team_id integer NOT NULL,
    user_id integer NOT NULL
);


--
-- Name: teams; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.teams (
    id integer NOT NULL,
    name character varying(100),
    description text,
    created_at timestamp without time zone,
    company_id integer
);


--
-- Name: teams_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

CREATE SEQUENCE public.teams_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


--
-- Name: teams_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.teams_id_seq OWNED BY public.teams.id;


--
-- Name: ticket_attachments; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.ticket_attachments (
    id integer NOT NULL,
    ticket_id integer,
    comment_id integer,
    filename character varying(255),
    file_path character varying(500),
    uploaded_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP
);


--
-- Name: ticket_attachments_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

CREATE SEQUENCE public.ticket_attachments_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


--
-- Name: ticket_attachments_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.ticket_attachments_id_seq OWNED BY public.ticket_attachments.id;


--
-- Name: ticket_automations; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.ticket_automations (
    id integer NOT NULL,
    name character varying(100),
    conditions_json text,
    actions_json text,
    is_active boolean DEFAULT true,
    created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP,
    company_id integer
);


--
-- Name: ticket_automations_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

CREATE SEQUENCE public.ticket_automations_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


--
-- Name: ticket_automations_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.ticket_automations_id_seq OWNED BY public.ticket_automations.id;


--
-- Name: ticket_comments; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.ticket_comments (
    id integer NOT NULL,
    ticket_id integer,
    user_id integer,
    content text,
    is_internal boolean DEFAULT false,
    created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP
);


--
-- Name: ticket_comments_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

CREATE SEQUENCE public.ticket_comments_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


--
-- Name: ticket_comments_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.ticket_comments_id_seq OWNED BY public.ticket_comments.id;


--
-- Name: ticket_ratings; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.ticket_ratings (
    id integer NOT NULL,
    ticket_id integer,
    user_id integer,
    rating integer,
    comment text,
    created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP
);


--
-- Name: ticket_ratings_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

CREATE SEQUENCE public.ticket_ratings_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


--
-- Name: ticket_ratings_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.ticket_ratings_id_seq OWNED BY public.ticket_ratings.id;


--
-- Name: tickets; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.tickets (
    id integer NOT NULL,
    title character varying(200),
    description text,
    status character varying(50) DEFAULT 'Abierto'::character varying,
    priority character varying(50) DEFAULT 'Media'::character varying,
    category character varying(100),
    created_by_id integer,
    email_reporter character varying(150),
    assignee_id integer,
    team_id integer,
    linked_task_id integer,
    linked_project_id integer,
    sla_deadline timestamp without time zone,
    created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP,
    updated_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP,
    company character varying(100),
    tags character varying(255),
    company_id integer
);


--
-- Name: tickets_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

CREATE SEQUENCE public.tickets_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


--
-- Name: tickets_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.tickets_id_seq OWNED BY public.tickets.id;


--
-- Name: user_roles; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.user_roles (
    user_id integer NOT NULL,
    role_id integer NOT NULL
);


--
-- Name: users; Type: TABLE; Schema: public; Owner: -
--

CREATE TABLE public.users (
    id integer NOT NULL,
    username character varying(50),
    email character varying(100),
    hashed_password character varying(200),
    is_active boolean,
    created_at timestamp without time zone,
    last_active timestamp without time zone,
    mfa_code character varying(100),
    mfa_code_expires timestamp without time zone,
    company_id integer
);


--
-- Name: users_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--

CREATE SEQUENCE public.users_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


--
-- Name: users_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--

ALTER SEQUENCE public.users_id_seq OWNED BY public.users.id;


--
-- Name: audit_logs id; Type: DEFAULT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.audit_logs ALTER COLUMN id SET DEFAULT nextval('public.audit_logs_id_seq'::regclass);


--
-- Name: companies id; Type: DEFAULT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.companies ALTER COLUMN id SET DEFAULT nextval('public.companies_id_seq'::regclass);


--
-- Name: holidays id; Type: DEFAULT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.holidays ALTER COLUMN id SET DEFAULT nextval('public.holidays_id_seq'::regclass);


--
-- Name: kanban_columns id; Type: DEFAULT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.kanban_columns ALTER COLUMN id SET DEFAULT nextval('public.kanban_columns_id_seq'::regclass);


--
-- Name: kb_articles id; Type: DEFAULT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.kb_articles ALTER COLUMN id SET DEFAULT nextval('public.kb_articles_id_seq'::regclass);


--
-- Name: notifications id; Type: DEFAULT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.notifications ALTER COLUMN id SET DEFAULT nextval('public.notifications_id_seq'::regclass);


--
-- Name: project_comments id; Type: DEFAULT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.project_comments ALTER COLUMN id SET DEFAULT nextval('public.project_comments_id_seq'::regclass);


--
-- Name: project_report_versions id; Type: DEFAULT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.project_report_versions ALTER COLUMN id SET DEFAULT nextval('public.project_report_versions_id_seq'::regclass);


--
-- Name: project_roadmap_versions id; Type: DEFAULT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.project_roadmap_versions ALTER COLUMN id SET DEFAULT nextval('public.project_roadmap_versions_id_seq'::regclass);


--
-- Name: projects id; Type: DEFAULT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.projects ALTER COLUMN id SET DEFAULT nextval('public.projects_id_seq'::regclass);


--
-- Name: roles id; Type: DEFAULT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.roles ALTER COLUMN id SET DEFAULT nextval('public.roles_id_seq'::regclass);


--
-- Name: subtasks id; Type: DEFAULT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.subtasks ALTER COLUMN id SET DEFAULT nextval('public.subtasks_id_seq'::regclass);


--
-- Name: system_settings id; Type: DEFAULT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.system_settings ALTER COLUMN id SET DEFAULT nextval('public.system_settings_id_seq'::regclass);


--
-- Name: tags id; Type: DEFAULT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.tags ALTER COLUMN id SET DEFAULT nextval('public.tags_id_seq'::regclass);


--
-- Name: task_attachments id; Type: DEFAULT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.task_attachments ALTER COLUMN id SET DEFAULT nextval('public.task_attachments_id_seq'::regclass);


--
-- Name: task_comments id; Type: DEFAULT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.task_comments ALTER COLUMN id SET DEFAULT nextval('public.task_comments_id_seq'::regclass);


--
-- Name: task_links id; Type: DEFAULT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.task_links ALTER COLUMN id SET DEFAULT nextval('public.task_links_id_seq'::regclass);


--
-- Name: task_logs id; Type: DEFAULT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.task_logs ALTER COLUMN id SET DEFAULT nextval('public.task_logs_id_seq'::regclass);


--
-- Name: task_progress_history id; Type: DEFAULT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.task_progress_history ALTER COLUMN id SET DEFAULT nextval('public.task_progress_history_id_seq'::regclass);


--
-- Name: tasks id; Type: DEFAULT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.tasks ALTER COLUMN id SET DEFAULT nextval('public.tasks_id_seq'::regclass);


--
-- Name: teams id; Type: DEFAULT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.teams ALTER COLUMN id SET DEFAULT nextval('public.teams_id_seq'::regclass);


--
-- Name: ticket_attachments id; Type: DEFAULT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.ticket_attachments ALTER COLUMN id SET DEFAULT nextval('public.ticket_attachments_id_seq'::regclass);


--
-- Name: ticket_automations id; Type: DEFAULT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.ticket_automations ALTER COLUMN id SET DEFAULT nextval('public.ticket_automations_id_seq'::regclass);


--
-- Name: ticket_comments id; Type: DEFAULT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.ticket_comments ALTER COLUMN id SET DEFAULT nextval('public.ticket_comments_id_seq'::regclass);


--
-- Name: ticket_ratings id; Type: DEFAULT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.ticket_ratings ALTER COLUMN id SET DEFAULT nextval('public.ticket_ratings_id_seq'::regclass);


--
-- Name: tickets id; Type: DEFAULT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.tickets ALTER COLUMN id SET DEFAULT nextval('public.tickets_id_seq'::regclass);


--
-- Name: users id; Type: DEFAULT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.users ALTER COLUMN id SET DEFAULT nextval('public.users_id_seq'::regclass);


--
-- Data for Name: audit_logs; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.audit_logs (id, user_id, username, action, ip_address, "timestamp") FROM stdin;
1	1	admin	Inicio de sesión exitoso	\N	2026-06-19 16:00:31.59355
2	2	jampuero	Inicio de sesión exitoso	\N	2026-06-19 16:01:39.154606
3	1	admin	Inicio de sesión exitoso	\N	2026-06-19 16:01:53.40087
4	1	admin	Inicio de sesión exitoso	\N	2026-06-19 16:12:30.378608
5	1	admin	Inicio de sesión exitoso	\N	2026-06-19 16:18:15.29496
6	1	admin	Inicio de sesión exitoso	\N	2026-06-19 16:25:24.702891
7	1	admin	Inicio de sesión exitoso	\N	2026-06-19 16:56:09.195169
8	1	admin	Inicio de sesión exitoso	\N	2026-06-19 17:00:16.621871
9	1	admin	Inicio de sesión exitoso	\N	2026-06-23 17:21:40.21233
10	1	admin	Inicio de sesión exitoso	\N	2026-06-23 17:25:05.832893
11	1	admin	Inicio de sesión exitoso	\N	2026-06-23 18:43:34.686818
12	1	admin	Inicio de sesión exitoso	\N	2026-06-23 18:44:06.562418
13	1	admin	Inicio de sesión exitoso	\N	2026-06-24 14:49:47.690831
14	1	admin	Inicio de sesión exitoso	\N	2026-06-24 15:07:23.915926
15	1	admin	Inicio de sesión exitoso	\N	2026-06-24 15:07:39.642616
16	1	admin	Inicio de sesión exitoso	\N	2026-06-24 18:20:28.130671
17	1	admin	Inicio de sesión exitoso	\N	2026-06-24 18:20:45.059406
18	1	admin	Inicio de sesión exitoso	\N	2026-06-24 18:21:38.400693
19	1	admin	Inicio de sesión exitoso	\N	2026-06-24 18:52:40.953131
20	1	admin	Inicio de sesión exitoso	\N	2026-06-24 19:12:47.645053
21	1	admin	Inicio de sesión exitoso	\N	2026-06-24 19:20:17.742181
22	1	admin	Inicio de sesión exitoso	\N	2026-06-24 19:38:19.445497
23	1	admin	Inicio de sesión exitoso	\N	2026-06-24 20:05:03.21173
24	1	admin	Inicio de sesión exitoso	\N	2026-06-24 20:21:17.8058
25	1	admin	Inicio de sesión exitoso	\N	2026-06-24 20:37:18.910753
26	1	admin	Inicio de sesión exitoso	\N	2026-06-24 20:53:52.812707
27	1	admin	Inicio de sesión exitoso	\N	2026-06-25 14:12:45.955517
28	1	admin	Inicio de sesión exitoso	\N	2026-06-25 14:29:25.801757
29	1	admin	Inicio de sesión exitoso	\N	2026-06-25 14:48:57.394116
30	1	admin	Inicio de sesión exitoso	\N	2026-06-25 15:28:32.977434
31	1	admin	Inicio de sesión exitoso	\N	2026-06-25 15:34:31.672685
32	1	admin	Inicio de sesión exitoso	\N	2026-06-25 15:53:48.181423
33	1	admin	Inicio de sesión exitoso	\N	2026-06-25 15:54:24.725046
34	1	admin	Inicio de sesión exitoso	\N	2026-06-25 16:17:14.165651
35	1	admin	Inicio de sesión exitoso	\N	2026-06-25 16:35:03.763152
36	1	admin	Inicio de sesión exitoso	\N	2026-06-25 16:35:15.967011
37	1	admin	Inicio de sesión exitoso	\N	2026-06-25 16:35:50.452659
38	1	admin	Inicio de sesión exitoso	\N	2026-06-25 16:58:50.299402
39	1	admin	Inicio de sesión exitoso	\N	2026-06-25 17:15:55.258534
40	1	admin	Inicio de sesión exitoso	\N	2026-06-25 17:31:39.266969
41	1	admin	Inicio de sesión exitoso	\N	2026-06-25 17:42:15.268328
42	1	admin	Inicio de sesión exitoso	\N	2026-06-25 18:08:38.305841
43	1	admin	Inicio de sesión exitoso	\N	2026-06-25 18:25:05.232515
44	1	admin	Inicio de sesión exitoso	\N	2026-06-25 18:54:06.449624
45	1	admin	Inicio de sesión exitoso	\N	2026-06-25 19:09:55.59542
46	1	admin	Inicio de sesión exitoso	\N	2026-06-25 19:25:00.965355
47	1	admin	Inicio de sesión exitoso	\N	2026-06-25 19:41:23.909508
48	3	prueba	Inicio de sesión exitoso	\N	2026-06-25 19:44:36.336115
49	1	admin	Inicio de sesión exitoso	\N	2026-06-25 19:44:55.691198
50	2	jampuero	Inicio de sesión exitoso	\N	2026-06-25 19:48:56.361187
51	3	prueba	Inicio de sesión exitoso	\N	2026-06-25 19:49:16.281303
52	3	prueba	Inicio de sesión exitoso	\N	2026-06-25 19:50:12.205186
53	1	admin	Inicio de sesión exitoso	\N	2026-06-25 19:51:23.622841
54	3	prueba	Inicio de sesión exitoso	\N	2026-06-25 19:59:12.28917
55	1	admin	Inicio de sesión exitoso	\N	2026-06-25 20:00:08.176861
56	3	prueba	Inicio de sesión exitoso	\N	2026-06-25 20:00:34.884287
57	3	prueba	Inicio de sesión exitoso	\N	2026-06-25 20:00:55.09684
58	1	admin	Inicio de sesión exitoso	\N	2026-06-25 20:01:08.797099
59	1	admin	Inicio de sesión exitoso	\N	2026-06-25 20:01:29.635605
60	1	admin	Inicio de sesión exitoso	\N	2026-06-25 20:16:36.499253
61	1	admin	Inicio de sesión exitoso	\N	2026-06-25 20:28:10.561674
62	1	admin	Inicio de sesión exitoso	\N	2026-06-25 20:34:41.853184
63	1	admin	Inicio de sesión exitoso	\N	2026-06-25 20:34:59.855595
64	1	admin	Inicio de sesión exitoso	\N	2026-06-25 20:43:24.699808
65	1	admin	Inicio de sesión exitoso	\N	2026-06-25 20:48:04.366696
66	1	admin	Inicio de sesión exitoso	\N	2026-06-25 20:56:22.543583
67	1	admin	Inicio de sesión exitoso	\N	2026-06-25 20:56:53.890575
68	1	admin	Inicio de sesión exitoso	\N	2026-06-25 20:57:23.9585
69	1	admin	Inicio de sesión exitoso	\N	2026-06-25 20:57:46.488732
70	1	admin	Inicio de sesión exitoso	\N	2026-06-26 11:20:51.523764
71	1	admin	Inicio de sesión exitoso	\N	2026-06-26 11:25:55.855749
72	1	admin	Inicio de sesión exitoso	\N	2026-06-26 11:28:43.64032
73	1	admin	Inicio de sesión exitoso	\N	2026-06-26 13:13:34.374666
74	1	admin	Creó el equipo 'Desarrollo'	\N	2026-06-26 13:14:06.806768
75	1	admin	Añadió a jampuero al equipo 'Desarrollo'	\N	2026-06-26 13:14:06.833162
76	1	admin	Añadió a admin al equipo 'Desarrollo'	\N	2026-06-26 13:14:06.851564
77	1	admin	Actualizó el equipo 'Desarrollo'	\N	2026-06-26 13:14:13.246585
78	1	admin	Inicio de sesión exitoso	\N	2026-06-26 13:30:24.46732
79	1	admin	Actualizó el proyecto 'prueba'	\N	2026-06-26 13:31:48.084786
80	1	admin	Actualizó el proyecto 'prueba'	\N	2026-06-26 13:31:57.412174
81	1	admin	Inicio de sesión exitoso	\N	2026-06-26 13:48:57.434658
82	1	admin	Inicio de sesión exitoso	\N	2026-06-26 14:06:06.992452
83	1	admin	Inicio de sesión exitoso	\N	2026-06-26 15:39:14.241408
84	1	admin	Inicio de sesión exitoso	\N	2026-06-26 15:46:03.338376
85	1	admin	Inicio de sesión exitoso	\N	2026-06-26 15:49:07.44789
86	1	admin	Inicio de sesión exitoso	\N	2026-06-26 15:52:10.762767
87	1	admin	Inicio de sesión exitoso	\N	2026-06-26 15:55:17.743631
88	1	admin	Inicio de sesión exitoso	\N	2026-06-26 16:03:33.677975
89	1	admin	Inicio de sesión exitoso	\N	2026-06-26 16:09:43.127578
90	1	admin	Inicio de sesión exitoso	\N	2026-06-26 16:16:41.400256
91	1	admin	Inicio de sesión exitoso	\N	2026-06-26 16:36:33.188098
92	1	admin	Inicio de sesión exitoso	\N	2026-06-26 18:08:16.971359
93	1	admin	Inicio de sesión exitoso	\N	2026-06-26 19:45:23.658216
94	1	admin	Inicio de sesión exitoso	\N	2026-07-02 12:29:57.772655
95	1	admin	Inicio de sesión exitoso	\N	2026-07-02 12:48:40.386501
96	1	admin	Inicio de sesión exitoso	\N	2026-07-02 13:25:43.330338
97	1	admin	Inicio de sesión exitoso	\N	2026-07-02 15:25:52.79568
98	1	admin	Inicio de sesión exitoso	\N	2026-07-02 17:41:28.946507
99	1	admin	Inicio de sesión exitoso	\N	2026-07-02 17:50:42.414457
100	1	admin	Inicio de sesión exitoso	\N	2026-07-02 17:53:49.791414
101	1	admin	Inicio de sesión exitoso	\N	2026-07-02 18:49:02.193852
102	1	admin	Inicio de sesión exitoso	\N	2026-07-02 19:22:56.218664
103	1	admin	Inicio de sesión exitoso	\N	2026-07-02 20:24:35.246205
104	1	admin	Inicio de sesión exitoso	\N	2026-07-02 20:44:04.544254
105	1	admin	Inicio de sesión exitoso	\N	2026-07-03 11:41:23.11118
106	1	admin	Inicio de sesión exitoso	\N	2026-07-03 13:11:15.301421
107	1	admin	Inicio de sesión exitoso	\N	2026-07-03 17:49:11.950635
108	1	admin	Inicio de sesión exitoso	\N	2026-07-03 18:25:13.511918
109	2	jampuero	Inicio de sesión exitoso	\N	2026-07-03 18:26:16.114864
110	2	jampuero	Inicio de sesión exitoso	\N	2026-07-03 18:38:08.541759
111	2	jampuero	Inicio de sesión exitoso	\N	2026-07-03 18:41:12.470888
112	1	admin	Inicio de sesión exitoso	\N	2026-07-03 18:41:28.172728
113	2	jampuero	Inicio de sesión exitoso	\N	2026-07-03 18:43:54.920832
114	2	jampuero	Inicio de sesión exitoso	\N	2026-07-03 18:45:26.229569
115	2	jampuero	Inicio de sesión exitoso	\N	2026-07-03 18:45:42.885455
116	2	jampuero	Inicio de sesión exitoso	\N	2026-07-03 18:46:34.289282
117	2	jampuero	Inicio de sesión exitoso	\N	2026-07-03 18:46:52.671852
118	2	jampuero	Inicio de sesión exitoso	\N	2026-07-03 18:47:49.78352
119	2	jampuero	Inicio de sesión exitoso	\N	2026-07-03 18:48:17.730178
120	2	jampuero	Inicio de sesión exitoso	\N	2026-07-03 18:49:55.825966
121	2	jampuero	Inicio de sesión exitoso	\N	2026-07-03 18:50:57.992735
122	2	jampuero	Inicio de sesión exitoso	\N	2026-07-03 19:21:51.111545
123	2	jampuero	Inicio de sesión exitoso	\N	2026-07-03 19:22:53.873623
124	2	jampuero	Inicio de sesión exitoso	\N	2026-07-03 19:23:10.484275
125	2	jampuero	Inicio de sesión exitoso	\N	2026-07-03 19:24:11.169591
126	1	admin	Inicio de sesión exitoso	\N	2026-07-03 19:37:59.812036
127	2	jampuero	Inicio de sesión exitoso	\N	2026-07-03 19:38:10.652765
128	2	jampuero	Inicio de sesión exitoso	\N	2026-07-03 19:40:01.895259
129	2	jampuero	Inicio de sesión exitoso	\N	2026-07-03 19:42:30.951989
130	2	jampuero	Inicio de sesión exitoso	\N	2026-07-03 20:22:49.915331
131	4	prueba2	Inicio de sesión exitoso	\N	2026-07-03 20:24:13.928493
132	4	prueba2	Creó el proyecto 'Prueba2'	\N	2026-07-03 20:24:36.164172
133	4	prueba2	Creó el proyecto 'Prueba2'	\N	2026-07-03 20:24:39.89322
134	4	prueba2	Creó el proyecto 'Prueba2'	\N	2026-07-03 20:24:45.388385
135	4	prueba2	Creó el proyecto 'Prueba2'	\N	2026-07-03 20:24:47.872564
136	4	prueba2	Creó el proyecto 'Prueba2'	\N	2026-07-03 20:24:55.235032
137	4	prueba2	Creó el proyecto 'Prueba2'	\N	2026-07-03 20:24:57.564339
138	4	prueba2	Creó el proyecto 'Prueba2'	\N	2026-07-03 20:25:35.877701
139	4	prueba2	Creó el proyecto 'Prueba2'	\N	2026-07-03 20:28:47.688881
140	4	prueba2	Inicio de sesión exitoso	\N	2026-07-03 20:42:09.344147
141	2	jampuero	Inicio de sesión exitoso	\N	2026-07-03 21:09:07.017725
142	2	jampuero	Inicio de sesión exitoso	\N	2026-07-03 21:24:36.136984
143	2	jampuero	Creó el proyecto 'Prueba22'	\N	2026-07-03 21:35:58.211042
144	2	jampuero	Archivó el proyecto 'Prueba22'	\N	2026-07-03 21:36:03.01919
145	4	prueba2	Inicio de sesión exitoso	\N	2026-07-03 21:44:27.760758
146	4	prueba2	Creó el proyecto 'Prueba2'	\N	2026-07-03 21:44:45.428081
147	4	prueba2	Archivó el proyecto 'Prueba2'	\N	2026-07-03 21:44:53.790178
148	4	prueba2	Creó el proyecto 'Prueba23'	\N	2026-07-03 21:53:14.853071
149	4	prueba2	Archivó el proyecto 'Prueba23'	\N	2026-07-03 21:53:18.122316
150	4	prueba2	Inicio de sesión exitoso	\N	2026-07-03 22:00:09.749219
151	4	prueba2	Creó el proyecto 'prueba11'	\N	2026-07-03 22:01:07.653483
152	4	prueba2	Archivó el proyecto 'prueba11'	\N	2026-07-03 22:01:12.938404
153	4	prueba2	Restauró el proyecto 'Prueba2'	\N	2026-07-03 22:03:42.65338
154	4	prueba2	Eliminó permanentemente el proyecto 'prueba11'	\N	2026-07-03 22:03:50.965534
155	2	jampuero	Inicio de sesión exitoso	\N	2026-07-03 22:57:49.674767
156	4	prueba2	Inicio de sesión exitoso	\N	2026-07-03 22:58:09.86174
157	2	jampuero	Inicio de sesión exitoso	\N	2026-07-03 23:05:47.251475
158	2	jampuero	Inicio de sesión exitoso	\N	2026-07-03 23:24:07.363871
159	2	jampuero	Inicio de sesión exitoso	\N	2026-07-04 01:56:53.107433
160	4	prueba2	Inicio de sesión exitoso	\N	2026-07-04 05:05:46.304816
161	1	admin	Inicio de sesión exitoso	\N	2026-07-04 05:21:07.303394
162	2	jampuero	Inicio de sesión exitoso	\N	2026-07-04 05:21:32.750701
163	2	jampuero	Inicio de sesión exitoso	\N	2026-07-04 05:22:20.614514
164	4	prueba2	Inicio de sesión exitoso	\N	2026-07-04 05:36:18.265625
165	4	prueba2	Generó automáticamente el proyecto 'Nuevo Proyecto en Blanco' vía Roadmap	\N	2026-07-04 05:41:28.21252
166	4	prueba2	Generó automáticamente el proyecto 'Nuevo Proyecto en Blanco' vía Roadmap	\N	2026-07-04 05:41:58.962293
167	4	prueba2	Inicio de sesión exitoso	\N	2026-07-04 05:42:14.547544
168	4	prueba2	Generó automáticamente el proyecto 'Nuevo Proyecto en Blanco' vía Roadmap	\N	2026-07-04 05:42:54.241364
169	4	prueba2	Generó automáticamente el proyecto 'Nuevo Proyecto en Blanco' vía Roadmap	\N	2026-07-04 05:43:07.447244
170	4	prueba2	Generó automáticamente el proyecto 'Nuevo Proyecto en Blanco' vía Roadmap	\N	2026-07-04 05:45:40.55863
171	4	prueba2	Inicio de sesión exitoso	\N	2026-07-04 21:37:35.613791
172	4	prueba2	Generó automáticamente el proyecto 'Nuevo Proyecto en Blanco' vía Roadmap	\N	2026-07-04 21:38:13.208521
173	4	prueba2	Archivó el proyecto 'Nuevo Proyecto en Blanco'	\N	2026-07-04 21:38:20.287666
174	4	prueba2	Generó automáticamente el proyecto 'Nuevo Proyecto en Blanco' vía Roadmap	\N	2026-07-04 21:46:57.331007
175	4	prueba2	Archivó el proyecto 'Nuevo Proyecto en Blanco'	\N	2026-07-04 21:48:46.52536
176	4	prueba2	Archivó el proyecto 'Nuevo Proyecto en Blanco'	\N	2026-07-04 21:48:49.57842
177	4	prueba2	Archivó el proyecto 'Nuevo Proyecto en Blanco'	\N	2026-07-04 21:48:53.70409
178	1	admin	Inicio de sesión exitoso	\N	2026-07-04 21:51:08.31503
179	1	admin	Creó el proyecto 'Prueba2'	\N	2026-07-04 21:51:28.971307
180	1	admin	Inicio de sesión exitoso	\N	2026-07-05 01:05:08.004505
181	2	jampuero	Inicio de sesión exitoso	\N	2026-07-05 01:05:51.602617
182	1	admin	Inicio de sesión exitoso	\N	2026-07-05 01:08:40.878875
183	1	admin	Inicio de sesión exitoso	\N	2026-07-05 01:18:46.566939
184	1	admin	Inicio de sesión exitoso	\N	2026-07-05 01:19:20.21334
185	1	admin	Inicio de sesión exitoso	\N	2026-07-05 01:19:50.924048
186	1	admin	Inicio de sesión exitoso	\N	2026-07-05 01:20:59.354994
187	1	admin	Inicio de sesión exitoso	\N	2026-07-05 01:21:41.941717
188	1	admin	Inicio de sesión exitoso	\N	2026-07-05 01:23:49.549362
189	2	jampuero	Inicio de sesión exitoso	\N	2026-07-05 01:28:43.413492
190	1	admin	Inicio de sesión exitoso	\N	2026-07-05 02:00:24.77713
191	4	prueba2	Inicio de sesión exitoso	\N	2026-07-05 02:01:10.81333
192	1	admin	Inicio de sesión exitoso	\N	2026-07-05 02:06:35.798801
193	2	jampuero	Inicio de sesión exitoso	\N	2026-07-05 02:06:54.643192
194	1	admin	Inicio de sesión exitoso	\N	2026-07-05 02:50:41.62514
195	2	jampuero	Inicio de sesión exitoso	\N	2026-07-05 02:50:58.103366
196	1	admin	Inicio de sesión exitoso	\N	2026-07-05 02:51:19.753589
197	1	admin	Inicio de sesión exitoso	\N	2026-07-05 02:56:15.006652
198	1	admin	Inicio de sesión exitoso	\N	2026-07-05 03:19:21.618967
199	2	jampuero	Inicio de sesión exitoso	\N	2026-07-05 03:19:34.889694
200	1	admin	Inicio de sesión exitoso	\N	2026-07-05 03:19:58.396779
201	1	admin	Inicio de sesión exitoso	\N	2026-07-05 03:41:31.509324
202	1	admin	Inicio de sesión exitoso	\N	2026-07-05 03:41:51.758398
203	2	jampuero	Inicio de sesión exitoso	\N	2026-07-05 03:42:27.842513
204	1	admin	Inicio de sesión exitoso	\N	2026-07-05 03:57:49.632182
205	2	jampuero	Inicio de sesión exitoso	\N	2026-07-05 03:59:24.277878
206	4	prueba2	Inicio de sesión exitoso	\N	2026-07-05 04:00:38.623747
207	4	prueba2	Inicio de sesión exitoso	\N	2026-07-05 04:11:00.979441
208	1	admin	Inicio de sesión exitoso	\N	2026-07-05 04:22:54.779734
209	2	jampuero	Inicio de sesión exitoso	\N	2026-07-05 04:32:26.644521
210	2	jampuero	Inicio de sesión exitoso	\N	2026-07-05 05:52:31.339396
211	1	admin	Inicio de sesión exitoso	\N	2026-07-05 05:52:50.188368
212	1	admin	Inicio de sesión exitoso	\N	2026-07-05 06:31:22.412844
213	1	admin	Inicio de sesión exitoso	\N	2026-07-05 06:49:22.858932
214	2	jampuero	Inicio de sesión exitoso	\N	2026-07-05 06:49:49.234503
215	1	admin	Inicio de sesión exitoso	\N	2026-07-05 06:50:18.665186
216	1	admin	Inicio de sesión exitoso	\N	2026-07-05 07:13:20.199755
217	1	admin	Inicio de sesión exitoso	\N	2026-07-05 07:31:50.067122
218	1	admin	Inicio de sesión exitoso	\N	2026-07-05 23:34:36.705166
219	1	admin	Inicio de sesión exitoso	\N	2026-07-05 23:49:50.74399
220	1	admin	Inicio de sesión exitoso	\N	2026-07-06 01:47:13.137192
221	1	admin	Inicio de sesión exitoso	\N	2026-07-06 02:18:09.919123
222	1	admin	Inicio de sesión exitoso	\N	2026-07-06 02:57:49.948006
223	1	admin	Inicio de sesión exitoso	\N	2026-07-08 18:26:10.691081
224	1	admin	Inicio de sesión exitoso	\N	2026-07-08 18:46:02.451306
225	1	admin	Inicio de sesión exitoso	\N	2026-07-08 19:05:36.973154
226	1	admin	Inicio de sesión exitoso	\N	2026-07-08 19:20:56.122513
227	1	admin	Inicio de sesión exitoso	\N	2026-07-08 19:36:07.982662
228	1	admin	Inicio de sesión exitoso	\N	2026-07-08 19:45:48.596476
229	1	admin	Inicio de sesión exitoso	\N	2026-07-08 19:57:40.733435
230	1	admin	Inicio de sesión exitoso	\N	2026-07-08 20:02:11.741427
231	1	admin	Inicio de sesión exitoso	\N	2026-07-08 20:15:20.552739
232	1	admin	Inicio de sesión exitoso	\N	2026-07-08 20:16:10.70195
233	1	admin	Inicio de sesión exitoso	\N	2026-07-08 20:17:18.7636
234	1	admin	Inicio de sesión exitoso	\N	2026-07-08 20:18:01.022021
235	1	admin	Inicio de sesión exitoso	\N	2026-07-08 20:18:35.864808
236	1	admin	Inicio de sesión exitoso	\N	2026-07-08 20:28:00.880519
237	1	admin	Inicio de sesión exitoso	\N	2026-07-08 20:33:44.037533
238	1	admin	Creó al usuario 'visualizador'	\N	2026-07-08 20:39:21.5263
239	5	visualizador	Inicio de sesión exitoso	\N	2026-07-08 20:40:16.554319
240	1	admin	Inicio de sesión exitoso	\N	2026-07-08 20:56:36.400059
241	1	admin	Actualizó la configuración del usuario 'prueba'	\N	2026-07-08 20:57:57.461327
242	1	admin	Inicio de sesión exitoso	\N	2026-07-09 11:31:12.387612
243	1	admin	Inicio de sesión exitoso	\N	2026-07-09 17:08:47.260715
244	1	admin	Inicio de sesión exitoso	\N	2026-07-09 17:27:26.745871
245	1	admin	Inicio de sesión exitoso	\N	2026-07-09 17:54:12.337501
246	1	admin	Inicio de sesión exitoso	\N	2026-07-09 18:43:55.524186
247	1	admin	Inicio de sesión exitoso	\N	2026-07-09 18:54:31.740956
248	1	admin	Inicio de sesión exitoso	\N	2026-07-09 20:01:37.527464
249	1	admin	Inicio de sesión exitoso	\N	2026-07-09 20:06:50.71091
250	1	admin	Inicio de sesión exitoso	\N	2026-07-10 17:46:46.67142
251	1	admin	Inicio de sesión exitoso	\N	2026-07-10 20:04:05.518462
252	1	admin	Inicio de sesión exitoso	\N	2026-07-10 20:27:04.172319
253	1	admin	Inicio de sesión exitoso	\N	2026-07-13 17:55:32.755994
254	1	admin	Inicio de sesión exitoso	\N	2026-07-13 18:08:42.019173
255	1	admin	Actualizó el proyecto '1'	\N	2026-07-13 18:12:14.398198
256	1	admin	Actualizó el proyecto '1'	\N	2026-07-13 18:12:29.442496
257	1	admin	Actualizó el proyecto '1'	\N	2026-07-13 18:12:41.525972
258	1	admin	Inicio de sesión exitoso	\N	2026-07-13 18:25:26.65554
259	1	admin	Actualizó el proyecto '1'	\N	2026-07-13 18:37:44.406447
260	1	admin	Inicio de sesión exitoso	\N	2026-07-13 19:11:45.998974
261	1	admin	Inicio de sesión exitoso	\N	2026-07-13 19:26:49.125288
262	1	admin	Inicio de sesión exitoso	\N	2026-07-13 19:48:35.209703
263	1	admin	Inicio de sesión exitoso	\N	2026-07-13 20:13:17.78436
264	1	admin	Inicio de sesión exitoso	\N	2026-07-13 20:36:35.442926
265	1	admin	Inicio de sesión exitoso	\N	2026-07-14 11:33:19.714231
266	1	admin	Actualizó el proyecto '1'	\N	2026-07-14 11:33:57.087731
267	1	admin	Inicio de sesión exitoso	\N	2026-07-14 12:18:08.013624
268	1	admin	Inicio de sesión exitoso	\N	2026-07-14 12:33:47.896357
269	1	admin	Inicio de sesión exitoso	\N	2026-07-14 13:24:53.01767
270	1	admin	Inicio de sesión exitoso	\N	2026-07-14 15:31:10.006802
271	1	admin	Inicio de sesión exitoso	\N	2026-07-14 15:59:15.081498
272	1	admin	Inicio de sesión exitoso	\N	2026-07-14 16:04:20.591856
\.


--
-- Data for Name: companies; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.companies (id, name, is_active, created_at) FROM stdin;
1	PRUEBA	t	2026-07-03 18:00:21.930812
3	Prueba2	t	2026-07-03 20:23:18.852947
\.


--
-- Data for Name: holidays; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.holidays (id, company_id, date, name) FROM stdin;
\.


--
-- Data for Name: kanban_columns; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.kanban_columns (id, project_id, name, "order") FROM stdin;
9	4	Por Hacer	1
10	4	En Progreso	2
11	4	Revisión	3
12	4	Hecho	4
13	5	Por Hacer	1
14	5	En Progreso	2
15	5	Revisión	3
16	5	Hecho	4
17	6	Por Hacer	1
18	6	En Progreso	2
19	6	Revisión	3
20	6	Hecho	4
21	7	Por Hacer	1
22	7	En Progreso	2
23	7	Revisión	3
24	7	Hecho	4
25	8	Por Hacer	1
26	8	En Progreso	2
27	8	Revisión	3
28	8	Hecho	4
29	9	Por Hacer	1
30	9	En Progreso	2
31	9	Revisión	3
32	9	Hecho	4
33	10	Por Hacer	1
34	10	En Progreso	2
35	10	Revisión	3
36	10	Hecho	4
37	11	Por Hacer	1
38	11	En Progreso	2
39	11	Revisión	3
40	11	Hecho	4
41	12	Por Hacer	1
42	12	En Progreso	2
43	12	Revisión	3
44	12	Hecho	4
45	13	Por Hacer	1
46	13	En Progreso	2
47	13	Revisión	3
48	13	Hecho	4
49	14	Por Hacer	1
50	14	En Progreso	2
51	14	Revisión	3
52	14	Hecho	4
53	15	Por Hacer	1
54	15	En Progreso	2
55	15	Revisión	3
56	15	Hecho	4
57	16	Por Hacer	1
58	16	En Progreso	2
59	16	Revisión	3
60	16	Hecho	4
61	17	Por Hacer	1
62	17	En Progreso	2
63	17	Revisión	3
64	17	Hecho	4
65	1	Prueba	1
66	1	Prueba 2	2
67	18	Por Hacer	1
68	18	En Progreso	2
69	18	Revisión	3
70	18	Hecho	4
71	19	Por Hacer	1
72	19	En Progreso	2
73	19	Revisión	3
74	19	Hecho	4
75	20	Por Hacer	1
76	20	En Progreso	2
77	20	Revisión	3
78	20	Hecho	4
80	21	Por Hacer	1
81	21	En Progreso	2
82	21	Revisión	3
83	21	Hecho	4
84	4	Cerrado	5
141	42	Fase Inicial	0
117	30	Por Hacer	1
118	30	En Progreso	2
119	30	Revisión	3
120	30	Hecho	4
121	31	Por Hacer	1
122	31	En Progreso	2
123	31	Revisión	3
124	31	Hecho	4
125	32	Por Hacer	1
126	32	En Progreso	2
127	32	Revisión	3
128	32	Hecho	4
137	38	Fase Inicial	0
138	39	Fase Inicial	0
139	40	Fase Inicial	0
140	41	Fase Inicial	0
142	43	Fase Inicial	0
143	44	Fase Inicial	0
144	45	Por Hacer	1
145	45	En Progreso	2
146	45	Revisión	3
147	45	Hecho	4
\.


--
-- Data for Name: kb_articles; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.kb_articles (id, title, content, category, author_id, views, is_published, created_at, updated_at, company_id) FROM stdin;
\.


--
-- Data for Name: notifications; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.notifications (id, user_id, message, link, is_read, created_at) FROM stdin;
\.


--
-- Data for Name: project_comments; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.project_comments (id, project_id, user_id, content, created_at) FROM stdin;
1	4	1	Prueba	2026-06-24 19:22:48.184582
2	1	1	sd	2026-06-24 19:24:02.414336
\.


--
-- Data for Name: project_members; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.project_members (user_id, project_id) FROM stdin;
\.


--
-- Data for Name: project_report_versions; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.project_report_versions (id, project_id, version_name, report_html, created_at) FROM stdin;
1	1	V1	<div id="printableReportContent" style="padding:15px; color:#1e293b; background:#ffffff; border-radius:8px; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; box-sizing:border-box;">\n                <!-- Header -->\n                <div style="border-bottom: 3px solid #6366f1; padding-bottom: 15px; margin-bottom: 20px; display:flex; justify-content:space-between; align-items:flex-end;">\n                    <div>\n                        <h1 style="margin:0; color:#0f172a; font-size:1.7rem; font-weight:700; letter-spacing:-0.5px;">INFORME DE AVANCE EJECUTIVO (IA)</h1>\n                        <p style="margin:5px 0 0 0; color:#475569; font-size:0.95rem;">Proyecto: <strong style="color:#0f172a;">1</strong></p>\n                    </div>\n                    <div style="text-align:right;">\n                        <p style="margin:0; color:#64748b; font-size:0.85rem;">Fecha: 13 de julio de 2026</p>\n                        <span style="display:inline-block; margin-top:5px; background:#f0f9ff; color:#6366f1; border:1px solid #6366f140; padding:4px 10px; border-radius:20px; font-size:0.85rem; font-weight:bold;">Avance: 0%</span>\n                    </div>\n                </div>\n                \n                <!-- Progreso y Esfuerzo (Story Points) -->\n                <div style="margin-bottom: 25px; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; background: #f8fafc; border: 1px solid #e2e8f0; padding: 15px; border-radius: 8px;">\n                    <div>\n                        <div style="display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px;">\n                            <span style="font-weight: 700; color: #1e293b; font-size: 0.9rem;">Avance de Tareas (Físico)</span>\n                            <span style="font-weight: 800; color: #6366f1; font-size: 1.05rem;">0%</span>\n                        </div>\n                        <div style="width: 100%; background: #e2e8f0; height: 10px; border-radius: 5px; overflow: hidden;">\n                            <div style="width: 0%; background: #6366f1; height: 100%; border-radius: 5px;"></div>\n                        </div>\n                        <p style="margin: 5px 0 0 0; color: #64748b; font-size: 0.75rem;">\n                            Completado: <strong>0</strong> de <strong>1</strong> tareas.\n                        </p>\n                    </div>\n                    <div>\n                        <div style="display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px;">\n                            <span style="font-weight: 700; color: #1e293b; font-size: 0.9rem;">Avance de Esfuerzo (Story Points)</span>\n                            <span style="font-weight: 800; color: #a855f7; font-size: 1.05rem;">0%</span>\n                        </div>\n                        <div style="width: 100%; background: #e2e8f0; height: 10px; border-radius: 5px; overflow: hidden;">\n                            <div style="width: 0%; background: #a855f7; height: 100%; border-radius: 5px;"></div>\n                        </div>\n                        <p style="margin: 5px 0 0 0; color: #64748b; font-size: 0.75rem;">\n                            Completado: <strong>0</strong> de <strong>0</strong> Story Points (SP).\n                        </p>\n                    </div>\n                </div>\n\n                <!-- Foco en Alertas de Planificación -->\n                <div style="display: flex; gap: 15px; margin-bottom: 25px; flex-wrap: wrap;">\n                    <div style="flex: 1; min-width: 150px; display:flex; align-items:center; gap:10px; padding: 12px; border-radius: 8px; background: #fef2f2; border: 1px solid #fecaca; box-sizing:border-box;">\n                        <span style="font-size: 1.6rem; color: #ef4444;">🚨</span>\n                        <div>\n                            <span style="display:block; font-size:0.7rem; color:#64748b; font-weight:600; text-transform:uppercase;">Tareas Atrasadas</span>\n                            <strong style="font-size:1rem; color: #ef4444;">1 críticas</strong>\n                        </div>\n                    </div>\n                    <div style="flex: 1; min-width: 150px; display:flex; align-items:center; gap:10px; padding: 12px; border-radius: 8px; background: #f8fafc; border: 1px solid #e2e8f0; box-sizing:border-box;">\n                        <span style="font-size: 1.6rem; color: #94a3b8;">🚫</span>\n                        <div>\n                            <span style="display:block; font-size:0.7rem; color:#64748b; font-weight:600; text-transform:uppercase;">Tareas Bloqueadas</span>\n                            <strong style="font-size:1rem; color: #1e293b;">0 impedidas</strong>\n                        </div>\n                    </div>\n                    <div style="flex: 1; min-width: 150px; display:flex; align-items:center; gap:10px; padding: 12px; border-radius: 8px; background: #f8fafc; border: 1px solid #e2e8f0; box-sizing:border-box;">\n                        <span style="font-size: 1.6rem; color: #3b82f6;">📅</span>\n                        <div>\n                            <span style="display:block; font-size:0.7rem; color:#64748b; font-weight:600; text-transform:uppercase;">Por Vencer (3d)</span>\n                            <strong style="font-size:1rem; color:#1e293b;">0 próximas</strong>\n                        </div>\n                    </div>\n                </div>\n\n                <!-- Distribución de Tareas por Columna -->\n                <h3 style="color:#0f172a; border-bottom:1px solid #e2e8f0; padding-bottom:6px; margin-bottom:12px; font-size:1.1rem; font-weight:700;"><i class="fa-solid fa-chart-simple" style="color:#6366f1; margin-right:6px;"></i> Distribución por Estado</h3>\n                <div style="display: flex; gap: 10px; margin-bottom: 25px; flex-wrap: wrap;">\n                    \n                        <div style="flex: 1; min-width: 100px; background: #f8fafc; border: 1px solid #e2e8f0; padding: 10px; border-radius: 6px; text-align: center; box-sizing: border-box;">\n                            <span style="display: block; font-size: 0.7rem; color: #64748b; text-transform: uppercase; font-weight: 700; margin-bottom: 4px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;">Prueba</span>\n                            <strong style="font-size: 1.3rem; color: #0f172a;">1</strong>\n                        </div>\n                    \n                        <div style="flex: 1; min-width: 100px; background: #f8fafc; border: 1px solid #e2e8f0; padding: 10px; border-radius: 6px; text-align: center; box-sizing: border-box;">\n                            <span style="display: block; font-size: 0.7rem; color: #64748b; text-transform: uppercase; font-weight: 700; margin-bottom: 4px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;">Prueba 2</span>\n                            <strong style="font-size: 1.3rem; color: #0f172a;">0</strong>\n                        </div>\n                    \n                </div>\n        \n                <!-- Síntesis Ejecutiva de IA -->\n                <div style="background:#f5f3ff; border-left:4px solid #8b5cf6; padding:15px; border-radius:0 6px 6px 0; margin-bottom:25px; box-sizing:border-box;">\n                    <h3 style="margin:0 0 8px 0; color:#5b21b6; font-size:1.1rem; font-weight:700;"><i class="fa-solid fa-wand-magic-sparkles" style="margin-right:6px;"></i> Síntesis Ejecutiva (Generada con IA)</h3>\n                    <p style="margin:0; color:#334155; font-size:0.95rem; line-height:1.6; text-align:justify; white-space: pre-line;">El proyecto '1' cuenta con un avance global del 0.0% (0 de 1 tareas completadas). El proyecto se encuentra en fase de desarrollo activo. Se requiere revisar el cumplimiento de plazos y hitos en el diagrama de Gantt.</p>\n                </div>\n            \n                <!-- Temas de Hoja de Ruta -->\n                <h3 style="color:#0f172a; border-bottom:1px solid #e2e8f0; padding-bottom:6px; margin-bottom:15px; font-size:1.1rem; font-weight:700;"><i class="fa-solid fa-map-location-dot" style="color:#6366f1; margin-right:6px;"></i> Tópicos de Planificación</h3>\n                <div style="display:grid; grid-template-columns:1fr 1fr; gap:15px; margin-bottom:25px;">\n        \n                <div style="background:#f8fafc; border:1px solid #e2e8f0; padding:12px 15px; border-radius:6px; box-sizing:border-box;">\n                    <h4 style="margin:0 0 6px 0; color:#6366f1; font-size:0.95rem; font-weight:700; text-transform:uppercase; letter-spacing:0.3px;">1. Objetivos</h4>\n                    <p style="margin:0; color:#334155; font-size:0.9rem; line-height:1.5; white-space:pre-wrap;">w</p>\n                </div>\n            \n                <div style="background:#f8fafc; border:1px solid #e2e8f0; padding:12px 15px; border-radius:6px; box-sizing:border-box;">\n                    <h4 style="margin:0 0 6px 0; color:#6366f1; font-size:0.95rem; font-weight:700; text-transform:uppercase; letter-spacing:0.3px;">2. Entregables</h4>\n                    <p style="margin:0; color:#334155; font-size:0.9rem; line-height:1.5; white-space:pre-wrap;">w\nw\nw\nw</p>\n                </div>\n            \n                <div style="background:#f8fafc; border:1px solid #e2e8f0; padding:12px 15px; border-radius:6px; box-sizing:border-box;">\n                    <h4 style="margin:0 0 6px 0; color:#6366f1; font-size:0.95rem; font-weight:700; text-transform:uppercase; letter-spacing:0.3px;">3. Estrategia</h4>\n                    <p style="margin:0; color:#334155; font-size:0.9rem; line-height:1.5; white-space:pre-wrap;">w</p>\n                </div>\n            \n                <div style="background:#f8fafc; border:1px solid #e2e8f0; padding:12px 15px; border-radius:6px; box-sizing:border-box;">\n                    <h4 style="margin:0 0 6px 0; color:#6366f1; font-size:0.95rem; font-weight:700; text-transform:uppercase; letter-spacing:0.3px;">4. Recursos</h4>\n                    <p style="margin:0; color:#334155; font-size:0.9rem; line-height:1.5; white-space:pre-wrap;">w</p>\n                </div>\n            \n                <div style="background:#f8fafc; border:1px solid #e2e8f0; padding:12px 15px; border-radius:6px; box-sizing:border-box;">\n                    <h4 style="margin:0 0 6px 0; color:#6366f1; font-size:0.95rem; font-weight:700; text-transform:uppercase; letter-spacing:0.3px;">5. Plazos</h4>\n                    <p style="margin:0; color:#334155; font-size:0.9rem; line-height:1.5; white-space:pre-wrap;">w\nw\nw\nw</p>\n                </div>\n            \n                <div style="background:#f8fafc; border:1px solid #e2e8f0; padding:12px 15px; border-radius:6px; box-sizing:border-box;">\n                    <h4 style="margin:0 0 6px 0; color:#6366f1; font-size:0.95rem; font-weight:700; text-transform:uppercase; letter-spacing:0.3px;">6. Partes involucradas</h4>\n                    <p style="margin:0; color:#334155; font-size:0.9rem; line-height:1.5; white-space:pre-wrap;">w\nw\nw\nw</p>\n                </div>\n            \n                </div>\n\n                <!-- Hitos Clave del Proyecto -->\n                <h3 style="color:#0f172a; border-bottom:1px solid #e2e8f0; padding-bottom:6px; margin-bottom:15px; font-size:1.1rem; font-weight:700; margin-top: 25px;"><i class="fa-solid fa-flag" style="color:#6366f1; margin-right:6px;"></i> Hitos del Proyecto</h3>\n                <div style="display:grid; grid-template-columns: 1fr 1fr; gap:10px; margin-bottom:25px;">\n                    \n                        <div style="grid-column: 1 / -1; padding: 15px; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 6px; text-align: center; color: #94a3b8; font-size: 0.85rem;">\n                            No se han identificado hitos (tareas críticas o con etiqueta de hito) en el cronograma actual.\n                        </div>\n                    \n                </div>\n\n                <!-- Carga de Trabajo del Equipo -->\n                <h3 style="color:#0f172a; border-bottom:1px solid #e2e8f0; padding-bottom:6px; margin-bottom:15px; font-size:1.1rem; font-weight:700; margin-top: 25px;"><i class="fa-solid fa-users" style="color:#6366f1; margin-right:6px;"></i> Distribución de Carga de Trabajo</h3>\n                <div style="overflow-x:auto; margin-bottom:25px; border:1px solid #e2e8f0; border-radius:6px;">\n                    <table style="width:100%; border-collapse:collapse; text-align:left; font-size:0.85rem; background:#ffffff;">\n                        <thead>\n                            <tr style="background:#f1f5f9; color:#334155; font-weight:700; border-bottom:2px solid #cbd5e1;">\n                                <th style="padding:10px; border-bottom: 1px solid #e2e8f0;">Responsable</th>\n                                <th style="padding:10px; border-bottom: 1px solid #e2e8f0; text-align:center;">Tareas Totales</th>\n                                <th style="padding:10px; border-bottom: 1px solid #e2e8f0; text-align:center;">Tareas Completadas</th>\n                                <th style="padding:10px; border-bottom: 1px solid #e2e8f0; text-align:center;">Puntos Planificados (SP)</th>\n                                <th style="padding:10px; border-bottom: 1px solid #e2e8f0; text-align:center;">Puntos Completados (SP)</th>\n                            </tr>\n                        </thead>\n                        <tbody>\n                            \n                                <tr style="border-bottom:1px solid #e2e8f0; color:#475569;">\n                                    <td style="padding:10px; border-bottom: 1px solid #e2e8f0; font-weight:600; color:#0f172a;">Sin Asignar</td>\n                                    <td style="padding:10px; border-bottom: 1px solid #e2e8f0; text-align:center;">1</td>\n                                    <td style="padding:10px; border-bottom: 1px solid #e2e8f0; text-align:center;">0</td>\n                                    <td style="padding:10px; border-bottom: 1px solid #e2e8f0; text-align:center;"><span style="background:#f3f4f6; padding:2px 6px; border-radius:4px; font-weight:bold;">0 SP</span></td>\n                                    <td style="padding:10px; border-bottom: 1px solid #e2e8f0; text-align:center;"><span style="background:#e0f2fe; color:#0369a1; padding:2px 6px; border-radius:4px; font-weight:bold;">0 SP</span></td>\n                                </tr>\n                            \n                        </tbody>\n                    </table>\n                </div>\n                \n                <!-- Cronograma Simplificado (Gantt) -->\n                <h3 style="color:#0f172a; border-bottom:1px solid #e2e8f0; padding-bottom:6px; margin-bottom:15px; font-size:1.1rem; font-weight:700;"><i class="fa-solid fa-list-check" style="color:#6366f1; margin-right:6px;"></i> Cronograma y Avance de Tareas</h3>\n                <div style="overflow-x:auto; margin-bottom:25px; border:1px solid #e2e8f0; border-radius:6px;">\n                    <table style="width:100%; border-collapse:collapse; text-align:left; font-size:0.85rem; background:#ffffff;">\n                        <thead>\n                            <tr style="background:#f1f5f9; color:#334155; font-weight:700; border-bottom:2px solid #cbd5e1;">\n                                <th style="padding:10px; border-bottom: 1px solid #e2e8f0;">Tarea</th>\n                                <th style="padding:10px; border-bottom: 1px solid #e2e8f0;">Estado</th>\n                                <th style="padding:10px; border-bottom: 1px solid #e2e8f0;">Fechas</th>\n                                <th style="padding:10px; border-bottom: 1px solid #e2e8f0; width:160px;">Avance</th>\n                            </tr>\n                        </thead>\n                        <tbody>\n                            \n                                    <tr style="border-bottom:1px solid #e2e8f0; color:#475569;">\n                                        <td style="padding:10px; font-weight:600; color:#0f172a;">\n                                            da\n                                            <span style="display:block; font-size:0.7rem; font-weight:normal; color:#94a3b8;">Asignado: Sin Asignar</span>\n                                        </td>\n                                        <td style="padding:10px;">\n                                            <span style="display:inline-block; background:#e0e7ff; color:#4338ca; padding:2px 6px; border-radius:4px; font-size:0.7rem; font-weight:600;">Prueba</span>\n                                        </td>\n                                        <td style="padding:10px; font-size:0.75rem;">\n                                            17/6/2026 al 21/6/2026\n                                        </td>\n                                        <td style="padding:10px;">\n                                            <div style="display:flex; align-items:center; gap:8px;">\n                                                <div style="flex-grow:1; background:#e2e8f0; height:8px; border-radius:4px; overflow:hidden; width:80px;">\n                                                    <div style="width:100%; background:#10b981; height:100%;"></div>\n                                                </div>\n                                                <span style="font-weight:700; color:#334155; font-size:0.8rem;">100%</span>\n                                            </div>\n                                        </td>\n                                    </tr>\n                                \n                        </tbody>\n                    </table>\n                </div>\n                \n                <!-- Footer -->\n                <div style="margin-top:30px; border-top:1px solid #e2e8f0; padding-top:15px; display:flex; justify-content:space-between; color:#94a3b8; font-size:0.75rem;">\n                    <span>GanttScrum Pro - JAC</span>\n                    <span>Reporte Generado Automáticamente</span>\n                </div>\n            </div>	2026-07-13 19:24:16.35389
2	4	V1	<div id="printableReportContent" style="padding:15px; color:#1e293b; background:#ffffff; border-radius:8px; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; box-sizing:border-box;">\n                <!-- Header -->\n                <div style="border-bottom: 3px solid #6366f1; padding-bottom: 15px; margin-bottom: 20px; display:flex; justify-content:space-between; align-items:flex-end;">\n                    <div>\n                        <h1 style="margin:0; color:#0f172a; font-size:1.7rem; font-weight:700; letter-spacing:-0.5px;">INFORME DE AVANCE EJECUTIVO (IA)</h1>\n                        <p style="margin:5px 0 0 0; color:#475569; font-size:0.95rem;">Proyecto: <strong style="color:#0f172a;">prueba</strong></p>\n                    </div>\n                    <div style="text-align:right;">\n                        <p style="margin:0; color:#64748b; font-size:0.85rem;">Fecha: 13 de julio de 2026</p>\n                        <span style="display:inline-block; margin-top:5px; background:#f0f9ff; color:#6366f1; border:1px solid #6366f140; padding:4px 10px; border-radius:20px; font-size:0.85rem; font-weight:bold;">Avance: 0%</span>\n                    </div>\n                </div>\n                \n                <!-- Progreso y Esfuerzo (Story Points) -->\n                <div style="margin-bottom: 25px; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; background: #f8fafc; border: 1px solid #e2e8f0; padding: 15px; border-radius: 8px;">\n                    <div>\n                        <div style="display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px;">\n                            <span style="font-weight: 700; color: #1e293b; font-size: 0.9rem;">Avance de Tareas (Físico)</span>\n                            <span style="font-weight: 800; color: #6366f1; font-size: 1.05rem;">0%</span>\n                        </div>\n                        <div style="width: 100%; background: #e2e8f0; height: 10px; border-radius: 5px; overflow: hidden;">\n                            <div style="width: 0%; background: #6366f1; height: 100%; border-radius: 5px;"></div>\n                        </div>\n                        <p style="margin: 5px 0 0 0; color: #64748b; font-size: 0.75rem;">\n                            Completado: <strong>0</strong> de <strong>5</strong> tareas.\n                        </p>\n                    </div>\n                    <div>\n                        <div style="display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px;">\n                            <span style="font-weight: 700; color: #1e293b; font-size: 0.9rem;">Avance de Esfuerzo (Story Points)</span>\n                            <span style="font-weight: 800; color: #a855f7; font-size: 1.05rem;">0%</span>\n                        </div>\n                        <div style="width: 100%; background: #e2e8f0; height: 10px; border-radius: 5px; overflow: hidden;">\n                            <div style="width: 0%; background: #a855f7; height: 100%; border-radius: 5px;"></div>\n                        </div>\n                        <p style="margin: 5px 0 0 0; color: #64748b; font-size: 0.75rem;">\n                            Completado: <strong>0</strong> de <strong>0</strong> Story Points (SP).\n                        </p>\n                    </div>\n                </div>\n\n                <!-- Foco en Alertas de Planificación -->\n                <div style="display: flex; gap: 15px; margin-bottom: 25px; flex-wrap: wrap;">\n                    <div style="flex: 1; min-width: 150px; display:flex; align-items:center; gap:10px; padding: 12px; border-radius: 8px; background: #fef2f2; border: 1px solid #fecaca; box-sizing:border-box;">\n                        <span style="font-size: 1.6rem; color: #ef4444;">🚨</span>\n                        <div>\n                            <span style="display:block; font-size:0.7rem; color:#64748b; font-weight:600; text-transform:uppercase;">Tareas Atrasadas</span>\n                            <strong style="font-size:1rem; color: #ef4444;">5 críticas</strong>\n                        </div>\n                    </div>\n                    <div style="flex: 1; min-width: 150px; display:flex; align-items:center; gap:10px; padding: 12px; border-radius: 8px; background: #f8fafc; border: 1px solid #e2e8f0; box-sizing:border-box;">\n                        <span style="font-size: 1.6rem; color: #94a3b8;">🚫</span>\n                        <div>\n                            <span style="display:block; font-size:0.7rem; color:#64748b; font-weight:600; text-transform:uppercase;">Tareas Bloqueadas</span>\n                            <strong style="font-size:1rem; color: #1e293b;">0 impedidas</strong>\n                        </div>\n                    </div>\n                    <div style="flex: 1; min-width: 150px; display:flex; align-items:center; gap:10px; padding: 12px; border-radius: 8px; background: #f8fafc; border: 1px solid #e2e8f0; box-sizing:border-box;">\n                        <span style="font-size: 1.6rem; color: #3b82f6;">📅</span>\n                        <div>\n                            <span style="display:block; font-size:0.7rem; color:#64748b; font-weight:600; text-transform:uppercase;">Por Vencer (3d)</span>\n                            <strong style="font-size:1rem; color:#1e293b;">0 próximas</strong>\n                        </div>\n                    </div>\n                </div>\n\n                <!-- Distribución de Tareas por Columna -->\n                <h3 style="color:#0f172a; border-bottom:1px solid #e2e8f0; padding-bottom:6px; margin-bottom:12px; font-size:1.1rem; font-weight:700;"><i class="fa-solid fa-chart-simple" style="color:#6366f1; margin-right:6px;"></i> Distribución por Estado</h3>\n                <div style="display: flex; gap: 10px; margin-bottom: 25px; flex-wrap: wrap;">\n                    \n                        <div style="flex: 1; min-width: 100px; background: #f8fafc; border: 1px solid #e2e8f0; padding: 10px; border-radius: 6px; text-align: center; box-sizing: border-box;">\n                            <span style="display: block; font-size: 0.7rem; color: #64748b; text-transform: uppercase; font-weight: 700; margin-bottom: 4px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;">Por Hacer</span>\n                            <strong style="font-size: 1.3rem; color: #0f172a;">3</strong>\n                        </div>\n                    \n                        <div style="flex: 1; min-width: 100px; background: #f8fafc; border: 1px solid #e2e8f0; padding: 10px; border-radius: 6px; text-align: center; box-sizing: border-box;">\n                            <span style="display: block; font-size: 0.7rem; color: #64748b; text-transform: uppercase; font-weight: 700; margin-bottom: 4px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;">En Progreso</span>\n                            <strong style="font-size: 1.3rem; color: #0f172a;">1</strong>\n                        </div>\n                    \n                        <div style="flex: 1; min-width: 100px; background: #f8fafc; border: 1px solid #e2e8f0; padding: 10px; border-radius: 6px; text-align: center; box-sizing: border-box;">\n                            <span style="display: block; font-size: 0.7rem; color: #64748b; text-transform: uppercase; font-weight: 700; margin-bottom: 4px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;">Revisión</span>\n                            <strong style="font-size: 1.3rem; color: #0f172a;">1</strong>\n                        </div>\n                    \n                        <div style="flex: 1; min-width: 100px; background: #f8fafc; border: 1px solid #e2e8f0; padding: 10px; border-radius: 6px; text-align: center; box-sizing: border-box;">\n                            <span style="display: block; font-size: 0.7rem; color: #64748b; text-transform: uppercase; font-weight: 700; margin-bottom: 4px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;">Hecho</span>\n                            <strong style="font-size: 1.3rem; color: #0f172a;">0</strong>\n                        </div>\n                    \n                        <div style="flex: 1; min-width: 100px; background: #f8fafc; border: 1px solid #e2e8f0; padding: 10px; border-radius: 6px; text-align: center; box-sizing: border-box;">\n                            <span style="display: block; font-size: 0.7rem; color: #64748b; text-transform: uppercase; font-weight: 700; margin-bottom: 4px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;">Cerrado</span>\n                            <strong style="font-size: 1.3rem; color: #0f172a;">0</strong>\n                        </div>\n                    \n                </div>\n        \n                <!-- Síntesis Ejecutiva de IA -->\n                <div style="background:#f5f3ff; border-left:4px solid #8b5cf6; padding:15px; border-radius:0 6px 6px 0; margin-bottom:25px; box-sizing:border-box;">\n                    <h3 style="margin:0 0 8px 0; color:#5b21b6; font-size:1.1rem; font-weight:700;"><i class="fa-solid fa-wand-magic-sparkles" style="margin-right:6px;"></i> Síntesis Ejecutiva (Generada con IA)</h3>\n                    <p style="margin:0; color:#334155; font-size:0.95rem; line-height:1.6; text-align:justify; white-space: pre-line;">El proyecto 'prueba' cuenta con un avance global del 0.0% (0 de 5 tareas completadas). El proyecto se encuentra en fase de desarrollo activo. Se requiere revisar el cumplimiento de plazos y hitos en el diagrama de Gantt.</p>\n                </div>\n            \n                <!-- Temas de Hoja de Ruta -->\n                <h3 style="color:#0f172a; border-bottom:1px solid #e2e8f0; padding-bottom:6px; margin-bottom:15px; font-size:1.1rem; font-weight:700;"><i class="fa-solid fa-map-location-dot" style="color:#6366f1; margin-right:6px;"></i> Tópicos de Planificación</h3>\n                <div style="display:grid; grid-template-columns:1fr 1fr; gap:15px; margin-bottom:25px;">\n        \n                <div style="background:#f8fafc; border:1px solid #e2e8f0; padding:12px 15px; border-radius:6px; box-sizing:border-box;">\n                    <h4 style="margin:0 0 6px 0; color:#6366f1; font-size:0.95rem; font-weight:700; text-transform:uppercase; letter-spacing:0.3px;">1. Objetivos</h4>\n                    <p style="margin:0; color:#334155; font-size:0.9rem; line-height:1.5; white-space:pre-wrap;">No definido</p>\n                </div>\n            \n                <div style="background:#f8fafc; border:1px solid #e2e8f0; padding:12px 15px; border-radius:6px; box-sizing:border-box;">\n                    <h4 style="margin:0 0 6px 0; color:#6366f1; font-size:0.95rem; font-weight:700; text-transform:uppercase; letter-spacing:0.3px;">2. Entregables</h4>\n                    <p style="margin:0; color:#334155; font-size:0.9rem; line-height:1.5; white-space:pre-wrap;">No definido</p>\n                </div>\n            \n                <div style="background:#f8fafc; border:1px solid #e2e8f0; padding:12px 15px; border-radius:6px; box-sizing:border-box;">\n                    <h4 style="margin:0 0 6px 0; color:#6366f1; font-size:0.95rem; font-weight:700; text-transform:uppercase; letter-spacing:0.3px;">3. Estrategia</h4>\n                    <p style="margin:0; color:#334155; font-size:0.9rem; line-height:1.5; white-space:pre-wrap;">No definido</p>\n                </div>\n            \n                <div style="background:#f8fafc; border:1px solid #e2e8f0; padding:12px 15px; border-radius:6px; box-sizing:border-box;">\n                    <h4 style="margin:0 0 6px 0; color:#6366f1; font-size:0.95rem; font-weight:700; text-transform:uppercase; letter-spacing:0.3px;">4. Recursos</h4>\n                    <p style="margin:0; color:#334155; font-size:0.9rem; line-height:1.5; white-space:pre-wrap;">No definido</p>\n                </div>\n            \n                <div style="background:#f8fafc; border:1px solid #e2e8f0; padding:12px 15px; border-radius:6px; box-sizing:border-box;">\n                    <h4 style="margin:0 0 6px 0; color:#6366f1; font-size:0.95rem; font-weight:700; text-transform:uppercase; letter-spacing:0.3px;">5. Plazos</h4>\n                    <p style="margin:0; color:#334155; font-size:0.9rem; line-height:1.5; white-space:pre-wrap;">No definido</p>\n                </div>\n            \n                <div style="background:#f8fafc; border:1px solid #e2e8f0; padding:12px 15px; border-radius:6px; box-sizing:border-box;">\n                    <h4 style="margin:0 0 6px 0; color:#6366f1; font-size:0.95rem; font-weight:700; text-transform:uppercase; letter-spacing:0.3px;">6. Partes involucradas</h4>\n                    <p style="margin:0; color:#334155; font-size:0.9rem; line-height:1.5; white-space:pre-wrap;">No definido</p>\n                </div>\n            \n                </div>\n\n                <!-- Hitos Clave del Proyecto -->\n                <h3 style="color:#0f172a; border-bottom:1px solid #e2e8f0; padding-bottom:6px; margin-bottom:15px; font-size:1.1rem; font-weight:700; margin-top: 25px;"><i class="fa-solid fa-flag" style="color:#6366f1; margin-right:6px;"></i> Hitos del Proyecto</h3>\n                <div style="display:grid; grid-template-columns: 1fr 1fr; gap:10px; margin-bottom:25px;">\n                    \n                        <div style="grid-column: 1 / -1; padding: 15px; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 6px; text-align: center; color: #94a3b8; font-size: 0.85rem;">\n                            No se han identificado hitos (tareas críticas o con etiqueta de hito) en el cronograma actual.\n                        </div>\n                    \n                </div>\n\n                <!-- Carga de Trabajo del Equipo -->\n                <h3 style="color:#0f172a; border-bottom:1px solid #e2e8f0; padding-bottom:6px; margin-bottom:15px; font-size:1.1rem; font-weight:700; margin-top: 25px;"><i class="fa-solid fa-users" style="color:#6366f1; margin-right:6px;"></i> Distribución de Carga de Trabajo</h3>\n                <div style="overflow-x:auto; margin-bottom:25px; border:1px solid #e2e8f0; border-radius:6px;">\n                    <table style="width:100%; border-collapse:collapse; text-align:left; font-size:0.85rem; background:#ffffff;">\n                        <thead>\n                            <tr style="background:#f1f5f9; color:#334155; font-weight:700; border-bottom:2px solid #cbd5e1;">\n                                <th style="padding:10px; border-bottom: 1px solid #e2e8f0;">Responsable</th>\n                                <th style="padding:10px; border-bottom: 1px solid #e2e8f0; text-align:center;">Tareas Totales</th>\n                                <th style="padding:10px; border-bottom: 1px solid #e2e8f0; text-align:center;">Tareas Completadas</th>\n                                <th style="padding:10px; border-bottom: 1px solid #e2e8f0; text-align:center;">Puntos Planificados (SP)</th>\n                                <th style="padding:10px; border-bottom: 1px solid #e2e8f0; text-align:center;">Puntos Completados (SP)</th>\n                            </tr>\n                        </thead>\n                        <tbody>\n                            \n                                <tr style="border-bottom:1px solid #e2e8f0; color:#475569;">\n                                    <td style="padding:10px; border-bottom: 1px solid #e2e8f0; font-weight:600; color:#0f172a;">Sin Asignar</td>\n                                    <td style="padding:10px; border-bottom: 1px solid #e2e8f0; text-align:center;">4</td>\n                                    <td style="padding:10px; border-bottom: 1px solid #e2e8f0; text-align:center;">0</td>\n                                    <td style="padding:10px; border-bottom: 1px solid #e2e8f0; text-align:center;"><span style="background:#f3f4f6; padding:2px 6px; border-radius:4px; font-weight:bold;">0 SP</span></td>\n                                    <td style="padding:10px; border-bottom: 1px solid #e2e8f0; text-align:center;"><span style="background:#e0f2fe; color:#0369a1; padding:2px 6px; border-radius:4px; font-weight:bold;">0 SP</span></td>\n                                </tr>\n                            \n                                <tr style="border-bottom:1px solid #e2e8f0; color:#475569;">\n                                    <td style="padding:10px; border-bottom: 1px solid #e2e8f0; font-weight:600; color:#0f172a;">admin</td>\n                                    <td style="padding:10px; border-bottom: 1px solid #e2e8f0; text-align:center;">1</td>\n                                    <td style="padding:10px; border-bottom: 1px solid #e2e8f0; text-align:center;">0</td>\n                                    <td style="padding:10px; border-bottom: 1px solid #e2e8f0; text-align:center;"><span style="background:#f3f4f6; padding:2px 6px; border-radius:4px; font-weight:bold;">0 SP</span></td>\n                                    <td style="padding:10px; border-bottom: 1px solid #e2e8f0; text-align:center;"><span style="background:#e0f2fe; color:#0369a1; padding:2px 6px; border-radius:4px; font-weight:bold;">0 SP</span></td>\n                                </tr>\n                            \n                        </tbody>\n                    </table>\n                </div>\n                \n                <!-- Cronograma Simplificado (Gantt) -->\n                <h3 style="color:#0f172a; border-bottom:1px solid #e2e8f0; padding-bottom:6px; margin-bottom:15px; font-size:1.1rem; font-weight:700;"><i class="fa-solid fa-list-check" style="color:#6366f1; margin-right:6px;"></i> Cronograma y Avance de Tareas</h3>\n                <div style="overflow-x:auto; margin-bottom:25px; border:1px solid #e2e8f0; border-radius:6px;">\n                    <table style="width:100%; border-collapse:collapse; text-align:left; font-size:0.85rem; background:#ffffff;">\n                        <thead>\n                            <tr style="background:#f1f5f9; color:#334155; font-weight:700; border-bottom:2px solid #cbd5e1;">\n                                <th style="padding:10px; border-bottom: 1px solid #e2e8f0;">Tarea</th>\n                                <th style="padding:10px; border-bottom: 1px solid #e2e8f0;">Estado</th>\n                                <th style="padding:10px; border-bottom: 1px solid #e2e8f0;">Fechas</th>\n                                <th style="padding:10px; border-bottom: 1px solid #e2e8f0; width:160px;">Avance</th>\n                            </tr>\n                        </thead>\n                        <tbody>\n                            \n                                    <tr style="border-bottom:1px solid #e2e8f0; color:#475569;">\n                                        <td style="padding:10px; font-weight:600; color:#0f172a;">\n                                            ppp\n                                            <span style="display:block; font-size:0.7rem; font-weight:normal; color:#94a3b8;">Asignado: Sin Asignar</span>\n                                        </td>\n                                        <td style="padding:10px;">\n                                            <span style="display:inline-block; background:#e0e7ff; color:#4338ca; padding:2px 6px; border-radius:4px; font-size:0.7rem; font-weight:600;">Revisión</span>\n                                        </td>\n                                        <td style="padding:10px; font-size:0.75rem;">\n                                            21/6/2026 al 28/6/2026\n                                        </td>\n                                        <td style="padding:10px;">\n                                            <div style="display:flex; align-items:center; gap:8px;">\n                                                <div style="flex-grow:1; background:#e2e8f0; height:8px; border-radius:4px; overflow:hidden; width:80px;">\n                                                    <div style="width:100%; background:#10b981; height:100%;"></div>\n                                                </div>\n                                                <span style="font-weight:700; color:#334155; font-size:0.8rem;">100%</span>\n                                            </div>\n                                        </td>\n                                    </tr>\n                                \n                                    <tr style="border-bottom:1px solid #e2e8f0; color:#475569;">\n                                        <td style="padding:10px; font-weight:600; color:#0f172a;">\n                                            sds\n                                            <span style="display:block; font-size:0.7rem; font-weight:normal; color:#94a3b8;">Asignado: Sin Asignar</span>\n                                        </td>\n                                        <td style="padding:10px;">\n                                            <span style="display:inline-block; background:#e0e7ff; color:#4338ca; padding:2px 6px; border-radius:4px; font-size:0.7rem; font-weight:600;">Por Hacer</span>\n                                        </td>\n                                        <td style="padding:10px; font-size:0.75rem;">\n                                            18/6/2026 al 19/6/2026\n                                        </td>\n                                        <td style="padding:10px;">\n                                            <div style="display:flex; align-items:center; gap:8px;">\n                                                <div style="flex-grow:1; background:#e2e8f0; height:8px; border-radius:4px; overflow:hidden; width:80px;">\n                                                    <div style="width:100%; background:#10b981; height:100%;"></div>\n                                                </div>\n                                                <span style="font-weight:700; color:#334155; font-size:0.8rem;">100%</span>\n                                            </div>\n                                        </td>\n                                    </tr>\n                                \n                                    <tr style="border-bottom:1px solid #e2e8f0; color:#475569;">\n                                        <td style="padding:10px; font-weight:600; color:#0f172a;">\n                                            prueba 1\n                                            <span style="display:block; font-size:0.7rem; font-weight:normal; color:#94a3b8;">Asignado: Sin Asignar</span>\n                                        </td>\n                                        <td style="padding:10px;">\n                                            <span style="display:inline-block; background:#e0e7ff; color:#4338ca; padding:2px 6px; border-radius:4px; font-size:0.7rem; font-weight:600;">Por Hacer</span>\n                                        </td>\n                                        <td style="padding:10px; font-size:0.75rem;">\n                                            18/6/2026 al 19/6/2026\n                                        </td>\n                                        <td style="padding:10px;">\n                                            <div style="display:flex; align-items:center; gap:8px;">\n                                                <div style="flex-grow:1; background:#e2e8f0; height:8px; border-radius:4px; overflow:hidden; width:80px;">\n                                                    <div style="width:0%; background:#10b981; height:100%;"></div>\n                                                </div>\n                                                <span style="font-weight:700; color:#334155; font-size:0.8rem;">0%</span>\n                                            </div>\n                                        </td>\n                                    </tr>\n                                \n                                    <tr style="border-bottom:1px solid #e2e8f0; color:#475569;">\n                                        <td style="padding:10px; font-weight:600; color:#0f172a;">\n                                            werwe\n                                            <span style="display:block; font-size:0.7rem; font-weight:normal; color:#94a3b8;">Asignado: Sin Asignar</span>\n                                        </td>\n                                        <td style="padding:10px;">\n                                            <span style="display:inline-block; background:#e0e7ff; color:#4338ca; padding:2px 6px; border-radius:4px; font-size:0.7rem; font-weight:600;">En Progreso</span>\n                                        </td>\n                                        <td style="padding:10px; font-size:0.75rem;">\n                                            18/6/2026 al 25/6/2026\n                                        </td>\n                                        <td style="padding:10px;">\n                                            <div style="display:flex; align-items:center; gap:8px;">\n                                                <div style="flex-grow:1; background:#e2e8f0; height:8px; border-radius:4px; overflow:hidden; width:80px;">\n                                                    <div style="width:0%; background:#10b981; height:100%;"></div>\n                                                </div>\n                                                <span style="font-weight:700; color:#334155; font-size:0.8rem;">0%</span>\n                                            </div>\n                                        </td>\n                                    </tr>\n                                \n                                    <tr style="border-bottom:1px solid #e2e8f0; color:#475569;">\n                                        <td style="padding:10px; font-weight:600; color:#0f172a;">\n                                            ppp\n                                            <span style="display:block; font-size:0.7rem; font-weight:normal; color:#94a3b8;">Asignado: admin</span>\n                                        </td>\n                                        <td style="padding:10px;">\n                                            <span style="display:inline-block; background:#e0e7ff; color:#4338ca; padding:2px 6px; border-radius:4px; font-size:0.7rem; font-weight:600;">Por Hacer</span>\n                                        </td>\n                                        <td style="padding:10px; font-size:0.75rem;">\n                                            17/6/2026 al 26/6/2026\n                                        </td>\n                                        <td style="padding:10px;">\n                                            <div style="display:flex; align-items:center; gap:8px;">\n                                                <div style="flex-grow:1; background:#e2e8f0; height:8px; border-radius:4px; overflow:hidden; width:80px;">\n                                                    <div style="width:100%; background:#10b981; height:100%;"></div>\n                                                </div>\n                                                <span style="font-weight:700; color:#334155; font-size:0.8rem;">100%</span>\n                                            </div>\n                                        </td>\n                                    </tr>\n                                \n                        </tbody>\n                    </table>\n                </div>\n                \n                <!-- Footer -->\n                <div style="margin-top:30px; border-top:1px solid #e2e8f0; padding-top:15px; display:flex; justify-content:space-between; color:#94a3b8; font-size:0.75rem;">\n                    <span>GanttScrum Pro - JAC</span>\n                    <span>Reporte Generado Automáticamente</span>\n                </div>\n            </div>	2026-07-13 19:27:09.232994
3	1	v2	<div id="printableReportContent" style="padding:15px; color:#1e293b; background:#ffffff; border-radius:8px; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; box-sizing:border-box;">\n                <!-- Header -->\n                <div style="border-bottom: 3px solid #6366f1; padding-bottom: 15px; margin-bottom: 20px; display:flex; justify-content:space-between; align-items:flex-end;">\n                    <div>\n                        <h1 style="margin:0; color:#0f172a; font-size:1.7rem; font-weight:700; letter-spacing:-0.5px;">INFORME DE AVANCE EJECUTIVO (IA)</h1>\n                        <p style="margin:5px 0 0 0; color:#475569; font-size:0.95rem;">Proyecto: <strong style="color:#0f172a;">1</strong></p>\n                    </div>\n                    <div style="text-align:right;">\n                        <p style="margin:0; color:#64748b; font-size:0.85rem;">Fecha: 14 de julio de 2026</p>\n                        <span style="display:inline-block; margin-top:5px; background:#f0f9ff; color:#6366f1; border:1px solid #6366f140; padding:4px 10px; border-radius:20px; font-size:0.85rem; font-weight:bold;">Avance: 0%</span>\n                    </div>\n                </div>\n                \n                <!-- Progreso y Esfuerzo (Story Points) -->\n                <div style="margin-bottom: 25px; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; background: #f8fafc; border: 1px solid #e2e8f0; padding: 15px; border-radius: 8px;">\n                    <div>\n                        <div style="display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px;">\n                            <span style="font-weight: 700; color: #1e293b; font-size: 0.9rem;">Avance de Tareas (Físico)</span>\n                            <span style="font-weight: 800; color: #6366f1; font-size: 1.05rem;">0%</span>\n                        </div>\n                        <div style="width: 100%; background: #e2e8f0; height: 10px; border-radius: 5px; overflow: hidden;">\n                            <div style="width: 0%; background: #6366f1; height: 100%; border-radius: 5px;"></div>\n                        </div>\n                        <p style="margin: 5px 0 0 0; color: #64748b; font-size: 0.75rem;">\n                            Completado: <strong>0</strong> de <strong>1</strong> tareas.\n                        </p>\n                    </div>\n                    <div>\n                        <div style="display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px;">\n                            <span style="font-weight: 700; color: #1e293b; font-size: 0.9rem;">Avance de Esfuerzo (Story Points)</span>\n                            <span style="font-weight: 800; color: #a855f7; font-size: 1.05rem;">0%</span>\n                        </div>\n                        <div style="width: 100%; background: #e2e8f0; height: 10px; border-radius: 5px; overflow: hidden;">\n                            <div style="width: 0%; background: #a855f7; height: 100%; border-radius: 5px;"></div>\n                        </div>\n                        <p style="margin: 5px 0 0 0; color: #64748b; font-size: 0.75rem;">\n                            Completado: <strong>0</strong> de <strong>0</strong> Story Points (SP).\n                        </p>\n                    </div>\n                </div>\n\n                <!-- Foco en Alertas de Planificación -->\n                <div style="display: flex; gap: 15px; margin-bottom: 25px; flex-wrap: wrap;">\n                    <div style="flex: 1; min-width: 150px; display:flex; align-items:center; gap:10px; padding: 12px; border-radius: 8px; background: #fef2f2; border: 1px solid #fecaca; box-sizing:border-box;">\n                        <span style="font-size: 1.6rem; color: #ef4444;">🚨</span>\n                        <div>\n                            <span style="display:block; font-size:0.7rem; color:#64748b; font-weight:600; text-transform:uppercase;">Tareas Atrasadas</span>\n                            <strong style="font-size:1rem; color: #ef4444;">1 críticas</strong>\n                        </div>\n                    </div>\n                    <div style="flex: 1; min-width: 150px; display:flex; align-items:center; gap:10px; padding: 12px; border-radius: 8px; background: #f8fafc; border: 1px solid #e2e8f0; box-sizing:border-box;">\n                        <span style="font-size: 1.6rem; color: #94a3b8;">🚫</span>\n                        <div>\n                            <span style="display:block; font-size:0.7rem; color:#64748b; font-weight:600; text-transform:uppercase;">Tareas Bloqueadas</span>\n                            <strong style="font-size:1rem; color: #1e293b;">0 impedidas</strong>\n                        </div>\n                    </div>\n                    <div style="flex: 1; min-width: 150px; display:flex; align-items:center; gap:10px; padding: 12px; border-radius: 8px; background: #f8fafc; border: 1px solid #e2e8f0; box-sizing:border-box;">\n                        <span style="font-size: 1.6rem; color: #3b82f6;">📅</span>\n                        <div>\n                            <span style="display:block; font-size:0.7rem; color:#64748b; font-weight:600; text-transform:uppercase;">Por Vencer (3d)</span>\n                            <strong style="font-size:1rem; color:#1e293b;">0 próximas</strong>\n                        </div>\n                    </div>\n                </div>\n\n                <!-- Distribución de Tareas por Columna -->\n                <h3 style="color:#0f172a; border-bottom:1px solid #e2e8f0; padding-bottom:6px; margin-bottom:12px; font-size:1.1rem; font-weight:700;"><i class="fa-solid fa-chart-simple" style="color:#6366f1; margin-right:6px;"></i> Distribución por Estado</h3>\n                <div style="display: flex; gap: 10px; margin-bottom: 25px; flex-wrap: wrap;">\n                    \n                        <div style="flex: 1; min-width: 100px; background: #f8fafc; border: 1px solid #e2e8f0; padding: 10px; border-radius: 6px; text-align: center; box-sizing: border-box;">\n                            <span style="display: block; font-size: 0.7rem; color: #64748b; text-transform: uppercase; font-weight: 700; margin-bottom: 4px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;">Prueba</span>\n                            <strong style="font-size: 1.3rem; color: #0f172a;">1</strong>\n                        </div>\n                    \n                        <div style="flex: 1; min-width: 100px; background: #f8fafc; border: 1px solid #e2e8f0; padding: 10px; border-radius: 6px; text-align: center; box-sizing: border-box;">\n                            <span style="display: block; font-size: 0.7rem; color: #64748b; text-transform: uppercase; font-weight: 700; margin-bottom: 4px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;">Prueba 2</span>\n                            <strong style="font-size: 1.3rem; color: #0f172a;">0</strong>\n                        </div>\n                    \n                </div>\n        \n                <!-- Síntesis Ejecutiva de IA -->\n                <div style="background:#f5f3ff; border-left:4px solid #8b5cf6; padding:15px; border-radius:0 6px 6px 0; margin-bottom:25px; box-sizing:border-box;">\n                    <h3 style="margin:0 0 8px 0; color:#5b21b6; font-size:1.1rem; font-weight:700;"><i class="fa-solid fa-wand-magic-sparkles" style="margin-right:6px;"></i> Síntesis Ejecutiva (Generada con IA)</h3>\n                    <p style="margin:0; color:#334155; font-size:0.95rem; line-height:1.6; text-align:justify; white-space: pre-line;">El proyecto '1' cuenta con un avance global del 0.0% (0 de 1 tareas completadas). El proyecto se encuentra en fase de desarrollo activo. Se requiere revisar el cumplimiento de plazos y hitos en el diagrama de Gantt.</p>\n                </div>\n            \n                <!-- Temas de Hoja de Ruta -->\n                <h3 style="color:#0f172a; border-bottom:1px solid #e2e8f0; padding-bottom:6px; margin-bottom:15px; font-size:1.1rem; font-weight:700;"><i class="fa-solid fa-map-location-dot" style="color:#6366f1; margin-right:6px;"></i> Tópicos de Planificación</h3>\n                <div style="display:grid; grid-template-columns:1fr 1fr; gap:15px; margin-bottom:25px;">\n        \n                <div style="background:#f8fafc; border:1px solid #e2e8f0; padding:12px 15px; border-radius:6px; box-sizing:border-box;">\n                    <h4 style="margin:0 0 6px 0; color:#6366f1; font-size:0.95rem; font-weight:700; text-transform:uppercase; letter-spacing:0.3px;">1. Objetivos</h4>\n                    <p style="margin:0; color:#334155; font-size:0.9rem; line-height:1.5; white-space:pre-wrap;">w</p>\n                </div>\n            \n                <div style="background:#f8fafc; border:1px solid #e2e8f0; padding:12px 15px; border-radius:6px; box-sizing:border-box;">\n                    <h4 style="margin:0 0 6px 0; color:#6366f1; font-size:0.95rem; font-weight:700; text-transform:uppercase; letter-spacing:0.3px;">2. Entregables</h4>\n                    <p style="margin:0; color:#334155; font-size:0.9rem; line-height:1.5; white-space:pre-wrap;">w\nw\nw\nw</p>\n                </div>\n            \n                <div style="background:#f8fafc; border:1px solid #e2e8f0; padding:12px 15px; border-radius:6px; box-sizing:border-box;">\n                    <h4 style="margin:0 0 6px 0; color:#6366f1; font-size:0.95rem; font-weight:700; text-transform:uppercase; letter-spacing:0.3px;">3. Estrategia</h4>\n                    <p style="margin:0; color:#334155; font-size:0.9rem; line-height:1.5; white-space:pre-wrap;">w</p>\n                </div>\n            \n                <div style="background:#f8fafc; border:1px solid #e2e8f0; padding:12px 15px; border-radius:6px; box-sizing:border-box;">\n                    <h4 style="margin:0 0 6px 0; color:#6366f1; font-size:0.95rem; font-weight:700; text-transform:uppercase; letter-spacing:0.3px;">4. Recursos</h4>\n                    <p style="margin:0; color:#334155; font-size:0.9rem; line-height:1.5; white-space:pre-wrap;">w</p>\n                </div>\n            \n                <div style="background:#f8fafc; border:1px solid #e2e8f0; padding:12px 15px; border-radius:6px; box-sizing:border-box;">\n                    <h4 style="margin:0 0 6px 0; color:#6366f1; font-size:0.95rem; font-weight:700; text-transform:uppercase; letter-spacing:0.3px;">5. Plazos</h4>\n                    <p style="margin:0; color:#334155; font-size:0.9rem; line-height:1.5; white-space:pre-wrap;">w\nw\nw\nw</p>\n                </div>\n            \n                <div style="background:#f8fafc; border:1px solid #e2e8f0; padding:12px 15px; border-radius:6px; box-sizing:border-box;">\n                    <h4 style="margin:0 0 6px 0; color:#6366f1; font-size:0.95rem; font-weight:700; text-transform:uppercase; letter-spacing:0.3px;">6. Partes involucradas</h4>\n                    <p style="margin:0; color:#334155; font-size:0.9rem; line-height:1.5; white-space:pre-wrap;">w\nw\nw\nw</p>\n                </div>\n            \n                </div>\n\n                <!-- Hitos Clave del Proyecto -->\n                <h3 style="color:#0f172a; border-bottom:1px solid #e2e8f0; padding-bottom:6px; margin-bottom:15px; font-size:1.1rem; font-weight:700; margin-top: 25px;"><i class="fa-solid fa-flag" style="color:#6366f1; margin-right:6px;"></i> Hitos del Proyecto</h3>\n                <div style="display:flex; flex-direction:column; gap:10px; margin-bottom:25px;">\n                    \n                            <div style="background:#f8fafc; border:1px solid #e2e8f0; padding:12px 15px; border-radius:6px; box-sizing:border-box;">\n                                <div style="display:flex; justify-content:space-between; align-items:center;">\n                                    <div style="display:flex; align-items:center; gap:10px;">\n                                        <span style="display:inline-block; width:10px; height:10px; border-radius:50%; background:#ef4444;"></span>\n                                        <strong style="font-size:0.85rem; color:#0f172a;">da</strong>\n                                    </div>\n                                    <span style="font-size:0.75rem; color:#64748b; font-weight:600;">21/6/2026 (Vencido)</span>\n                                </div>\n                                <p style="margin:6px 0 0 20px; font-size:0.8rem; color:#475569; line-height:1.4;">d</p>\n                            </div>\n                        \n                </div>\n\n                <!-- Carga de Trabajo del Equipo -->\n                <h3 style="color:#0f172a; border-bottom:1px solid #e2e8f0; padding-bottom:6px; margin-bottom:15px; font-size:1.1rem; font-weight:700; margin-top: 25px;"><i class="fa-solid fa-users" style="color:#6366f1; margin-right:6px;"></i> Distribución de Carga de Trabajo</h3>\n                <div style="overflow-x:auto; margin-bottom:25px; border:1px solid #e2e8f0; border-radius:6px;">\n                    <table style="width:100%; border-collapse:collapse; text-align:left; font-size:0.85rem; background:#ffffff;">\n                        <thead>\n                            <tr style="background:#f1f5f9; color:#334155; font-weight:700; border-bottom:2px solid #cbd5e1;">\n                                <th style="padding:10px; border-bottom: 1px solid #e2e8f0;">Responsable</th>\n                                <th style="padding:10px; border-bottom: 1px solid #e2e8f0; text-align:center;">Tareas Totales</th>\n                                <th style="padding:10px; border-bottom: 1px solid #e2e8f0; text-align:center;">Tareas Completadas</th>\n                                <th style="padding:10px; border-bottom: 1px solid #e2e8f0; text-align:center;">Puntos Planificados (SP)</th>\n                                <th style="padding:10px; border-bottom: 1px solid #e2e8f0; text-align:center;">Puntos Completados (SP)</th>\n                            </tr>\n                        </thead>\n                        <tbody>\n                            \n                                <tr style="border-bottom:1px solid #e2e8f0; color:#475569;">\n                                    <td style="padding:10px; border-bottom: 1px solid #e2e8f0; font-weight:600; color:#0f172a;">Sin Asignar</td>\n                                    <td style="padding:10px; border-bottom: 1px solid #e2e8f0; text-align:center;">1</td>\n                                    <td style="padding:10px; border-bottom: 1px solid #e2e8f0; text-align:center;">0</td>\n                                    <td style="padding:10px; border-bottom: 1px solid #e2e8f0; text-align:center;"><span style="background:#f3f4f6; padding:2px 6px; border-radius:4px; font-weight:bold;">0 SP</span></td>\n                                    <td style="padding:10px; border-bottom: 1px solid #e2e8f0; text-align:center;"><span style="background:#e0f2fe; color:#0369a1; padding:2px 6px; border-radius:4px; font-weight:bold;">0 SP</span></td>\n                                </tr>\n                            \n                        </tbody>\n                    </table>\n                </div>\n                \n                <!-- Cronograma Simplificado (Gantt) -->\n                <h3 style="color:#0f172a; border-bottom:1px solid #e2e8f0; padding-bottom:6px; margin-bottom:15px; font-size:1.1rem; font-weight:700;"><i class="fa-solid fa-list-check" style="color:#6366f1; margin-right:6px;"></i> Cronograma y Avance de Tareas</h3>\n                <div style="overflow-x:auto; margin-bottom:25px; border:1px solid #e2e8f0; border-radius:6px;">\n                    <table style="width:100%; border-collapse:collapse; text-align:left; font-size:0.85rem; background:#ffffff;">\n                        <thead>\n                            <tr style="background:#f1f5f9; color:#334155; font-weight:700; border-bottom:2px solid #cbd5e1;">\n                                <th style="padding:10px; border-bottom: 1px solid #e2e8f0;">Tarea</th>\n                                <th style="padding:10px; border-bottom: 1px solid #e2e8f0;">Estado</th>\n                                <th style="padding:10px; border-bottom: 1px solid #e2e8f0;">Fechas</th>\n                                <th style="padding:10px; border-bottom: 1px solid #e2e8f0; width:160px;">Avance</th>\n                            </tr>\n                        </thead>\n                        <tbody>\n                            \n                                    <tr style="border-bottom:1px solid #e2e8f0; color:#475569;">\n                                        <td style="padding:10px; font-weight:600; color:#0f172a;">\n                                            da\n                                            <span style="display:block; font-size:0.7rem; font-weight:normal; color:#94a3b8;">Asignado: Sin Asignar</span>\n                                        </td>\n                                        <td style="padding:10px;">\n                                            <span style="display:inline-block; background:#e0e7ff; color:#4338ca; padding:2px 6px; border-radius:4px; font-size:0.7rem; font-weight:600;">Prueba</span>\n                                        </td>\n                                        <td style="padding:10px; font-size:0.75rem;">\n                                            17/6/2026 al 21/6/2026\n                                        </td>\n                                        <td style="padding:10px;">\n                                            <div style="display:flex; align-items:center; gap:8px;">\n                                                <div style="flex-grow:1; background:#e2e8f0; height:8px; border-radius:4px; overflow:hidden; width:80px;">\n                                                    <div style="width:100%; background:#10b981; height:100%;"></div>\n                                                </div>\n                                                <span style="font-weight:700; color:#334155; font-size:0.8rem;">100%</span>\n                                            </div>\n                                        </td>\n                                    </tr>\n                                \n                        </tbody>\n                    </table>\n                </div>\n                \n                <!-- Footer -->\n                <div style="margin-top:30px; border-top:1px solid #e2e8f0; padding-top:15px; display:flex; justify-content:space-between; color:#94a3b8; font-size:0.75rem;">\n                    <span>GanttScrum Pro - JAC</span>\n                    <span>Reporte Generado Automáticamente</span>\n                </div>\n            </div>	2026-07-14 11:33:42.999687
\.


--
-- Data for Name: project_roadmap_versions; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.project_roadmap_versions (id, project_id, version_name, roadmap_objectives, roadmap_deliverables, roadmap_strategy, roadmap_resources, roadmap_deadlines, roadmap_stakeholders, created_at) FROM stdin;
1	1	v1	w	w\nw\nw\nw	w	w	w\nw\nw\nw	w\nw\nw\nw	2026-07-13 19:12:06.111572
\.


--
-- Data for Name: project_viewers; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.project_viewers (user_id, project_id) FROM stdin;
5	21
5	1
5	4
5	45
\.


--
-- Data for Name: projects; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.projects (id, name, description, created_at, is_archived, is_public, creator_id, assignee_id, team_id, company_id, roadmap_objectives, roadmap_deliverables, roadmap_strategy, roadmap_resources, roadmap_deadlines, roadmap_stakeholders) FROM stdin;
30	Prueba22	Prueba22	2026-07-03 21:35:58.202402	t	t	2	\N	\N	1	\N	\N	\N	\N	\N	\N
32	Prueba23	Prueba23	2026-07-03 21:53:14.847153	t	t	4	\N	\N	3	\N	\N	\N	\N	\N	\N
31	Prueba2	Prueba2	2026-07-03 21:44:45.418084	f	t	4	\N	\N	3	\N	\N	\N	\N	\N	\N
38	Nuevo Proyecto en Blanco	\N	2026-07-04 05:41:28.202389	f	f	4	\N	\N	3	\N	\N	\N	\N	\N	\N
39	Nuevo Proyecto en Blanco	\N	2026-07-04 05:41:58.958886	f	f	4	\N	\N	3	\N	\N	\N	\N	\N	\N
40	Nuevo Proyecto en Blanco	\N	2026-07-04 05:42:54.236248	f	f	4	\N	\N	3	\N	\N	\N	\N	\N	\N
43	Nuevo Proyecto en Blanco	\N	2026-07-04 21:38:13.197939	t	f	4	\N	\N	3	\N	\N	\N	\N	\N	\N
44	Nuevo Proyecto en Blanco	\N	2026-07-04 21:46:57.312558	t	f	4	\N	\N	3	\N	\N	\N	\N	\N	\N
42	Nuevo Proyecto en Blanco	\N	2026-07-04 05:45:40.54902	t	f	4	\N	\N	3	\N	\N	\N	\N	\N	\N
41	Nuevo Proyecto en Blanco	\N	2026-07-04 05:43:07.443379	t	f	4	\N	\N	3	\N	\N	\N	\N	\N	\N
45	Prueba2	Prueba2	2026-07-04 21:51:28.959946	f	t	1	\N	\N	1	\N	\N	\N	\N	\N	\N
1	1	Proyecto creado automáticamente	2026-06-17 14:13:22.94073	f	t	1	\N	\N	1	w	w\nw\nw\nw	w	w	w\nw\nw\nw	w\nw\nw\nw
5	prueba	\N	2026-06-17 18:33:14.41724	t	t	1	\N	\N	1	\N	\N	\N	\N	\N	\N
6	prueba	\N	2026-06-17 18:33:15.993766	t	t	1	\N	\N	1	\N	\N	\N	\N	\N	\N
7	prueba	\N	2026-06-17 18:33:17.257931	t	t	1	\N	\N	1	\N	\N	\N	\N	\N	\N
8	prueba	\N	2026-06-17 18:33:18.773382	t	t	1	\N	\N	1	\N	\N	\N	\N	\N	\N
9	prueba	\N	2026-06-17 18:33:20.133871	t	t	1	\N	\N	1	\N	\N	\N	\N	\N	\N
10	prueba	\N	2026-06-17 18:33:21.508872	t	t	1	\N	\N	1	\N	\N	\N	\N	\N	\N
11	prueba	\N	2026-06-17 18:33:22.511745	t	t	1	\N	\N	1	\N	\N	\N	\N	\N	\N
12	prueba	\N	2026-06-17 18:33:23.490739	t	t	1	\N	\N	1	\N	\N	\N	\N	\N	\N
13	prueba	\N	2026-06-17 18:33:24.556067	t	t	1	\N	\N	1	\N	\N	\N	\N	\N	\N
14	prueba	\N	2026-06-17 18:33:25.737998	t	t	1	\N	\N	1	\N	\N	\N	\N	\N	\N
15	prueba	\N	2026-06-17 18:33:27.244295	t	t	1	\N	\N	1	\N	\N	\N	\N	\N	\N
16	pruebas	\N	2026-06-17 18:33:29.708635	t	t	1	\N	\N	1	\N	\N	\N	\N	\N	\N
17	pruebas	\N	2026-06-17 18:33:30.509544	t	t	1	\N	\N	1	\N	\N	\N	\N	\N	\N
18	sssss	\N	2026-06-17 18:59:27.524397	t	t	1	\N	\N	1	\N	\N	\N	\N	\N	\N
19	f	\N	2026-06-17 20:17:52.416543	t	t	1	\N	\N	1	\N	\N	\N	\N	\N	\N
20	2	\N	2026-06-18 12:59:31.135824	t	t	1	\N	\N	1	\N	\N	\N	\N	\N	\N
21	Prueba2	ddd	2026-06-18 17:18:58.314902	f	f	1	\N	\N	1	\N	\N	\N	\N	\N	\N
4	prueba		2026-06-17 18:33:13.185146	f	t	1	\N	1	1	\N	\N	\N	\N	\N	\N
\.


--
-- Data for Name: roles; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.roles (id, name, description) FROM stdin;
1	Administrador	Acceso total al sistema
33	Super Administrador	Rol de Super Administrador
99	Visualizador	Rol de Visualizador
115	Miembro	Acceso a proyectos, sin Helpdesk ni Metricas
116	Project Manager	Gestor de Proyectos con acceso a todo excepto Administracion
2	Agente	Agente de soporte / Helpdesk
\.


--
-- Data for Name: subtasks; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.subtasks (id, task_id, title, is_completed, created_at) FROM stdin;
2	2	starea2	t	2026-06-24 20:58:03.627196
1	2	starea1	t	2026-06-24 20:57:55.98245
4	21	SUB	f	2026-07-04 21:46:57.33377
5	21	PRUE	f	2026-07-04 21:46:57.333773
6	21	DOS	f	2026-07-04 21:46:57.333774
3	2	Starea3	t	2026-06-25 16:43:48.837889
27	2	Verificar correcto funcionamiento de da	t	2026-07-10 20:04:23.932785
28	2	Analizar requerimientos para da	t	2026-07-10 20:11:34.071049
26	2	Planificar diseño y lógica de da	t	2026-07-10 20:04:23.910454
\.


--
-- Data for Name: system_settings; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.system_settings (id, key, value, company_id) FROM stdin;
1	app_name	GanttScrum Pro - JAC	1
3	mfa_enabled	false	1
4	helpdesk_enabled	true	1
5	helpdesk_config	{"portal_publico":false,"rol_cliente":false,"correo_imap":false,"sla_critica":4,"sla_alta":12,"sla_media":48,"sla_baja":72}	1
6	ticket_clients	["Privada"]	1
8	ticket_tags	["Mejora"]	1
7	ticket_categories	["Facturación"]	1
9	ticket_templates	[{"title":"Cierre Exitoso","body":"Estimado cliente,\\n\\nNos complace informarle que su solicitud ha sido procesada y resuelta con éxito.\\n\\nQuedamos a su entera disposición para cualquier futura consulta.\\n\\nAtentamente,\\nEl equipo de soporte."},{"title":"Apertura Exitosa","body":"Apertura Exitosa"}]	1
95	ai_copilot_enabled	true	1
96	gemini_api_key		1
\.


--
-- Data for Name: tags; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.tags (id, project_id, name, color) FROM stdin;
1	1	URGENTE	#ff4a4a
\.


--
-- Data for Name: task_attachments; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.task_attachments (id, task_id, filename, file_path, uploaded_at) FROM stdin;
1	4	gantt.pdf	/opt/ganttscrum/uploads/c576d8fc2c04458bad6ddc8946433b46.pdf	2026-06-19 11:57:13.508042
2	4	gantt (3).pdf	/opt/ganttscrum/uploads/ffb84ec4f24a45b88b4c35321ad39025.pdf	2026-06-19 13:08:40.333834
3	9	gantt (2).pdf	/opt/ganttscrum/uploads/5d5f673225764a06bb3504470c889f8e.pdf	2026-06-19 13:36:49.857814
\.


--
-- Data for Name: task_comments; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.task_comments (id, task_id, user_id, content, created_at) FROM stdin;
1	9	1	Prueba	2026-06-24 19:23:13.630506
2	4	1	Prueba1211111111111111111111111111111111111111111111	2026-06-24 19:23:46.075949
3	2	1	e	2026-06-24 20:22:45.829873
4	2	1	e	2026-06-24 20:22:54.512384
5	2	1	e	2026-06-24 20:22:56.547416
6	2	1	esta es una descripcion del hito	2026-07-14 11:34:56.207492
\.


--
-- Data for Name: task_links; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.task_links (id, source_id, target_id, type, project_id) FROM stdin;
16	6	5	2	4
18	6	4	2	4
19	sub_2	sub_1	0	1
20	sub_1	sub_3	0	1
21	12	13	0	38
22	14	15	0	39
23	16	17	0	40
\.


--
-- Data for Name: task_logs; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.task_logs (id, task_id, user_id, action, "timestamp") FROM stdin;
\.


--
-- Data for Name: task_progress_history; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.task_progress_history (id, task_id, project_id, date, progress) FROM stdin;
1	2	1	2026-06-24 20:57:55.997499	0
2	2	1	2026-06-24 20:58:03.632957	0
3	2	1	2026-06-25 14:30:04.43076	50
4	2	1	2026-06-25 14:30:07.092046	0
5	2	1	2026-06-25 14:30:09.175773	50
6	2	1	2026-06-25 14:30:11.525616	0.5
7	2	1	2026-06-25 14:30:16.000815	0
8	2	1	2026-06-25 16:43:48.846128	0
9	2	1	2026-06-25 17:00:18.471422	33.33333333333333
10	2	1	2026-06-25 17:00:20.99265	0
11	2	1	2026-06-25 17:00:22.420155	33.33333333333333
12	2	1	2026-06-25 17:00:25.299582	0
37	4	4	2026-06-25 18:12:28.729139	0.12
38	4	4	2026-06-25 18:12:50.397904	0.06
39	4	4	2026-06-25 18:14:01.099812	100
40	3	10	2026-06-25 18:14:04.960234	100
41	5	4	2026-06-25 18:14:16.753948	100
42	9	21	2026-06-25 18:14:17.833502	100
43	6	4	2026-06-25 18:14:19.680966	100
44	7	4	2026-06-25 18:14:20.609781	100
45	8	4	2026-06-25 18:14:21.385434	100
46	7	4	2026-06-25 18:14:22.162251	0
47	6	4	2026-06-25 18:14:22.762854	0
48	9	21	2026-06-25 18:14:23.291502	0
49	4	4	2026-06-25 18:14:25.173858	0
50	4	4	2026-06-25 18:18:04.63279	100
51	2	1	2026-06-25 18:18:49.451649	33.33333333333333
52	2	1	2026-06-25 18:18:51.983377	66.66666666666666
53	2	1	2026-06-25 18:18:55.405821	33.33333333333333
54	2	1	2026-06-25 18:18:56.37756	0
55	4	4	2026-06-25 18:54:36.410226	0
56	4	4	2026-06-25 18:54:36.936766	100
57	2	1	2026-06-25 18:54:38.718035	33.33333333333333
58	2	1	2026-06-25 18:54:39.666356	66.66666666666666
59	2	1	2026-06-25 18:54:40.527848	100
60	2	1	2026-06-25 18:54:41.449895	66.66666666666666
61	2	1	2026-06-25 18:54:42.068447	33.33333333333333
62	2	1	2026-06-25 18:54:42.781549	0
63	9	21	2026-06-25 18:54:49.792417	100
64	9	21	2026-06-25 18:54:50.311675	0
65	2	1	2026-06-25 18:59:53.961873	33.33333333333333
66	2	1	2026-06-25 18:59:53.98549	66.66666666666666
67	2	1	2026-06-25 18:59:53.99909	100
68	4	4	2026-06-25 19:10:39.064315	1
69	2	1	2026-06-25 19:10:45.759934	66.66666666666666
70	2	1	2026-06-26 13:32:12.012421	0.67
71	2	1	2026-06-26 13:49:10.697355	0.01
72	2	1	2026-06-26 14:06:22.646163	0
73	2	1	2026-07-08 20:48:21.094976	100
74	2	1	2026-07-09 18:44:26.242103	75
75	2	1	2026-07-09 18:44:26.26248	60
76	2	1	2026-07-09 18:44:26.279676	50
77	2	1	2026-07-09 18:44:26.296866	42.857142857142854
78	2	1	2026-07-09 18:44:43.556088	37.5
79	2	1	2026-07-09 18:44:43.573528	33.33333333333333
80	2	1	2026-07-09 18:44:43.591321	30
81	2	1	2026-07-09 18:44:43.6095	27.27272727272727
82	2	1	2026-07-09 18:44:57.780046	25
83	2	1	2026-07-09 18:44:57.796572	23.076923076923077
84	2	1	2026-07-09 18:44:57.810273	21.428571428571427
85	2	1	2026-07-09 18:44:57.823804	20
86	2	1	2026-07-09 18:50:24.241756	26.666666666666668
87	2	1	2026-07-09 18:50:29.355015	33.33333333333333
88	2	1	2026-07-09 18:50:37.285426	40
89	2	1	2026-07-09 18:56:55.449795	37.5
90	2	1	2026-07-09 18:56:55.47389	35.294117647058826
91	2	1	2026-07-09 18:56:55.492217	33.33333333333333
92	2	1	2026-07-09 19:02:06.019816	31.57894736842105
93	2	1	2026-07-09 19:02:06.255544	30
94	2	1	2026-07-09 19:02:06.456837	28.57142857142857
95	2	1	2026-07-10 20:04:23.895615	75
96	2	1	2026-07-10 20:04:23.920143	60
97	2	1	2026-07-10 20:04:23.941696	50
98	2	1	2026-07-10 20:04:29.231856	66.66666666666666
99	2	1	2026-07-10 20:04:30.581231	83.33333333333334
100	2	1	2026-07-10 20:04:35.841322	66.66666666666666
101	2	1	2026-07-10 20:11:34.155373	57.14285714285714
102	2	1	2026-07-10 20:11:39.65383	71.42857142857143
103	2	1	2026-07-10 20:11:40.640018	57.14285714285714
104	2	1	2026-07-10 20:11:47.692053	71.42857142857143
105	2	1	2026-07-10 20:11:48.415313	57.14285714285714
106	2	1	2026-07-10 20:11:49.840191	71.42857142857143
107	2	1	2026-07-10 20:11:50.668361	57.14285714285714
108	2	1	2026-07-10 20:11:51.671498	71.42857142857143
109	2	1	2026-07-10 20:11:52.546158	85.71428571428571
110	2	1	2026-07-10 20:11:54.985717	100
111	2	1	2026-07-10 20:30:16.942933	100
112	22	1	2026-07-14 12:21:35.521867	0
\.


--
-- Data for Name: task_tags; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.task_tags (task_id, tag_id) FROM stdin;
2	1
\.


--
-- Data for Name: tasks; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.tasks (id, project_id, column_id, assignee_id, title, description, story_points, start_date, due_date, is_blocked, "order", created_at, completed_at, progress, priority, team_id, baseline_start_date, baseline_end_date, estimated_hours, resource_cost) FROM stdin;
3	10	33	\N	sa	e	0	2026-06-18 00:00:00	2026-06-19 00:00:00	f	0	2026-06-18 15:14:11.241045	\N	100	low	\N	\N	\N	0	0
5	4	11	\N	ppp	jj	0	2026-06-21 00:00:00	2026-06-28 00:00:00	f	0	2026-06-18 16:56:17.108227	\N	100	low	\N	\N	\N	0	0
2	1	66	\N	da	Esta es una descripción del hito	0	2026-06-17 00:00:00	2026-06-21 00:00:00	f	0	2026-06-17 19:36:28.492612	2026-07-14 16:05:05.644881	100	high	1	\N	\N	0	0
8	4	9	\N	sds	ss	0	2026-06-18 00:00:00	2026-06-19 00:00:00	f	2	2026-06-18 20:05:35.013888	\N	100	low	\N	\N	\N	0	0
7	4	9	\N	prueba 1	ddd	0	2026-06-18 00:00:00	2026-06-19 00:00:00	f	1	2026-06-18 20:05:22.29847	\N	0	low	\N	\N	\N	0	0
6	4	10	\N	werwe		0	2026-06-18 00:00:00	2026-06-25 00:00:00	f	1	2026-06-18 17:14:32.518692	\N	0	low	\N	\N	\N	0	0
9	21	80	\N	prueba22		0	2026-06-19 00:00:00	2026-06-25 00:00:00	f	0	2026-06-18 20:30:40.425929	\N	0	high	\N	\N	\N	0	0
12	38	137	\N	Kick Off	\N	0	2026-07-06 00:00:00	2026-07-07 00:00:00	f	0	2026-07-04 05:41:28.209454	\N	0	low	\N	\N	\N	0	0
13	38	137	\N	Toma de Requerimientos	\N	0	2026-07-07 00:00:00	2026-07-08 00:00:00	f	1	2026-07-04 05:41:28.211331	\N	0	low	\N	\N	\N	0	0
14	39	138	\N	Kick Off	\N	0	2026-07-06 00:00:00	2026-07-07 00:00:00	f	0	2026-07-04 05:41:58.960738	\N	0	low	\N	\N	\N	0	0
15	39	138	\N	Toma de Requerimientos	\N	0	2026-07-07 00:00:00	2026-07-08 00:00:00	f	1	2026-07-04 05:41:58.961546	\N	0	low	\N	\N	\N	0	0
16	40	139	\N	Kick Off	\N	0	2026-07-06 00:00:00	2026-07-07 00:00:00	f	0	2026-07-04 05:42:54.239749	\N	0	low	\N	\N	\N	0	0
17	40	139	\N	Toma de Requerimientos	\N	0	2026-07-07 00:00:00	2026-07-08 00:00:00	f	1	2026-07-04 05:42:54.240766	\N	0	low	\N	\N	\N	0	0
18	41	140	\N	Kick Off	\N	0	2026-07-06 00:00:00	2026-07-07 00:00:00	f	0	2026-07-04 05:43:07.446046	\N	0	low	\N	\N	\N	0	0
19	42	141	\N	Kick Off	\N	0	2026-07-06 00:00:00	2026-07-07 00:00:00	f	0	2026-07-04 05:45:40.556889	\N	0	low	\N	\N	\N	0	0
20	43	142	\N	Nueva Taread	\N	0	2026-07-07 00:00:00	2026-07-08 00:00:00	f	0	2026-07-04 21:38:13.206916	\N	0	low	\N	\N	\N	0	0
21	44	143	\N	Nueva Tarea1	\N	0	2026-07-07 00:00:00	2026-07-08 00:00:00	f	0	2026-07-04 21:46:57.327004	\N	0	low	\N	\N	\N	0	0
4	4	9	1	ppp	ppp	0	2026-06-17 00:00:00	2026-06-26 00:00:00	f	0	2026-06-18 15:21:32.365569	\N	100	medium	\N	\N	\N	0	0
22	1	66	\N	da2	Este es un segundo HITO	0	\N	\N	f	1	2026-07-14 12:21:35.499528	2026-07-14 16:05:05.63453	0	high	\N	\N	\N	0	0
\.


--
-- Data for Name: team_members; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.team_members (team_id, user_id) FROM stdin;
1	2
1	1
\.


--
-- Data for Name: teams; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.teams (id, name, description, created_at, company_id) FROM stdin;
1	Desarrollo		2026-06-26 13:14:06.809897	1
\.


--
-- Data for Name: ticket_attachments; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.ticket_attachments (id, ticket_id, comment_id, filename, file_path, uploaded_at) FROM stdin;
1	5	2	gantt (8).pdf	/opt/ganttscrum/uploads/e52566b613b54484a567b15426f4a455.pdf	2026-07-02 19:23:38.558843
\.


--
-- Data for Name: ticket_automations; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.ticket_automations (id, name, conditions_json, actions_json, is_active, created_at, company_id) FROM stdin;
\.


--
-- Data for Name: ticket_comments; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.ticket_comments (id, ticket_id, user_id, content, is_internal, created_at) FROM stdin;
1	3	1	wdd	f	2026-06-26 18:18:01.127837
2	5	1	rtrt	f	2026-07-02 19:23:38.129453
3	5	1	uiui	f	2026-07-02 19:23:43.894045
\.


--
-- Data for Name: ticket_ratings; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.ticket_ratings (id, ticket_id, user_id, rating, comment, created_at) FROM stdin;
\.


--
-- Data for Name: tickets; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.tickets (id, title, description, status, priority, category, created_by_id, email_reporter, assignee_id, team_id, linked_task_id, linked_project_id, sla_deadline, created_at, updated_at, company, tags, company_id) FROM stdin;
1	prueba 1 ticket	Prueba descripcion ticket 1	Abierto	Media	Soporte Técnico	1	admin@ganttscrum.local	\N	\N	\N	\N	2026-06-28 16:38:14.08079	2026-06-26 16:38:14.085338	2026-07-03 18:18:10.96195	\N	\N	1
2	prueba 1 ticket	Prueba descripcion ticket 1	Abierto	Media	Soporte Técnico	1	admin@ganttscrum.local	\N	\N	\N	\N	2026-06-28 16:43:42.294354	2026-06-26 16:43:42.296444	2026-07-03 18:18:10.96195	\N	\N	1
4	prueba 1 ticket	Pru	Cerrado	Media	Soporte Técnico	1	admin@ganttscrum.local	\N	\N	\N	\N	2026-07-04 12:33:12.800814	2026-07-02 12:33:12.806974	2026-07-03 18:18:10.96195	\N	\N	1
5	prueba 1 ticket	prueba 1 ticket	En Progreso	Alta	Soporte Técnico	1	admin@ganttscrum.local	\N	\N	\N	\N	2026-07-04 12:36:17.305561	2026-07-02 12:36:17.309013	2026-07-03 18:18:10.96195	\N	\N	1
3	prueba 2 ticket	prueba 2 ticket Des	En Progreso	Baja	Soporte Técnico	1	admin@ganttscrum.local	2	\N	\N	\N	2026-06-28 16:44:20.399562	2026-06-26 16:44:20.401676	2026-07-03 18:18:10.96195	\N	\N	1
6	prueba 5 ticket	prueba 5 ticket	Abierto	Media	FActuracion	1	admin@ganttscrum.local	\N	\N	\N	\N	2026-07-04 20:36:40.296406	2026-07-02 20:36:40.300849	2026-07-03 18:18:10.96195	\N	\N	1
7	prueba 5 ticket	prueba 5 ticket	Abierto	Baja	FActuracion	1	admin@ganttscrum.local	\N	\N	\N	\N	2026-07-05 20:44:23.266318	2026-07-02 20:44:23.266722	2026-07-03 18:18:10.96195	\N	\N	1
\.


--
-- Data for Name: user_roles; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.user_roles (user_id, role_id) FROM stdin;
1	1
2	1
2	33
4	1
5	99
\.


--
-- Data for Name: users; Type: TABLE DATA; Schema: public; Owner: -
--

COPY public.users (id, username, email, hashed_password, is_active, created_at, last_active, mfa_code, mfa_code_expires, company_id) FROM stdin;
3	prueba	prueba@gmail.com	$argon2id$v=19$m=65536,t=3,p=4$NoZQinEOgZDy/v9/z1mLMQ$eT8VMdL0VaqnwqqQid6xuhW65SyCb4+xi0TZ34iiTmI	t	2026-06-19 11:28:35.17664	2026-06-25 20:00:35.830191	\N	\N	1
1	admin	admin@ganttscrum.local	$argon2id$v=19$m=65536,t=3,p=4$hLD2fm8NAUBo7d0759ybcw$pB/D3yJFboeECKkU6SGPKBDYUyWhP+0GU9JTADV8uD8	t	2026-06-17 15:19:14.58673	2026-07-14 16:09:01.797112	\N	\N	1
4	prueba2	prueba2@prueba2.cl	$argon2id$v=19$m=65536,t=3,p=4$8D5HCEHo/b937n0vJeRciw$Z0M80Id40eJ8aZYxeevelAYu7AyxbLRzqbhdVCxSnrM	t	2026-07-03 20:23:59.708736	2026-07-05 04:22:19.302737	\N	\N	3
2	jampuero	juan.ampuero.c@gmail.com	$argon2id$v=19$m=65536,t=3,p=4$utca43zP+V8rJQSAsBaidA$WCwCQhWG5Zf3t1kRf+K1vUdqDcwR5+yxuwWc690UPgI	t	2026-06-19 11:22:30.306524	2026-07-05 06:49:49.242801	\N	\N	1
5	visualizador	visualizador@local.cl	$argon2id$v=19$m=65536,t=3,p=4$r1XKmVNqDaFUqvW+1xpjLA$LRA8EvmaUZohBGXVtfSpdx7Pkb7DnxzU2Cko1f5KhFA	t	2026-07-08 20:39:21.528729	2026-07-08 20:54:26.337925	\N	\N	1
\.


--
-- Name: audit_logs_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.audit_logs_id_seq', 272, true);


--
-- Name: companies_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.companies_id_seq', 3, true);


--
-- Name: holidays_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.holidays_id_seq', 1, false);


--
-- Name: kanban_columns_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.kanban_columns_id_seq', 147, true);


--
-- Name: kb_articles_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.kb_articles_id_seq', 1, false);


--
-- Name: notifications_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.notifications_id_seq', 1, false);


--
-- Name: project_comments_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.project_comments_id_seq', 2, true);


--
-- Name: project_report_versions_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.project_report_versions_id_seq', 3, true);


--
-- Name: project_roadmap_versions_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.project_roadmap_versions_id_seq', 1, true);


--
-- Name: projects_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.projects_id_seq', 45, true);


--
-- Name: roles_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.roles_id_seq', 116, true);


--
-- Name: subtasks_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.subtasks_id_seq', 28, true);


--
-- Name: system_settings_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.system_settings_id_seq', 107, true);


--
-- Name: tags_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.tags_id_seq', 1, true);


--
-- Name: task_attachments_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.task_attachments_id_seq', 3, true);


--
-- Name: task_comments_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.task_comments_id_seq', 6, true);


--
-- Name: task_links_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.task_links_id_seq', 23, true);


--
-- Name: task_logs_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.task_logs_id_seq', 1, false);


--
-- Name: task_progress_history_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.task_progress_history_id_seq', 112, true);


--
-- Name: tasks_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.tasks_id_seq', 22, true);


--
-- Name: teams_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.teams_id_seq', 1, true);


--
-- Name: ticket_attachments_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.ticket_attachments_id_seq', 1, true);


--
-- Name: ticket_automations_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.ticket_automations_id_seq', 1, false);


--
-- Name: ticket_comments_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.ticket_comments_id_seq', 3, true);


--
-- Name: ticket_ratings_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.ticket_ratings_id_seq', 1, false);


--
-- Name: tickets_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.tickets_id_seq', 7, true);


--
-- Name: users_id_seq; Type: SEQUENCE SET; Schema: public; Owner: -
--

SELECT pg_catalog.setval('public.users_id_seq', 5, true);


--
-- Name: audit_logs audit_logs_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.audit_logs
    ADD CONSTRAINT audit_logs_pkey PRIMARY KEY (id);


--
-- Name: companies companies_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.companies
    ADD CONSTRAINT companies_pkey PRIMARY KEY (id);


--
-- Name: holidays holidays_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.holidays
    ADD CONSTRAINT holidays_pkey PRIMARY KEY (id);


--
-- Name: kanban_columns kanban_columns_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.kanban_columns
    ADD CONSTRAINT kanban_columns_pkey PRIMARY KEY (id);


--
-- Name: kb_articles kb_articles_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.kb_articles
    ADD CONSTRAINT kb_articles_pkey PRIMARY KEY (id);


--
-- Name: notifications notifications_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.notifications
    ADD CONSTRAINT notifications_pkey PRIMARY KEY (id);


--
-- Name: project_comments project_comments_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.project_comments
    ADD CONSTRAINT project_comments_pkey PRIMARY KEY (id);


--
-- Name: project_members project_members_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.project_members
    ADD CONSTRAINT project_members_pkey PRIMARY KEY (user_id, project_id);


--
-- Name: project_report_versions project_report_versions_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.project_report_versions
    ADD CONSTRAINT project_report_versions_pkey PRIMARY KEY (id);


--
-- Name: project_roadmap_versions project_roadmap_versions_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.project_roadmap_versions
    ADD CONSTRAINT project_roadmap_versions_pkey PRIMARY KEY (id);


--
-- Name: project_viewers project_viewers_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.project_viewers
    ADD CONSTRAINT project_viewers_pkey PRIMARY KEY (user_id, project_id);


--
-- Name: projects projects_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.projects
    ADD CONSTRAINT projects_pkey PRIMARY KEY (id);


--
-- Name: roles roles_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.roles
    ADD CONSTRAINT roles_pkey PRIMARY KEY (id);


--
-- Name: subtasks subtasks_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.subtasks
    ADD CONSTRAINT subtasks_pkey PRIMARY KEY (id);


--
-- Name: system_settings system_settings_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.system_settings
    ADD CONSTRAINT system_settings_pkey PRIMARY KEY (id);


--
-- Name: tags tags_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.tags
    ADD CONSTRAINT tags_pkey PRIMARY KEY (id);


--
-- Name: task_attachments task_attachments_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.task_attachments
    ADD CONSTRAINT task_attachments_pkey PRIMARY KEY (id);


--
-- Name: task_comments task_comments_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.task_comments
    ADD CONSTRAINT task_comments_pkey PRIMARY KEY (id);


--
-- Name: task_links task_links_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.task_links
    ADD CONSTRAINT task_links_pkey PRIMARY KEY (id);


--
-- Name: task_logs task_logs_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.task_logs
    ADD CONSTRAINT task_logs_pkey PRIMARY KEY (id);


--
-- Name: task_progress_history task_progress_history_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.task_progress_history
    ADD CONSTRAINT task_progress_history_pkey PRIMARY KEY (id);


--
-- Name: task_tags task_tags_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.task_tags
    ADD CONSTRAINT task_tags_pkey PRIMARY KEY (task_id, tag_id);


--
-- Name: tasks tasks_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.tasks
    ADD CONSTRAINT tasks_pkey PRIMARY KEY (id);


--
-- Name: team_members team_members_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.team_members
    ADD CONSTRAINT team_members_pkey PRIMARY KEY (team_id, user_id);


--
-- Name: teams teams_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.teams
    ADD CONSTRAINT teams_pkey PRIMARY KEY (id);


--
-- Name: ticket_attachments ticket_attachments_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.ticket_attachments
    ADD CONSTRAINT ticket_attachments_pkey PRIMARY KEY (id);


--
-- Name: ticket_automations ticket_automations_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.ticket_automations
    ADD CONSTRAINT ticket_automations_pkey PRIMARY KEY (id);


--
-- Name: ticket_comments ticket_comments_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.ticket_comments
    ADD CONSTRAINT ticket_comments_pkey PRIMARY KEY (id);


--
-- Name: ticket_ratings ticket_ratings_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.ticket_ratings
    ADD CONSTRAINT ticket_ratings_pkey PRIMARY KEY (id);


--
-- Name: ticket_ratings ticket_ratings_ticket_id_key; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.ticket_ratings
    ADD CONSTRAINT ticket_ratings_ticket_id_key UNIQUE (ticket_id);


--
-- Name: tickets tickets_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.tickets
    ADD CONSTRAINT tickets_pkey PRIMARY KEY (id);


--
-- Name: user_roles user_roles_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.user_roles
    ADD CONSTRAINT user_roles_pkey PRIMARY KEY (user_id, role_id);


--
-- Name: users users_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.users
    ADD CONSTRAINT users_pkey PRIMARY KEY (id);


--
-- Name: ix_audit_logs_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX ix_audit_logs_id ON public.audit_logs USING btree (id);


--
-- Name: ix_companies_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX ix_companies_id ON public.companies USING btree (id);


--
-- Name: ix_companies_name; Type: INDEX; Schema: public; Owner: -
--

CREATE UNIQUE INDEX ix_companies_name ON public.companies USING btree (name);


--
-- Name: ix_holidays_date; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX ix_holidays_date ON public.holidays USING btree (date);


--
-- Name: ix_holidays_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX ix_holidays_id ON public.holidays USING btree (id);


--
-- Name: ix_kanban_columns_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX ix_kanban_columns_id ON public.kanban_columns USING btree (id);


--
-- Name: ix_notifications_user_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX ix_notifications_user_id ON public.notifications USING btree (user_id);


--
-- Name: ix_project_comments_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX ix_project_comments_id ON public.project_comments USING btree (id);


--
-- Name: ix_projects_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX ix_projects_id ON public.projects USING btree (id);


--
-- Name: ix_projects_name; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX ix_projects_name ON public.projects USING btree (name);


--
-- Name: ix_roles_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX ix_roles_id ON public.roles USING btree (id);


--
-- Name: ix_roles_name; Type: INDEX; Schema: public; Owner: -
--

CREATE UNIQUE INDEX ix_roles_name ON public.roles USING btree (name);


--
-- Name: ix_subtasks_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX ix_subtasks_id ON public.subtasks USING btree (id);


--
-- Name: ix_system_settings_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX ix_system_settings_id ON public.system_settings USING btree (id);


--
-- Name: ix_system_settings_key_company_idx; Type: INDEX; Schema: public; Owner: -
--

CREATE UNIQUE INDEX ix_system_settings_key_company_idx ON public.system_settings USING btree (key, company_id);


--
-- Name: ix_tags_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX ix_tags_id ON public.tags USING btree (id);


--
-- Name: ix_task_comments_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX ix_task_comments_id ON public.task_comments USING btree (id);


--
-- Name: ix_task_links_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX ix_task_links_id ON public.task_links USING btree (id);


--
-- Name: ix_task_logs_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX ix_task_logs_id ON public.task_logs USING btree (id);


--
-- Name: ix_task_progress_history_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX ix_task_progress_history_id ON public.task_progress_history USING btree (id);


--
-- Name: ix_tasks_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX ix_tasks_id ON public.tasks USING btree (id);


--
-- Name: ix_teams_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX ix_teams_id ON public.teams USING btree (id);


--
-- Name: ix_teams_name; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX ix_teams_name ON public.teams USING btree (name);


--
-- Name: ix_tickets_priority; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX ix_tickets_priority ON public.tickets USING btree (priority);


--
-- Name: ix_tickets_status; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX ix_tickets_status ON public.tickets USING btree (status);


--
-- Name: ix_tickets_title; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX ix_tickets_title ON public.tickets USING btree (title);


--
-- Name: ix_users_email; Type: INDEX; Schema: public; Owner: -
--

CREATE UNIQUE INDEX ix_users_email ON public.users USING btree (email);


--
-- Name: ix_users_id; Type: INDEX; Schema: public; Owner: -
--

CREATE INDEX ix_users_id ON public.users USING btree (id);


--
-- Name: ix_users_username; Type: INDEX; Schema: public; Owner: -
--

CREATE UNIQUE INDEX ix_users_username ON public.users USING btree (username);


--
-- Name: audit_logs audit_logs_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.audit_logs
    ADD CONSTRAINT audit_logs_user_id_fkey FOREIGN KEY (user_id) REFERENCES public.users(id) ON DELETE CASCADE;


--
-- Name: holidays holidays_company_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.holidays
    ADD CONSTRAINT holidays_company_id_fkey FOREIGN KEY (company_id) REFERENCES public.companies(id) ON DELETE CASCADE;


--
-- Name: kanban_columns kanban_columns_project_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.kanban_columns
    ADD CONSTRAINT kanban_columns_project_id_fkey FOREIGN KEY (project_id) REFERENCES public.projects(id);


--
-- Name: kb_articles kb_articles_author_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.kb_articles
    ADD CONSTRAINT kb_articles_author_id_fkey FOREIGN KEY (author_id) REFERENCES public.users(id) ON DELETE SET NULL;


--
-- Name: kb_articles kb_articles_company_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.kb_articles
    ADD CONSTRAINT kb_articles_company_id_fkey FOREIGN KEY (company_id) REFERENCES public.companies(id) ON DELETE CASCADE;


--
-- Name: notifications notifications_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.notifications
    ADD CONSTRAINT notifications_user_id_fkey FOREIGN KEY (user_id) REFERENCES public.users(id) ON DELETE CASCADE;


--
-- Name: project_comments project_comments_project_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.project_comments
    ADD CONSTRAINT project_comments_project_id_fkey FOREIGN KEY (project_id) REFERENCES public.projects(id) ON DELETE CASCADE;


--
-- Name: project_comments project_comments_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.project_comments
    ADD CONSTRAINT project_comments_user_id_fkey FOREIGN KEY (user_id) REFERENCES public.users(id) ON DELETE SET NULL;


--
-- Name: project_members project_members_project_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.project_members
    ADD CONSTRAINT project_members_project_id_fkey FOREIGN KEY (project_id) REFERENCES public.projects(id) ON DELETE CASCADE;


--
-- Name: project_members project_members_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.project_members
    ADD CONSTRAINT project_members_user_id_fkey FOREIGN KEY (user_id) REFERENCES public.users(id) ON DELETE CASCADE;


--
-- Name: project_report_versions project_report_versions_project_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.project_report_versions
    ADD CONSTRAINT project_report_versions_project_id_fkey FOREIGN KEY (project_id) REFERENCES public.projects(id) ON DELETE CASCADE;


--
-- Name: project_roadmap_versions project_roadmap_versions_project_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.project_roadmap_versions
    ADD CONSTRAINT project_roadmap_versions_project_id_fkey FOREIGN KEY (project_id) REFERENCES public.projects(id) ON DELETE CASCADE;


--
-- Name: project_viewers project_viewers_project_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.project_viewers
    ADD CONSTRAINT project_viewers_project_id_fkey FOREIGN KEY (project_id) REFERENCES public.projects(id) ON DELETE CASCADE;


--
-- Name: project_viewers project_viewers_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.project_viewers
    ADD CONSTRAINT project_viewers_user_id_fkey FOREIGN KEY (user_id) REFERENCES public.users(id) ON DELETE CASCADE;


--
-- Name: projects projects_assignee_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.projects
    ADD CONSTRAINT projects_assignee_id_fkey FOREIGN KEY (assignee_id) REFERENCES public.users(id);


--
-- Name: projects projects_company_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.projects
    ADD CONSTRAINT projects_company_id_fkey FOREIGN KEY (company_id) REFERENCES public.companies(id) ON DELETE CASCADE;


--
-- Name: projects projects_creator_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.projects
    ADD CONSTRAINT projects_creator_id_fkey FOREIGN KEY (creator_id) REFERENCES public.users(id);


--
-- Name: projects projects_team_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.projects
    ADD CONSTRAINT projects_team_id_fkey FOREIGN KEY (team_id) REFERENCES public.teams(id);


--
-- Name: subtasks subtasks_task_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.subtasks
    ADD CONSTRAINT subtasks_task_id_fkey FOREIGN KEY (task_id) REFERENCES public.tasks(id) ON DELETE CASCADE;


--
-- Name: system_settings system_settings_company_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.system_settings
    ADD CONSTRAINT system_settings_company_id_fkey FOREIGN KEY (company_id) REFERENCES public.companies(id) ON DELETE CASCADE;


--
-- Name: tags tags_project_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.tags
    ADD CONSTRAINT tags_project_id_fkey FOREIGN KEY (project_id) REFERENCES public.projects(id) ON DELETE CASCADE;


--
-- Name: task_attachments task_attachments_task_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.task_attachments
    ADD CONSTRAINT task_attachments_task_id_fkey FOREIGN KEY (task_id) REFERENCES public.tasks(id) ON DELETE CASCADE;


--
-- Name: task_comments task_comments_task_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.task_comments
    ADD CONSTRAINT task_comments_task_id_fkey FOREIGN KEY (task_id) REFERENCES public.tasks(id) ON DELETE CASCADE;


--
-- Name: task_comments task_comments_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.task_comments
    ADD CONSTRAINT task_comments_user_id_fkey FOREIGN KEY (user_id) REFERENCES public.users(id) ON DELETE SET NULL;


--
-- Name: task_links task_links_project_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.task_links
    ADD CONSTRAINT task_links_project_id_fkey FOREIGN KEY (project_id) REFERENCES public.projects(id) ON DELETE CASCADE;


--
-- Name: task_logs task_logs_task_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.task_logs
    ADD CONSTRAINT task_logs_task_id_fkey FOREIGN KEY (task_id) REFERENCES public.tasks(id) ON DELETE CASCADE;


--
-- Name: task_logs task_logs_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.task_logs
    ADD CONSTRAINT task_logs_user_id_fkey FOREIGN KEY (user_id) REFERENCES public.users(id);


--
-- Name: task_progress_history task_progress_history_project_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.task_progress_history
    ADD CONSTRAINT task_progress_history_project_id_fkey FOREIGN KEY (project_id) REFERENCES public.projects(id) ON DELETE CASCADE;


--
-- Name: task_progress_history task_progress_history_task_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.task_progress_history
    ADD CONSTRAINT task_progress_history_task_id_fkey FOREIGN KEY (task_id) REFERENCES public.tasks(id) ON DELETE CASCADE;


--
-- Name: task_tags task_tags_tag_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.task_tags
    ADD CONSTRAINT task_tags_tag_id_fkey FOREIGN KEY (tag_id) REFERENCES public.tags(id) ON DELETE CASCADE;


--
-- Name: task_tags task_tags_task_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.task_tags
    ADD CONSTRAINT task_tags_task_id_fkey FOREIGN KEY (task_id) REFERENCES public.tasks(id) ON DELETE CASCADE;


--
-- Name: tasks tasks_assignee_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.tasks
    ADD CONSTRAINT tasks_assignee_id_fkey FOREIGN KEY (assignee_id) REFERENCES public.users(id);


--
-- Name: tasks tasks_column_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.tasks
    ADD CONSTRAINT tasks_column_id_fkey FOREIGN KEY (column_id) REFERENCES public.kanban_columns(id);


--
-- Name: tasks tasks_project_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.tasks
    ADD CONSTRAINT tasks_project_id_fkey FOREIGN KEY (project_id) REFERENCES public.projects(id);


--
-- Name: tasks tasks_team_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.tasks
    ADD CONSTRAINT tasks_team_id_fkey FOREIGN KEY (team_id) REFERENCES public.teams(id) ON DELETE SET NULL;


--
-- Name: team_members team_members_team_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.team_members
    ADD CONSTRAINT team_members_team_id_fkey FOREIGN KEY (team_id) REFERENCES public.teams(id) ON DELETE CASCADE;


--
-- Name: team_members team_members_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.team_members
    ADD CONSTRAINT team_members_user_id_fkey FOREIGN KEY (user_id) REFERENCES public.users(id) ON DELETE CASCADE;


--
-- Name: teams teams_company_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.teams
    ADD CONSTRAINT teams_company_id_fkey FOREIGN KEY (company_id) REFERENCES public.companies(id) ON DELETE CASCADE;


--
-- Name: ticket_attachments ticket_attachments_comment_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.ticket_attachments
    ADD CONSTRAINT ticket_attachments_comment_id_fkey FOREIGN KEY (comment_id) REFERENCES public.ticket_comments(id) ON DELETE CASCADE;


--
-- Name: ticket_attachments ticket_attachments_ticket_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.ticket_attachments
    ADD CONSTRAINT ticket_attachments_ticket_id_fkey FOREIGN KEY (ticket_id) REFERENCES public.tickets(id) ON DELETE CASCADE;


--
-- Name: ticket_automations ticket_automations_company_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.ticket_automations
    ADD CONSTRAINT ticket_automations_company_id_fkey FOREIGN KEY (company_id) REFERENCES public.companies(id) ON DELETE CASCADE;


--
-- Name: ticket_comments ticket_comments_ticket_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.ticket_comments
    ADD CONSTRAINT ticket_comments_ticket_id_fkey FOREIGN KEY (ticket_id) REFERENCES public.tickets(id) ON DELETE CASCADE;


--
-- Name: ticket_comments ticket_comments_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.ticket_comments
    ADD CONSTRAINT ticket_comments_user_id_fkey FOREIGN KEY (user_id) REFERENCES public.users(id) ON DELETE SET NULL;


--
-- Name: ticket_ratings ticket_ratings_ticket_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.ticket_ratings
    ADD CONSTRAINT ticket_ratings_ticket_id_fkey FOREIGN KEY (ticket_id) REFERENCES public.tickets(id) ON DELETE CASCADE;


--
-- Name: ticket_ratings ticket_ratings_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.ticket_ratings
    ADD CONSTRAINT ticket_ratings_user_id_fkey FOREIGN KEY (user_id) REFERENCES public.users(id) ON DELETE SET NULL;


--
-- Name: tickets tickets_assignee_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.tickets
    ADD CONSTRAINT tickets_assignee_id_fkey FOREIGN KEY (assignee_id) REFERENCES public.users(id) ON DELETE SET NULL;


--
-- Name: tickets tickets_company_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.tickets
    ADD CONSTRAINT tickets_company_id_fkey FOREIGN KEY (company_id) REFERENCES public.companies(id) ON DELETE CASCADE;


--
-- Name: tickets tickets_created_by_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.tickets
    ADD CONSTRAINT tickets_created_by_id_fkey FOREIGN KEY (created_by_id) REFERENCES public.users(id) ON DELETE SET NULL;


--
-- Name: tickets tickets_linked_project_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.tickets
    ADD CONSTRAINT tickets_linked_project_id_fkey FOREIGN KEY (linked_project_id) REFERENCES public.projects(id) ON DELETE SET NULL;


--
-- Name: tickets tickets_linked_task_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.tickets
    ADD CONSTRAINT tickets_linked_task_id_fkey FOREIGN KEY (linked_task_id) REFERENCES public.tasks(id) ON DELETE SET NULL;


--
-- Name: tickets tickets_team_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.tickets
    ADD CONSTRAINT tickets_team_id_fkey FOREIGN KEY (team_id) REFERENCES public.teams(id) ON DELETE SET NULL;


--
-- Name: user_roles user_roles_role_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.user_roles
    ADD CONSTRAINT user_roles_role_id_fkey FOREIGN KEY (role_id) REFERENCES public.roles(id) ON DELETE CASCADE;


--
-- Name: user_roles user_roles_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.user_roles
    ADD CONSTRAINT user_roles_user_id_fkey FOREIGN KEY (user_id) REFERENCES public.users(id) ON DELETE CASCADE;


--
-- Name: users users_company_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY public.users
    ADD CONSTRAINT users_company_id_fkey FOREIGN KEY (company_id) REFERENCES public.companies(id) ON DELETE SET NULL;


--
-- PostgreSQL database dump complete
--

\unrestrict qHRWo8cyw1bDx3e3Oui3lv9Tyh5YDm8rfMjXFkIL3SrJTaLGiDB1CShZexcwh48

