-- Table: public.dashboard_vnd_vendas DROP TABLE IF EXISTS public.dashboard_vnd_vendas; CREATE TABLE IF NOT EXISTS public.dashboard_vnd_vendas( id serial NOT NULL, filial integer NOT NULL, data date NOT NULL, ano integer NOT NULL, mes integer NOT NULL, dia integer NOT NULL, pedido integer NOT NULL, cliente integer NOT NULL, vendedor integer NOT NULL, fornecedor integer NOT NULL, grupo integer NOT NULL, produto integer NOT NULL, valor_tabela numeric(18,6) NOT NULL, valor_custo_reposicao numeric(18,6) NOT NULL, valor_devolucao numeric(18,6) NOT NULL, valor_desconto numeric(18,6) NOT NULL, valor_liquido numeric(18,6) NOT NULL, valor_rentabilidade numeric(18,6) NOT NULL, porcentagem_rentabilidade numeric(18,6) NOT NULL, quantidade_peso numeric(18,6) NOT NULL, CONSTRAINT dashboard_vnd_vendas_pkey PRIMARY KEY (id), CONSTRAINT uk_dashboard_vnd_vendas UNIQUE (filial, data, ano, mes, dia, pedido, cliente, vendedor, fornecedor, grupo, produto) ) TABLESPACE pg_default; ALTER TABLE IF EXISTS public.dashboard_vnd_vendas OWNER to postgres;