Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- drop table if exists product_category cascade;
- drop SEQUENCE product_category_id_seq;
- drop table if exists product cascade;
- drop SEQUENCE product_id_seq;
- CREATE SEQUENCE product_category_id_seq
- START WITH 1
- INCREMENT BY 1
- NO MINVALUE
- NO MAXVALUE
- CACHE 1;
- CREATE SEQUENCE product_id_seq
- START WITH 1
- INCREMENT BY 1
- NO MINVALUE
- NO MAXVALUE
- CACHE 1;
- CREATE TABLE product_category (
- id bigint NOT NULL DEFAULT nextval('product_category_id_seq'::regclass) ,
- parent_id bigint,
- code varchar(50),
- name character varying(255),
- creation_date timestamp without time zone DEFAULT now() NOT NULL
- );
- CREATE TABLE product (
- id bigint NOT NULL DEFAULT nextval('product_id_seq'::regclass) ,
- category_id bigint,
- code varchar(50),
- name character varying(255),
- creation_date timestamp without time zone DEFAULT now() NOT NULL
- );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement