Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CREATE SEQUENCE temp_product_catalog_seq
- INCREMENT 1
- MINVALUE 1
- MAXVALUE 9223372036854775807
- START 10
- CACHE 1;
- CREATE TABLE m_temp_product_catalog
- (
- temp_product_catalog_id bigint NOT NULL DEFAULT nextval('temp_product_catalog_seq'),
- tenant_id bigint, -- reference ke t_tenant
- product_id bigint, -- reference ke m_product
- catalog_id bigint, -- reference ke m_catalog
- product_catalog_code character varying(100), -- dapat berbeda dengan product_code
- flg_lanjut character varying(1), -- N jika product_catalog_code baru, Y jika menimpa product catalog sebelumnya
- catalog_price numeric,
- old_catalog_price numeric, -- diisi dengan harga di catalog sebelumnya apabila product_catalog_code sudah pernah digunakan
- disc_member_percent numeric,
- disc_promo_percent numeric,
- nett_price numeric,
- create_datetime character varying(14),
- create_user_id bigint,
- update_datetime character varying(14),
- update_user_id bigint,
- "version" bigint NOT NULL,
- active character varying(1),
- active_datetime character varying(14),
- non_active_datetime character varying(14),
- CONSTRAINT m_temp_product_catalog_pkey PRIMARY KEY (temp_product_catalog_id)
- )
- WITH (
- OIDS=FALSE
- );
- CREATE UNIQUE INDEX idx_temp_product_catalog_01
- ON m_temp_product_catalog
- USING btree
- (tenant_id, product_catalog_code);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement