add hs_office_coopsharestransaction table SQL
This commit is contained in:
parent
c862df7846
commit
61473abf68
29
src/main/resources/db/changelog/310-hs-office-coopshares.sql
Normal file
29
src/main/resources/db/changelog/310-hs-office-coopshares.sql
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
--liquibase formatted sql
|
||||||
|
|
||||||
|
-- ============================================================================
|
||||||
|
--changeset hs-office-coopshares-MAIN-TABLE:1 endDelimiter:--//
|
||||||
|
-- ----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
CREATE TYPE HsOfficeCoopSharesTransactionType AS ENUM ('ADJUSTMENT', 'SUBSCRIPTION', 'CANCELLATION');
|
||||||
|
|
||||||
|
CREATE CAST (character varying as HsOfficeCoopSharesTransactionType) WITH INOUT AS IMPLICIT;
|
||||||
|
|
||||||
|
create table if not exists hs_office_coopsharestransaction
|
||||||
|
(
|
||||||
|
uuid uuid unique references RbacObject (uuid) initially deferred,
|
||||||
|
membershipUuid uuid not null references hs_office_membership(uuid),
|
||||||
|
transactionType HsOfficeCoopSharesTransactionType not null,
|
||||||
|
valueDate date not null,
|
||||||
|
shareCount integer,
|
||||||
|
reference varchar(48),
|
||||||
|
comment varchar(512)
|
||||||
|
);
|
||||||
|
--//
|
||||||
|
|
||||||
|
|
||||||
|
-- ============================================================================
|
||||||
|
--changeset hs-office-coopshares-MAIN-TABLE-JOURNAL:1 endDelimiter:--//
|
||||||
|
-- ----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
call create_journal('hs_office_coopsharestransaction');
|
||||||
|
--//
|
@ -97,3 +97,5 @@ databaseChangeLog:
|
|||||||
file: db/changelog/303-hs-office-membership-rbac.sql
|
file: db/changelog/303-hs-office-membership-rbac.sql
|
||||||
- include:
|
- include:
|
||||||
file: db/changelog/308-hs-office-membership-test-data.sql
|
file: db/changelog/308-hs-office-membership-test-data.sql
|
||||||
|
- include:
|
||||||
|
file: db/changelog/310-hs-office-coopshares.sql
|
||||||
|
Loading…
Reference in New Issue
Block a user