commit | author | age
|
221889
|
1 |
--liquibase formatted sql |
MH |
2 |
|
|
3 |
-- ============================================================================ |
|
4 |
--changeset hs-office-membership-MAIN-TABLE:1 endDelimiter:--// |
|
5 |
-- ---------------------------------------------------------------------------- |
|
6 |
|
|
7 |
CREATE TYPE HsOfficeReasonForTermination AS ENUM ('NONE', 'CANCELLATION', 'TRANSFER', 'DEATH', 'LIQUIDATION', 'EXPULSION'); |
|
8 |
|
|
9 |
CREATE CAST (character varying as HsOfficeReasonForTermination) WITH INOUT AS IMPLICIT; |
|
10 |
|
|
11 |
create table if not exists hs_office_membership |
|
12 |
( |
|
13 |
uuid uuid unique references RbacObject (uuid) initially deferred, |
|
14 |
partnerUuid uuid not null references hs_office_partner(uuid), |
|
15 |
mainDebitorUuid uuid not null references hs_office_debitor(uuid), |
|
16 |
memberNumber numeric(5) not null, |
|
17 |
validity daterange not null, |
|
18 |
reasonForTermination HsOfficeReasonForTermination not null |
|
19 |
); |
|
20 |
--// |
|
21 |
|
|
22 |
|
|
23 |
-- ============================================================================ |
|
24 |
--changeset hs-office-membership-MAIN-TABLE-JOURNAL:1 endDelimiter:--// |
|
25 |
-- ---------------------------------------------------------------------------- |
|
26 |
|
|
27 |
call create_journal('hs_office_membership'); |
|
28 |
--// |