They are mostly the same as invoices, but the contact and payment method are optional, thus, like other optionals fields, i created relations to link these that have payment method or contact, to avoid NULL columns in quote. Still missing functions to add and edit quotations, and views to compute their tax and total amount.
20 lines
452 B
PL/PgSQL
20 lines
452 B
PL/PgSQL
-- Deploy numerus:quote_contact to pg
|
|
-- requires: roles
|
|
-- requires: schema_numerus
|
|
-- requires: quote
|
|
-- requires: contact
|
|
|
|
begin;
|
|
|
|
set search_path to numerus, public;
|
|
|
|
create table quote_contact (
|
|
quote_id integer primary key references quote,
|
|
contact_id integer not null references contact
|
|
);
|
|
|
|
grant select, insert, update, delete on table quote_contact to invoicer;
|
|
grant select, insert, update, delete on table quote_contact to admin;
|
|
|
|
commit;
|