CREATE TABLE iv_costs (
cost_id integer PRIMARY KEY NOT NULL,
cost_nr varchar(400) NOT NULL,
organization_id integer NOT NULL,
cost_object_id integer,
item_units numeric(12, 1),
price_per_unit numeric(12, 3),
currency char(3),
apply_vat_p char(1) DEFAULT 't'::bpchar
CHECK (apply_vat_p = ANY (ARRAY['t'::bpchar, 'f'::bpchar])),
variable_cost_p char(1),
CONSTRAINT iv_costs_var_ck
CHECK (variable_cost_p = ANY (ARRAY['t'::bpchar, 'f'::bpchar])),
CONSTRAINT im_costs_object_fk REFERENCES acs_objects (),
CONSTRAINT iv_costs_currency_fk REFERENCES currencies (),
CONSTRAINT iv_costs_fk REFERENCES cr_revisions (),
CONSTRAINT iv_costs_organization_fk REFERENCES organizations ()
);
CREATE INDEX iv_costs_currency_idx ON iv_costs (currency);
CREATE INDEX iv_costs_object_idx ON iv_costs (cost_object_id);
CREATE INDEX iv_costs_organization_idx ON iv_costs (organization_id);
-- Table size: 0 bytes
-- Table rows: 0
Tables: