hs.hsadmin.ng/src/main/resources/db/changelog/210-hs-office-person.sql

28 lines
990 B
MySQL
Raw Normal View History

2022-09-07 20:24:35 +02:00
--liquibase formatted sql
-- ============================================================================
--changeset hs-office-person-MAIN-TABLE:1 endDelimiter:--//
2022-09-07 20:24:35 +02:00
-- ----------------------------------------------------------------------------
CREATE TYPE HsOfficePersonType AS ENUM ('NATURAL', 'LEGAL', 'SOLE_REPRESENTATION', 'JOINT_REPRESENTATION');
2022-09-07 20:24:35 +02:00
CREATE CAST (character varying as HsOfficePersonType) WITH INOUT AS IMPLICIT;
2022-09-07 20:24:35 +02:00
create table if not exists hs_office_person
2022-09-07 20:24:35 +02:00
(
uuid uuid unique references RbacObject (uuid) initially deferred,
personType HsOfficePersonType not null,
2022-09-07 20:24:35 +02:00
tradeName varchar(96),
givenName varchar(48),
familyName varchar(48)
);
--//
-- ============================================================================
--changeset hs-office-person-MAIN-TABLE-JOURNAL:1 endDelimiter:--//
-- ----------------------------------------------------------------------------
call create_journal('hs_office_person');
--//