create table ACCOUNTING_POOL (
    [UUID] uniqueidentifier not null,
    [CONFIG_ID] uniqueidentifier,
    [AAE] varchar(36),
    [SAP_PSP_ID] varchar(18),
    [PR_ID] varchar(18),
    [EFFORT_PLAN] float,
    [EFFORT_ACT] float,
    [EFFORT_REM] float,
    [COSTS_PLAN] float,
    [COSTS_ACT] float,
    [COSTS_REM] float,
    [EFFORT_PLAN_PLANTA] float,
    [EFFORT_ACT_PLANTA] float,
    [EFFORT_REM_PLANTA] float,
    [COSTS_PLAN_PLANTA] float,
    [COSTS_ACT_PLANTA] float,
    [COSTS_REM_PLANTA] float,
    [BUDGET] float,
    [OU_COST_CENTER] varchar(8),
    [COST_TYPE] varchar(8),
    [STATUS] numeric(5,0),
    [TRANSFERRED_ON] varchar(80),
    [CREATED_ON] datetime2,
    [MODIFIED_ON] datetime2,
    [RWDU] numeric(5,0),
    [CREATED_BY] varchar(20),
    [MODIFIED_BY] varchar(20),
    [OWN_LIC] varchar(4),
    [OPC] varchar(8),
    [OWNER] numeric(5,0),
    [GROUP] numeric(5,0),
    [ANY] numeric(5,0)
);

alter table ACCOUNTING_POOL add constraint PID978DT978 primary key ([UUID]);

alter table ACCOUNTING_POOL
    add constraint DT978UUID_DEFAULT DEFAULT newid() FOR [UUID];

alter table ACCOUNTING_POOL
    add constraint DT978UUID_NOT_NULL check([UUID] is not null);
    
alter table ACCOUNTING_POOL
    add constraint DT978DI064972_DEFAULT DEFAULT 0 FOR [EFFORT_PLAN];

alter table ACCOUNTING_POOL
    add constraint DT978DI064971_DEFAULT DEFAULT 0 FOR [EFFORT_ACT];

alter table ACCOUNTING_POOL
    add constraint DT978DI064970_DEFAULT DEFAULT 0 FOR [EFFORT_REM];

alter table ACCOUNTING_POOL
    add constraint DT978DI064966_DEFAULT DEFAULT 0 FOR [COSTS_PLAN];

alter table ACCOUNTING_POOL
    add constraint DT978DI064965_DEFAULT DEFAULT 0 FOR [COSTS_ACT];

alter table ACCOUNTING_POOL
    add constraint DT978DI064964_DEFAULT DEFAULT 0 FOR [COSTS_REM];

alter table ACCOUNTING_POOL
    add constraint DT978DI064986_DEFAULT DEFAULT 0 FOR [EFFORT_PLAN_PLANTA];

alter table ACCOUNTING_POOL
    add constraint DT978DI064987_DEFAULT DEFAULT 0 FOR [EFFORT_ACT_PLANTA];

alter table ACCOUNTING_POOL
    add constraint DT978DI064988_DEFAULT DEFAULT 0 FOR [EFFORT_REM_PLANTA];

alter table ACCOUNTING_POOL
    add constraint DT978DI064989_DEFAULT DEFAULT 0 FOR [COSTS_PLAN_PLANTA];

alter table ACCOUNTING_POOL
    add constraint DT978DI064990_DEFAULT DEFAULT 0 FOR [COSTS_ACT_PLANTA];

alter table ACCOUNTING_POOL
    add constraint DT978DI064991_DEFAULT DEFAULT 0 FOR [COSTS_REM_PLANTA];

alter table ACCOUNTING_POOL
    add constraint DT978DI064960_DEFAULT DEFAULT 0 FOR [BUDGET];

alter table ACCOUNTING_POOL
    add constraint DT978DI064981_DEFAULT DEFAULT 0 FOR [STATUS];

alter table ACCOUNTING_POOL
    add constraint DT978DI064957_DEFAULT DEFAULT CONVERT(datetime2,'01.01.1970',104) FOR [CREATED_ON];

alter table ACCOUNTING_POOL
    add constraint DT978DI064956_DEFAULT DEFAULT CONVERT(datetime2,'01.01.1970',104) FOR [MODIFIED_ON];

alter table ACCOUNTING_POOL
    add constraint DT978DI064955_DEFAULT DEFAULT 0 FOR [RWDU];

alter table ACCOUNTING_POOL
    add constraint DT978DI064950_DEFAULT DEFAULT 0 FOR [OWNER];

alter table ACCOUNTING_POOL
    add constraint DT978DI064949_DEFAULT DEFAULT 0 FOR [GROUP];

alter table ACCOUNTING_POOL
    add constraint DT978DI064948_DEFAULT DEFAULT 0 FOR [ANY];
