ERROR: relation "codepool_codepoolseq_seq" does not exist SQL state: 42P01 Below is my script but I keep getting an error.

-- Table: public.codepool

-- DROP TABLE public.codepool;

CREATE TABLE public.codepool
(
    codepoolseq bigint NOT NULL DEFAULT nextval('codepool_codepoolseq_seq'::regclass),
    codenumber character(50) COLLATE pg_catalog."default",
    CONSTRAINT codepool_pkey PRIMARY KEY (codepoolseq)
)
WITH (
    OIDS = FALSE
)
TABLESPACE pg_default;

ALTER TABLE public.codepool
    OWNER to postgres;


The error I get is:


  ERROR: relation "codepool_codepoolseq_seq" does not exist SQL state: 42P01
In your Scheme you must have Sequences called codepool_codepoolseq_seq

Example create:


-- SEQUENCE: public.codepool_codepoolseq_seq

-- DROP SEQUENCE public.codepool_codepoolseq_seq;

CREATE SEQUENCE public.codepool_codepoolseq_seq
    INCREMENT 1
    START 1
    MINVALUE 1
    MAXVALUE 9223372036854775807
    CACHE 1;

ALTER SEQUENCE public.codepool_codepoolseq_seq
    OWNER TO postgres;