CREATE TABLE IF NOT EXISTS public.note_comments
(
    id SERIAL,
    note_id bigint NOT NULL,
    user_id bigint NOT NULL,
    comment character varying(255) COLLATE pg_catalog."default",
    created_at timestamp without time zone,
    updated_at timestamp without time zone,
    CONSTRAINT note_comments_pkey PRIMARY KEY (id),
    CONSTRAINT note_comments_note_id_foreign FOREIGN KEY (note_id)
        REFERENCES public.notes (id) MATCH SIMPLE
        ON UPDATE NO ACTION
        ON DELETE CASCADE,
    CONSTRAINT note_comments_user_id_foreign FOREIGN KEY (user_id)
        REFERENCES public.users (id) MATCH SIMPLE
        ON UPDATE NO ACTION
        ON DELETE NO ACTION
);