Index: ProcessManagement.sql
===================================================================
--- ProcessManagement.sql	(revision 301)
+++ ProcessManagement.sql	(revision 302)
@@ -1,5 +1,5 @@
 -- Project Name : noname
--- Date/Time    : 2017/10/05 15:29:38
+-- Date/Time    : 2017/12/12 10:48:17
 -- Author       : Horiuchi
 -- RDBMS Type   : MySQL
 -- Application  : A5:SQL Mk-2
@@ -615,7 +615,7 @@
 create table constructionledgerdetail (
   ConstructionCode decimal(10,0) unsigned not null comment '�HŽ–ƒR�[ƒh'
   , GroupCount decimal(2,0) unsigned not null comment 'ƒOƒ‹�[ƒv”Ô�†'
-  , LineCount decimal(3,0) unsigned not null comment '�s”Ô�†'
+  , LineCount decimal(4,0) unsigned not null comment '�s”Ô�†'
   , ComponentCode decimal(5,0) unsigned not null comment '�\�¬ƒL�['
   , ItemCode decimal(5,0) unsigned not null comment '�HŽíƒL�['
   , FirstString varchar(120) comment '�€–Ú–¼�Ì'
@@ -637,6 +637,7 @@
   , JoinTitleFlg decimal(1,0) not null comment '�HŽ––¼�Ìƒ^ƒCƒgƒ‹'
   , SalaryOnRegist decimal(12,0) not null comment '“o˜^ŽžŒŽŠz‹‹—^'
   , PurchaseOrderFlg decimal(2,0) not null comment '’�•¶�‘”­�sƒtƒ‰ƒO'
+  , DetailCount decimal(4,0) unsigned not null comment '–¾�×”Ô�†'
   , EntryDate datetime not null comment '“o˜^“ú•t'
   , UpdateDate datetime not null comment '�X�V“ú•t'
   , constraint constructionledgerdetail_PKC primary key (ConstructionCode,GroupCount,LineCount)
@@ -649,8 +650,14 @@
   on constructionledgerdetail(GroupCount);
 
 create index LedgerDetail_Index03
+  on constructionledgerdetail(LineCount);
+
+create index LedgerDetail_Index04
   on constructionledgerdetail(SourceCode);
 
+create index LedgerDetail_Index05
+  on constructionledgerdetail(DetailCount);
+
 -- �HŽ–�Ú�×‘ä’ ŽÀ�sƒf�[ƒ^
 drop table if exists constructionledgerexcute cascade;
 
@@ -657,7 +664,7 @@
 create table constructionledgerexcute (
   ConstructionCode decimal(10,0) unsigned not null comment '�HŽ–ƒR�[ƒh'
   , GroupCount decimal(2,0) unsigned not null comment 'ƒOƒ‹�[ƒv”Ô�†'
-  , LineCount decimal(3,0) unsigned not null comment '�s”Ô�†'
+  , LineCount decimal(4,0) unsigned not null comment '�s”Ô�†'
   , ColumnCount decimal(3,0) not null comment '—ñ”Ô�†'
   , PaymentAmount decimal(12,0) not null comment 'Žx•¥‹àŠz'
   , TargetMonth date not null comment '‘Î�Û”NŒŽ'
@@ -1502,6 +1509,27 @@
   , constraint paymentdatadetail_PKC primary key (COMPANYCODE,TARGETDATE,SEQNO,LINECOUNT)
 ) comment 'Žx•¥–¾�×ƒf�[ƒ^' ;
 
+-- �HŽ–ŠúŒÀ‰ñ”ðƒf�[ƒ^
+drop table if exists periodavoidance cascade;
+
+create table periodavoidance (
+  ConstructionCode decimal(10,0) unsigned not null comment '�HŽ–ƒR�[ƒh'
+  , ConstructionStatusFlg decimal(2,0) not null comment '�HŽ–�ó‘Ôƒtƒ‰ƒO'
+  , FieldNo decimal(2,0) not null comment 'ƒ`ƒFƒbƒN‘Î�ÛƒtƒB�[ƒ‹ƒh”Ô�†'
+  , EntryDate datetime not null comment '“o˜^“ú•t'
+  , UpdateDate datetime not null comment '�X�V“ú•t'
+  , constraint periodavoidance_PKC primary key (ConstructionCode,ConstructionStatusFlg,FieldNo)
+) comment '�HŽ–ŠúŒÀ‰ñ”ðƒf�[ƒ^' ;
+
+create index PeriodAvoidance_Index1
+  on periodavoidance(ConstructionCode);
+
+create index PeriodAvoidance_Index2
+  on periodavoidance(ConstructionStatusFlg);
+
+create index PeriodAvoidance_Index3
+  on periodavoidance(FieldNo);
+
 -- ’S“–ŽÒ�³”Fƒf�[ƒ^
 drop table if exists personapproval cascade;
 
@@ -1662,21 +1690,6 @@
   , constraint proceedingsdataattend_PKC primary key (ConstructionCode,ProceedingsDataDate,StartMeetingTime,SeqNo)
 ) comment '”­’�ŽÒ‘Å‚¿�‡‚í‚¹‹cŽ–˜^ƒf�[ƒ^�i�o�ÈŽÒ�j' ;
 
--- ”­’�ŽÒ‘Å‚¿�‡‚í‚¹‹cŽ–˜^ƒf�[ƒ^�i�o�ÈŽÒ�j
-drop table if exists proceedingsdataattendee cascade;
-
-create table proceedingsdataattendee (
-  PersonCode decimal(8,0) not null comment '�ì�¬ŽÒƒR�[ƒh'
-  , ProceedingsDataDate date not null comment '‹cŽ–˜^�ì�¬“ú'
-  , ConstructionCode int(11) not null comment '�HŽ–”Ô�†'
-  , SeqNo smallint(6) not null comment 'ƒf�[ƒ^�s”Ô�†'
-  , Department varchar(100) comment '�o�ÈŽÒ�Š‘®'
-  , AttendeeName varchar(100) comment '�o�ÈŽÒŽ�–¼'
-  , EntryDate datetime not null comment '“o˜^”NŒŽ“ú'
-  , UpdateDate datetime not null comment '�X�V”NŒŽ“ú'
-  , constraint proceedingsdataattendee_PKC primary key (PersonCode,ProceedingsDataDate,ConstructionCode,SeqNo)
-) comment '”­’�ŽÒ‘Å‚¿�‡‚í‚¹‹cŽ–˜^ƒf�[ƒ^�i�o�ÈŽÒ�j' ;
-
 -- ”­’�ŽÒ‘Å‚¿�‡‚í‚¹‹cŽ–˜^ƒf�[ƒ^�i–¾�×�j
 drop table if exists proceedingsdatadetail cascade;
 
@@ -1825,8 +1838,9 @@
   , UnitName varchar(30) comment '’PˆÊ'
   , UnitPrice decimal(10,0) not null comment '’P‰¿'
   , OrdersLinePrice decimal(12,0) comment '‹àŠz'
-  , SourceCode decimal(10,0) unsigned not null comment '—\ŽZ�ì�¬Žž�HŽ–”Ô�†'
-  , SourceLineCnt decimal(3,0) unsigned not null comment '’�•¶�‘�ì�¬Žž‘ä’ �s”Ô�†'
+  , SourceCode decimal(10,0) unsigned not null comment '‘ä’ �HŽ–”Ô�†'
+  , SourceDetailCnt decimal(4,0) unsigned not null comment '‘ä’ –¾�×”Ô�†'
+  , DataTypeFlag decimal(1,0) unsigned not null comment 'ƒf�[ƒ^ƒ^ƒCƒvƒtƒ‰ƒO'
   , EntryDate datetime not null comment '“o˜^“ú•t'
   , UpdateDate datetime not null comment '�X�V“ú•t'
   , constraint purchaseorderdetail_PKC primary key (ConstructionCode,SeqNo,GroupCount,LineCount)
