commit | author | age
|
221889
|
1 |
--liquibase formatted sql |
MH |
2 |
|
|
3 |
-- ============================================================================ |
|
4 |
--changeset hs-office-membership-MAIN-TABLE:1 endDelimiter:--// |
|
5 |
-- ---------------------------------------------------------------------------- |
|
6 |
|
23a81a
|
7 |
CREATE TYPE HsOfficeReasonForTermination AS ENUM ('NONE', 'CANCELLATION', 'TRANSFER', 'DEATH', 'LIQUIDATION', 'EXPULSION', 'UNKNOWN'); |
221889
|
8 |
|
MH |
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), |
c862df
|
16 |
memberNumber numeric(5) not null unique, |
221889
|
17 |
validity daterange not null, |
e6f948
|
18 |
reasonForTermination HsOfficeReasonForTermination not null default 'NONE' |
221889
|
19 |
); |
MH |
20 |
--// |
|
21 |
|
|
22 |
|
|
23 |
-- ============================================================================ |
|
24 |
--changeset hs-office-membership-MAIN-TABLE-JOURNAL:1 endDelimiter:--// |
|
25 |
-- ---------------------------------------------------------------------------- |
|
26 |
|
|
27 |
call create_journal('hs_office_membership'); |
|
28 |
--// |