プロジェクト

全般

プロフィール

統計
| リビジョン:

h-you / trunk / ddl / ProcessManagement.sql @ 475

履歴 | 表示 | アノテート | ダウンロード (147 KB)

1
-- Project Name : noname
2
-- Date/Time    : 2020/01/25 17:17:05
3
-- Author       : Horiuchi
4
-- RDBMS Type   : MySQL
5
-- Application  : A5:SQL Mk-2
6

    
7
/*
8
  BackupToTempTable, RestoreFromTempTable?^????????t????????????B
9
  ???????Adrop table, create table ????f?[?^???c?????B
10
  ????@?\????I?? $$TableName ???????e?[?u????????????B
11
*/
12

    
13
-- ?S????s???\??f?[?^
14
--* BackupToTempTable
15
drop table if exists actionscheduledata cascade;
16

    
17
--* RestoreFromTempTable
18
create table actionscheduledata (
19
  TargetDate date not null comment '????'
20
  , PersonCode decimal(8,0) not null comment '?S????R?[?h'
21
  , ActionSchedule varchar(30) comment '?s???\??'
22
  , TargetYear year(4) not null comment '?Y???N'
23
  , TargetMonth year(4) not null comment '?Y????'
24
  , TargetDay year(4) not null comment '?Y????'
25
  , EntryDate datetime not null comment '?o?^???t'
26
  , UpdateDate datetime not null comment '?X?V???t'
27
  , constraint actionscheduledata_PKC primary key (TargetDate,PersonCode)
28
) comment '?S????s???\??f?[?^' ;
29

    
30
create index ActionScheduleData_Index1
31
  on actionscheduledata(TargetYear);
32

    
33
create index ActionScheduleData_Index2
34
  on actionscheduledata(TargetMonth);
35

    
36
create index ActionScheduleData_Index3
37
  on actionscheduledata(TargetDay);
38

    
39
-- ???F?o?H?}?X?^
40
--* BackupToTempTable
41
drop table if exists approvalmaster cascade;
42

    
43
--* RestoreFromTempTable
44
create table approvalmaster (
45
  ApprovalCode decimal(3,0) unsigned not null comment '???F?@?\???'
46
  , DepartmentCode decimal(5,0) unsigned not null comment '?????R?[?h'
47
  , SeqNo decimal(2,0) not null comment '?}??'
48
  , DisplayOrder decimal(2,0) not null comment '?\????'
49
  , ApprovalPerson decimal(8,0) unsigned not null comment '???F??R?[?h'
50
  , ApprovalAuthority decimal(1,0) not null comment '???F??????'
51
  , EntryDate datetime not null comment '?o?^???t'
52
  , UpdateDate datetime not null comment '?X?V???t'
53
  , constraint approvalmaster_PKC primary key (ApprovalCode,DepartmentCode,SeqNo)
54
) comment '???F?o?H?}?X?^' ;
55

    
56
-- ?o?????f?[?^
57
--* BackupToTempTable
58
drop table if exists attendancedailydata cascade;
59

    
60
--* RestoreFromTempTable
61
create table attendancedailydata (
62
  PersonCode decimal(8,0) unsigned not null comment '????R?[?h'
63
  , AttendanceDate date not null comment '???????'
64
  , SeqNo decimal(3,0) unsigned not null comment '????s???'
65
  , ConstructionCode decimal(10,0) not null comment '?H???R?[?h'
66
  , ActionResult varchar(100) not null comment '?s??????'
67
  , StartTime datetime comment '?J?n????'
68
  , CompTime datetime comment '?I??????'
69
  , DayTimes decimal(5,2) not null comment '???????'
70
  , Overtime decimal(5,2) not null comment '????O?A??'
71
  , OvertimeWA decimal(5,2) not null comment '?c??F?????'
72
  , WorkingComment varchar(120) comment '?R?????g'
73
  , WorkKindFlg decimal(2,0) not null comment '?????t???O'
74
  , EntryDate datetime not null comment '?o?^???t'
75
  , UpdateDate datetime not null comment '?X?V???t'
76
  , constraint attendancedailydata_PKC primary key (PersonCode,AttendanceDate,SeqNo)
77
) comment '?o?????f?[?^' ;
78

    
79
create index AttendDaily_Index1
80
  on attendancedailydata(ConstructionCode);
81

    
82
create index AttendDaily_Index2
83
  on attendancedailydata(AttendanceDate);
84

    
85
-- ?o?????f?[?^
86
--* BackupToTempTable
87
drop table if exists attendancedata cascade;
88

    
89
--* RestoreFromTempTable
90
create table attendancedata (
91
  PersonCode decimal(8,0) unsigned not null comment '????R?[?h'
92
  , AttendanceMonth decimal(6,0) unsigned not null comment '?o?????N??'
93
  , LastDays decimal(2,0) unsigned not null comment '??????I??'
94
  , AttendDayCount decimal(2,0) unsigned not null comment '?o?????'
95
  , NormalTimes decimal(5,2) not null comment '??????????'
96
  , OutEarlyTimes decimal(5,2) not null comment '???o?????'
97
  , OverTimes decimal(5,2) not null comment '?c??????'
98
  , HolidayWorkTimes decimal(5,2) not null comment '?x???o??????'
99
  , TransferHolidayTimes decimal(5,2) not null comment '?U??x????'
100
  , CompensatoryHolidayTimes decimal(5,2) not null comment '??x??'
101
  , PaidHolidaysTimes decimal(5,2) not null comment '?L???x???'
102
  , AbsenceTimes decimal(5,2) not null comment '????????'
103
  , LateTimes decimal(5,2) not null comment '?x???????'
104
  , LeaveEarlyTimes decimal(5,2) not null comment '????????'
105
  , GoOutTimes decimal(5,2) not null comment '?O?o?????'
106
  , OrderDate decimal(6,0) unsigned not null comment '?\????'
107
  , OrderNo decimal(2,0) unsigned not null comment '?\????t???'
108
  , EntryDate datetime not null comment '?o?^???t'
109
  , UpdateDate datetime not null comment '?X?V???t'
110
  , constraint attendancedata_PKC primary key (PersonCode,AttendanceMonth)
111
) comment '?o?????f?[?^' ;
112

    
113
-- ????o?f?[?^
114
--* BackupToTempTable
115
drop table if exists attendancenotice cascade;
116

    
117
--* RestoreFromTempTable
118
create table attendancenotice (
119
  PersonCode decimal(8,0) unsigned not null comment '????R?[?h'
120
  , AttendanceNo decimal(2,0) unsigned not null comment '????'
121
  , AttendanceMonth decimal(6,0) unsigned not null comment '?o?????N??'
122
  , OrderNo decimal(3,0) unsigned not null comment '????'
123
  , DepartmentCode decimal(5,0) unsigned not null comment '?????R?[?h'
124
  , HolidayReason decimal(1,0) unsigned not null comment '?x???'
125
  , FromDate datetime not null comment '?J?n????'
126
  , ToDate datetime not null comment '?I??????'
127
  , NoticePeriod decimal(5,2) unsigned not null comment '???????'
128
  , TransferDay datetime not null comment '?U???'
129
  , Reason varchar(300) comment '???R'
130
  , Note varchar(300) comment '???l'
131
  , ApprovalDate decimal(6,0) unsigned not null comment '???F??'
132
  , ApprovalNo decimal(2,0) unsigned not null comment '???F??t???'
133
  , DeleteFlg decimal(1,0) unsigned not null comment '???t???O'
134
  , EntryDate datetime not null comment '?o?^???t'
135
  , UpdateDate datetime not null comment '?X?V???t'
136
  , constraint attendancenotice_PKC primary key (PersonCode,AttendanceNo,AttendanceMonth,OrderNo)
137
) comment '????o?f?[?^' ;
138

    
139
-- ????o?R?t???f?[?^
140
--* BackupToTempTable
141
drop table if exists attendancenoticelink cascade;
142

    
143
--* RestoreFromTempTable
144
create table attendancenoticelink (
145
  PersonCode decimal(8,0) unsigned not null comment '????R?[?h'
146
  , AttendanceNo decimal(2,0) unsigned not null comment '????'
147
  , AttendanceMonth decimal(6,0) unsigned not null comment '?o?????N??'
148
  , OrderNo decimal(3,0) unsigned not null comment '????'
149
  , DailyDate date not null comment '???????'
150
  , SeqNo decimal(3,0) unsigned not null comment '?????s???'
151
  , EntryDate datetime not null comment '?o?^???t'
152
  , UpdateDate datetime not null comment '?X?V???t'
153
  , constraint attendancenoticelink_PKC primary key (PersonCode,AttendanceNo,AttendanceMonth,OrderNo,DailyDate,SeqNo)
154
) comment '????o?R?t???f?[?^' ;
155

    
156
create index AttendanceNoticeLink_Index1
157
  on attendancenoticelink(PersonCode);
158

    
159
create index AttendanceNoticeLink_Index2
160
  on attendancenoticelink(AttendanceNo);
161

    
162
create index AttendanceNoticeLink_Index3
163
  on attendancenoticelink(AttendanceMonth);
164

    
165
create index AttendanceNoticeLink_Index4
166
  on attendancenoticelink(OrderNo);
167

    
168
create index AttendanceNoticeLink_Index5
169
  on attendancenoticelink(DailyDate);
170

    
171
create index AttendanceNoticeLink_Index6
172
  on attendancenoticelink(SeqNo);
173

    
174
-- ????o?H???f?[?^
175
--* BackupToTempTable
176
drop table if exists attnoticeconstrction cascade;
177

    
178
--* RestoreFromTempTable
179
create table attnoticeconstrction (
180
  PersonCode decimal(8,0) unsigned not null comment '????R?[?h'
181
  , AttendanceNo decimal(2,0) unsigned not null comment '????'
182
  , AttendanceMonth decimal(6,0) unsigned not null comment '?o?????N??'
183
  , OrderNo decimal(3,0) unsigned not null comment '????'
184
  , ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
185
  , ConstructionName varchar(300) comment '?H??????'
186
  , EntryDate datetime not null comment '?o?^???t'
187
  , UpdateDate datetime not null comment '?X?V???t'
188
  , constraint attnoticeconstrction_PKC primary key (PersonCode,AttendanceNo,AttendanceMonth,OrderNo)
189
) comment '????o?H???f?[?^' ;
190

    
191
-- ?L???x??????R?t?f?[?^
192
--* BackupToTempTable
193
drop table if exists attnpaidholidyalink cascade;
194

    
195
--* RestoreFromTempTable
196
create table attnpaidholidyalink (
197
  PersonCode decimal(8,0) unsigned not null comment '????R?[?h'
198
  , AttendanceNo decimal(2,0) unsigned not null comment '????'
199
  , AttendanceMonth decimal(6,0) unsigned not null comment '?o?????N??'
200
  , OrderNo decimal(3,0) unsigned not null comment '????'
201
  , PreviousYear decimal(3,1) not null comment '?O?N?x?L??????'
202
  , CurrentYear decimal(3,1) not null comment '???N?x?L??????'
203
  , Completed decimal(1,0) unsigned not null comment '?????????t???O'
204
  , EntryDate datetime not null comment '?o?^???t'
205
  , UpdateDate datetime not null comment '?X?V???t'
206
  , constraint attnpaidholidyalink_PKC primary key (PersonCode,AttendanceNo,AttendanceMonth,OrderNo)
207
) comment '?L???x??????R?t?f?[?^' ;
208

    
209
-- ??s?c????}?X?^
210
--* BackupToTempTable
211
drop table if exists bankbusinessdaymaster cascade;
212

    
213
--* RestoreFromTempTable
214
create table bankbusinessdaymaster (
215
  YEARMONTH decimal(6,0) default '0' not null comment '?N??'
216
  , BANKBUSINESSDAY decimal(2,0) default '0' not null comment '??s?c???'
217
  , NOTE varchar(120) comment '???l'
218
  , DELETEFLG decimal(1,0) comment '???t???O'
219
  , ENTRYDATE datetime comment '?o?^?N????'
220
  , UPDATEDATE datetime comment '?X?V?N????'
221
  , constraint bankbusinessdaymaster_PKC primary key (YEARMONTH,BANKBUSINESSDAY)
222
) comment '??s?c????}?X?^' ;
223

    
224
-- ?H?????????O?f?[?^
225
--* BackupToTempTable
226
drop table if exists beforecreatingledger cascade;
227

    
228
--* RestoreFromTempTable
229
create table beforecreatingledger (
230
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
231
  , GroupCount decimal(2,0) unsigned not null comment '?O???[?v???'
232
  , TargetMonth decimal(6,0) unsigned not null comment '???N??'
233
  , PaymentAmount decimal(12,0) not null comment '???????z'
234
  , EntryDate datetime not null comment '?o?^???t'
235
  , UpdateDate datetime not null comment '?X?V???t'
236
  , constraint beforecreatingledger_PKC primary key (ConstructionCode,GroupCount,TargetMonth)
237
) comment '?H?????????O?f?[?^' ;
238

    
239
-- ???????f?[?^
240
--* BackupToTempTable
241
drop table if exists billingdata cascade;
242

    
243
--* RestoreFromTempTable
244
create table billingdata (
245
  COMPANYCODE decimal(8,0) default '0' not null comment '??????R?[?h'
246
  , TARGETDATE decimal(6,0) default '0' not null comment '???N??'
247
  , SEQNO decimal(3,0) default '0' not null comment '?A??'
248
  , BILLPRICE decimal(10,0) comment '???????z'
249
  , ENTRYDATE datetime comment '?o?^?N????'
250
  , UPDATEDATE datetime comment '?X?V?N????'
251
  , constraint billingdata_PKC primary key (COMPANYCODE,TARGETDATE,SEQNO)
252
) comment '???????f?[?^' ;
253

    
254
-- ??????????f?[?^
255
--* BackupToTempTable
256
drop table if exists billingdatadetail cascade;
257

    
258
--* RestoreFromTempTable
259
create table billingdatadetail (
260
  COMPANYCODE decimal(8,0) default '0' not null comment '??????R?[?h'
261
  , TARGETDATE decimal(6,0) default '0' not null comment '???N??'
262
  , SEQNO decimal(3,0) default '0' not null comment '?A??'
263
  , LINECOUNT decimal(3,0) default '0' not null comment '?s???'
264
  , LABOURKIND decimal(1,0) not null comment '?x???????E????'
265
  , CONSTRUCTIONCODE decimal(10,0) comment '?H?????'
266
  , CONSTRUCTIONROWCNT decimal(3,0) default '0' not null comment '????????'
267
  , CONSTRUCTIONCOLCNT decimal(3,0) default '0' not null comment '??????'
268
  , LinkDataType decimal(1,0) not null comment '??A?t???f?[?^?^?C?v'
269
  , FIELDNAME varchar(120) comment '????'
270
  , BILLPRICE decimal(10,0) comment '???????z'
271
  , HIGHWPRICE decimal(10,0) comment '??????'
272
  , HARDWPRICE decimal(10,0) comment '??????'
273
  , INDSWASTETAX decimal(10,0) comment '?Y?p??'
274
  , OverFlg decimal(1,0) comment '?x??????t???O'
275
  , NOTE varchar(120) comment '???l'
276
  , DELETEFLG decimal(1,0) comment '???t???O'
277
  , ENTRYDATE datetime comment '?o?^?N????'
278
  , UPDATEDATE datetime comment '?X?V?N????'
279
  , constraint billingdatadetail_PKC primary key (COMPANYCODE,TARGETDATE,SEQNO,LINECOUNT,LABOURKIND)
280
) comment '??????????f?[?^' ;
281

    
282
create index billingdatadetail_Index1
283
  on billingdatadetail(COMPANYCODE);
284

    
285
create index billingdatadetail_Index2
286
  on billingdatadetail(TARGETDATE);
287

    
288
create index billingdatadetail_Index3
289
  on billingdatadetail(SEQNO);
290

    
291
create index billingdatadetail_Index4
292
  on billingdatadetail(LINECOUNT);
293

    
294
create index billingdatadetail_Index5
295
  on billingdatadetail(LABOURKIND);
296

    
297
create index billingdatadetail_Index6
298
  on billingdatadetail(CONSTRUCTIONCODE);
299

    
300
create index billingdatadetail_Index7
301
  on billingdatadetail(CONSTRUCTIONROWCNT);
302

    
303
create index billingdatadetail_Index8
304
  on billingdatadetail(CONSTRUCTIONCOLCNT);
305

    
306
-- ???????x???T?}???[?f?[?^
307
--* BackupToTempTable
308
drop table if exists billingpaymentsummary cascade;
309

    
310
--* RestoreFromTempTable
311
create table billingpaymentsummary (
312
  COMPANYCODE decimal(8,0) default '0' not null comment '??????R?[?h'
313
  , TARGETDATE decimal(6,0) default '0' not null comment '???N??'
314
  , CHARGEPAYMENTKIND decimal(1,0) default '0' not null comment '?????x????'
315
  , PAYDAY date comment '?x????'
316
  , BILLPRICESTOTAL decimal(10,0) comment '???????z???v'
317
  , CONSUMPTIONTAXRATE decimal(6,3) comment '??????'
318
  , CONSUMPTIONTAXPRICE decimal(10,0) comment '?????z'
319
  , HIGHWPRICESTOTAL decimal(10,0) comment '???????v'
320
  , HARDWPRICESTOTAL decimal(10,0) comment '???????v'
321
  , INDSWASTETAXSTOTAL decimal(10,0) comment '?Y?p????v'
322
  , CNSTRPRICERATE decimal(6,3) comment '???????'
323
  , CNSTRPRICESTOTAL decimal(10,0) comment '????????v'
324
  , BILLINGPRICETOTAL decimal(10,0) comment '???????z???v'
325
  , ENTRYDATE datetime comment '?o?^?N????'
326
  , UPDATEDATE datetime comment '?X?V?N????'
327
  , constraint billingpaymentsummary_PKC primary key (COMPANYCODE,TARGETDATE,CHARGEPAYMENTKIND)
328
) comment '???????x???T?}???[?f?[?^' ;
329

    
330
-- ?^?c?????????
331
--* BackupToTempTable
332
drop table if exists bizperiodhistory cascade;
333

    
334
--* RestoreFromTempTable
335
create table bizperiodhistory (
336
  PeriodYear smallint(6) not null comment '?c??????E?H???N?x'
337
  , PeriodFlag smallint(1) not null comment '?c??????E?H???N?x?t???O'
338
  , BeginDate datetime not null comment '?????'
339
  , CompleteDate datetime not null comment '??????'
340
  , EntryDate datetime not null comment '?o?^???t'
341
  , UpdateDate datetime not null comment '?X?V???t'
342
  , constraint bizperiodhistory_PKC primary key (PeriodYear,PeriodFlag)
343
) comment '?^?c?????????' ;
344

    
345
-- ?H???????f?[?^?y???p?z
346
--* BackupToTempTable
347
drop table if exists bk_constructionledger cascade;
348

    
349
--* RestoreFromTempTable
350
create table bk_constructionledger (
351
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
352
  , ConstructionPeriod decimal(4,0) unsigned not null comment '?????'
353
  , CreatorCode decimal(8,0) comment '????R?[?h'
354
  , CreatorName varchar(60) comment '?????'
355
  , CreateDate date not null comment '????'
356
  , ConstructionTimes decimal(5,2) not null comment '?H???i?P??E???j'
357
  , ConstructionStart date not null comment '?_??H???J?n'
358
  , ConstructionEnd date not null comment '?_??H??????'
359
  , OrdersDecisionPrice decimal(14,0) not null comment '??????????z'
360
  , CompanyExpenses decimal(10,0) not null comment '???o???v'
361
  , DepartmentExpenses decimal(10,0) not null comment '?????o???v'
362
  , SalesExpenses decimal(10,0) not null comment '?c??o???v'
363
  , TotalPayment decimal(10,0) not null comment '???x???z'
364
  , GrossProfit decimal(10,0) not null comment '?e??'
365
  , Allowance decimal(10,0) not null comment '???^'
366
  , NetProfit decimal(10,0) not null comment '?????v'
367
  , ComplateFlg decimal(1,0) not null comment '????????t???O'
368
  , IntegrationFlg decimal(1,0) not null comment '????z??Z?t???O'
369
  , EntryDate datetime not null comment '?o?^???t'
370
  , UpdateDate datetime not null comment '?X?V???t'
371
  , constraint bk_constructionledger_PKC primary key (ConstructionCode)
372
) comment '?H???????f?[?^?y???p?z' ;
373

    
374
-- ?H??????????f?[?^?y???p?z
375
--* BackupToTempTable
376
drop table if exists bk_constructionledgerdetail cascade;
377

    
378
--* RestoreFromTempTable
379
create table bk_constructionledgerdetail (
380
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
381
  , GroupCount decimal(2,0) unsigned not null comment '?O???[?v???'
382
  , LineCount decimal(4,0) unsigned not null comment '?s???'
383
  , ComponentCode decimal(5,0) unsigned not null comment '?\???L?['
384
  , ItemCode decimal(5,0) unsigned not null comment '?H??L?['
385
  , FirstString varchar(120) comment '???????'
386
  , SecondString varchar(120) comment '?H?????e'
387
  , CompanyType decimal(1,0) not null comment '??????R?[?h?^?C?v'
388
  , CompanyCode decimal(8,0) not null comment '??????R?[?h'
389
  , CompanyName varchar(120) comment '?????????'
390
  , EstimatePrice decimal(12,0) not null comment '?\?Z?i????j???z'
391
  , ExecutionAmount decimal(12,0) not null comment '???s???z'
392
  , AmountConfigRate decimal(5,2) not null comment '???z?\????'
393
  , PaymentBurden decimal(12,0) not null comment '?x????U?z'
394
  , FixDataFlg decimal(1,0) not null comment '???f?[?^?t???O'
395
  , IndependentFlg decimal(1,0) not null comment '????f?[?^?t???O'
396
  , FluctuationFlg decimal(1,0) not null comment '?????f?[?^?t???O'
397
  , SalaryFlg decimal(1,0) not null comment '???^?U????'
398
  , SalaryDays decimal(4,0) not null comment '???^?U??????'
399
  , OperatingFlg decimal(1,0) not null comment '?S?????t???O'
400
  , SourceCode decimal(10,0) unsigned not null comment '???H?????'
401
  , JoinTitleFlg decimal(1,0) not null comment '?H??????^?C?g??'
402
  , SalaryOnRegist decimal(12,0) not null comment '?o?^?????z???^'
403
  , PurchaseOrderFlg decimal(2,0) not null comment '?????????s?t???O'
404
  , DetailCount decimal(4,0) unsigned not null comment '??????'
405
  , InvalidLine decimal(1,0) not null comment '?????s'
406
  , EntryDate datetime not null comment '?o?^???t'
407
  , UpdateDate datetime not null comment '?X?V???t'
408
  , constraint bk_constructionledgerdetail_PKC primary key (ConstructionCode,GroupCount,LineCount)
409
) comment '?H??????????f?[?^?y???p?z' ;
410

    
411
-- ?H?????????s?f?[?^?y???p?z
412
--* BackupToTempTable
413
drop table if exists bk_constructionledgerexcute cascade;
414

    
415
--* RestoreFromTempTable
416
create table bk_constructionledgerexcute (
417
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
418
  , GroupCount decimal(2,0) unsigned not null comment '?O???[?v???'
419
  , LineCount decimal(5,0) unsigned not null comment '?s???'
420
  , ColumnCount decimal(3,0) not null comment '????'
421
  , PaymentAmount decimal(12,0) not null comment '?x?????z'
422
  , TargetMonth date not null comment '???N??'
423
  , EntryDate datetime not null comment '?o?^???t'
424
  , UpdateDate datetime not null comment '?X?V???t'
425
  , constraint bk_constructionledgerexcute_PKC primary key (ConstructionCode,GroupCount,LineCount,ColumnCount)
426
) comment '?H?????????s?f?[?^?y???p?z' ;
427

    
428
-- ??Z????f?[?^?y???p?z
429
--* BackupToTempTable
430
drop table if exists bk_estimatedata cascade;
431

    
432
--* RestoreFromTempTable
433
create table bk_estimatedata (
434
  SaveDate datetime not null comment '?????t'
435
  , ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
436
  , LineCount decimal(3,0) unsigned not null comment '?s???'
437
  , ComponentCode decimal(5,0) unsigned not null comment '?\???L?['
438
  , FixedItemCode varchar(1) comment '?????L?['
439
  , ItemName varchar(120) comment '??????'
440
  , SpecName varchar(120) comment '???^?i???E?`??E???@'
441
  , PriceValue decimal(14,0) not null comment '???z'
442
  , note varchar(60) comment '???l'
443
  , MyExpensesFlg decimal(1,0) not null comment '????o??t???O'
444
  , InputFlg decimal(1,0) not null comment '????t???O'
445
  , EntryDate datetime not null comment '?o?^???t'
446
  , UpdateDate datetime not null comment '?X?V???t'
447
  , constraint bk_estimatedata_PKC primary key (SaveDate,ConstructionCode,LineCount)
448
) comment '??Z????f?[?^?y???p?z' ;
449

    
450
-- ??Z????y?[?W?f?[?^?y???p?z
451
--* BackupToTempTable
452
drop table if exists bk_estimatedatabody cascade;
453

    
454
--* RestoreFromTempTable
455
create table bk_estimatedatabody (
456
  SaveDate datetime not null comment '?????t'
457
  , ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
458
  , PageCount decimal(4,0) unsigned not null comment '?y?[?W???'
459
  , Category decimal(1,0) not null comment '?y?[?W??'
460
  , UnionComponentCode decimal(5,0) unsigned not null comment '?????\???L?['
461
  , ComponentCode decimal(5,0) unsigned not null comment '?\???L?['
462
  , ItemCode decimal(5,0) unsigned not null comment '?H??L?['
463
  , SelectComponent decimal(5,0) unsigned not null comment '?I???\???L?['
464
  , PageTitle varchar(120) not null comment '?y?[?W?\????'
465
  , DetailLineCount decimal(3,0) unsigned not null comment '????s???'
466
  , EntryDate datetime not null comment '?o?^???t'
467
  , UpdateDate datetime not null comment '?X?V???t'
468
  , constraint bk_estimatedatabody_PKC primary key (SaveDate,ConstructionCode,PageCount)
469
) comment '??Z????y?[?W?f?[?^?y???p?z' ;
470

    
471
-- ??Z????f?[?^????y???p?z
472
--* BackupToTempTable
473
drop table if exists bk_estimatedatadetail cascade;
474

    
475
--* RestoreFromTempTable
476
create table bk_estimatedatadetail (
477
  SaveDate datetime not null comment '?????t'
478
  , ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
479
  , PageCount decimal(4,0) unsigned not null comment '?y?[?W???'
480
  , LineCount decimal(3,0) unsigned not null comment '?s???'
481
  , DataType decimal(1,0) not null comment '?f?[?^???'
482
  , ComponentCode decimal(5,0) unsigned not null comment '?\???L?['
483
  , ItemCode decimal(5,0) unsigned not null comment '?H??L?['
484
  , SpecCode decimal(5,0) unsigned not null comment '???L?['
485
  , ItemName varchar(120) comment '??????'
486
  , SpecName varchar(120) comment '???^?i???E?`??E???@'
487
  , Unitcount decimal(8,2) not null comment '????'
488
  , UnitName varchar(30) comment '?P?????'
489
  , UnitPrice decimal(9,2) not null comment '?P??'
490
  , LineTotal decimal(12,0) not null comment '???z'
491
  , note varchar(60) comment '???l'
492
  , CompanyCode decimal(8,0) not null comment '??????R?[?h'
493
  , MyExpensesFlg decimal(1,0) not null comment '????o??t???O'
494
  , InputFlg decimal(1,0) comment '????t???O'
495
  , EntryDate datetime not null comment '?o?^???t'
496
  , UpdateDate datetime not null comment '?X?V???t'
497
  , constraint bk_estimatedatadetail_PKC primary key (SaveDate,ConstructionCode,PageCount,LineCount)
498
) comment '??Z????f?[?^????y???p?z' ;
499

    
500
-- ?\?Z???W?v?R?[?h?}?X?^
501
--* BackupToTempTable
502
drop table if exists budgetsumcode cascade;
503

    
504
--* RestoreFromTempTable
505
create table budgetsumcode (
506
  BlockCode decimal(2,0) unsigned not null comment '?u???b?N???'
507
  , GroupCode decimal(2,0) unsigned not null comment '?O???[?v???'
508
  , ComponentCode decimal(5,0) unsigned not null comment '?\???L?['
509
  , ItemCode decimal(5,0) unsigned not null comment '?H??L?['
510
  , ElementsName varchar(100) not null comment '?v?f????'
511
  , EntryDate datetime not null comment '?o?^???t'
512
  , UpdateDate datetime not null comment '?X?V???t'
513
  , constraint budgetsumcode_PKC primary key (BlockCode,GroupCode,ComponentCode,ItemCode)
514
) comment '?\?Z???W?v?R?[?h?}?X?^' ;
515

    
516
-- ?@?l?i?}?X?^
517
--* BackupToTempTable
518
drop table if exists businesstypemaster cascade;
519

    
520
--* RestoreFromTempTable
521
create table businesstypemaster (
522
  BusinessTypeCode decimal(5,0) unsigned not null comment '?@?l?i?R?[?h'
523
  , DisplayOrder decimal(5,0) unsigned not null comment '?\????'
524
  , BusinessTypeName varchar(100) not null comment '???'
525
  , EntryDate datetime not null comment '?o?^???t'
526
  , UpdateDate datetime not null comment '?X?V???t'
527
  , constraint businesstypemaster_PKC primary key (BusinessTypeCode)
528
) comment '?@?l?i?}?X?^' ;
529

    
530
create index BusinessTypeMaster_Index1
531
  on businesstypemaster(DisplayOrder);
532

    
533
-- ?S????????????f?[?^
534
--* BackupToTempTable
535
drop table if exists chgchargedep cascade;
536

    
537
--* RestoreFromTempTable
538
create table chgchargedep (
539
  PersonCode decimal(8,0) not null comment '?S????R?[?h'
540
  , StartDate date not null comment '?J?n?N????'
541
  , CompDate date not null comment '?I???N????'
542
  , DepartmentCode decimal(5,0) unsigned not null comment '?????R?[?h'
543
  , DepartmentName varchar(60) comment '??????'
544
  , EntryDate datetime not null comment '?o?^???t'
545
  , UpdateDate datetime not null comment '?X?V???t'
546
  , constraint chgchargedep_PKC primary key (PersonCode,StartDate)
547
) comment '?S????????????f?[?^' ;
548

    
549
-- ?H???S????X?????f?[?^
550
--* BackupToTempTable
551
drop table if exists chgconstrcharge cascade;
552

    
553
--* RestoreFromTempTable
554
create table chgconstrcharge (
555
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
556
  , Division decimal(1,0) not null comment '????'
557
  , SeqNo smallint(5) unsigned not null comment '?A??'
558
  , DepartmentCode decimal(5,0) unsigned not null comment '?????R?[?h'
559
  , PersonCode decimal(8,0) not null comment '?S????R?[?h'
560
  , StartDate date comment '?S???J?n?N????'
561
  , CompDate date comment '?S???I???N????'
562
  , SourceCode decimal(10,0) unsigned not null comment '???H???R?[?h'
563
  , DeleteFlg decimal(1,0) not null comment '???t???O'
564
  , EntryDate datetime not null comment '?o?^???t'
565
  , UpdateDate datetime not null comment '?X?V???t'
566
  , constraint chgconstrcharge_PKC primary key (ConstructionCode,Division,SeqNo)
567
) comment '?H???S????X?????f?[?^' ;
568

    
569
-- Web-EDI??????f?[?^
570
--* BackupToTempTable
571
drop table if exists closingdateofmonth cascade;
572

    
573
--* RestoreFromTempTable
574
create table closingdateofmonth (
575
  TARGETDATE decimal(6,0) unsigned default '0' not null comment '???N??'
576
  , SEQNO decimal(3,0) default '0' not null comment '?A??'
577
  , StartDate date comment '????J?n??'
578
  , CompDate date comment '?????????'
579
  , PayPlansDate date comment '?x???\???'
580
  , ENTRYDATE datetime comment '?o?^?N????'
581
  , UPDATEDATE datetime comment '?X?V?N????'
582
  , constraint closingdateofmonth_PKC primary key (TARGETDATE,SEQNO)
583
) comment 'Web-EDI??????f?[?^' ;
584

    
585
-- ????????}?X?^
586
--* BackupToTempTable
587
drop table if exists commoncostlarge cascade;
588

    
589
--* RestoreFromTempTable
590
create table commoncostlarge (
591
  LargeCode decimal(5,0) unsigned not null comment '????L?['
592
  , DisplayOrder decimal(5,0) unsigned not null comment '?\????'
593
  , LargeName varchar(50) not null comment '???????'
594
  , CommentText varchar(120) comment '????????'
595
  , DeleteFlg decimal(1,0) not null comment '???t???O'
596
  , EntryDate datetime not null comment '?o?^???t'
597
  , UpdateDate datetime not null comment '?X?V???t'
598
  , constraint commoncostlarge_PKC primary key (LargeCode)
599
) comment '????????}?X?^' ;
600

    
601
-- ?????H???A?}?X?^
602
--* BackupToTempTable
603
drop table if exists commoncostlinkms cascade;
604

    
605
--* RestoreFromTempTable
606
create table commoncostlinkms (
607
  LargeCode decimal(5,0) unsigned not null comment '????L?['
608
  , MiddleCode decimal(5,0) unsigned not null comment '??????L?['
609
  , ItemCode decimal(5,0) unsigned not null comment '?H??L?['
610
  , EntryDate datetime comment '?o?^???t'
611
  , UpdateDate datetime comment '?X?V???t'
612
  , constraint commoncostlinkms_PKC primary key (LargeCode,MiddleCode,ItemCode)
613
) comment '?????H???A?}?X?^' ;
614

    
615
-- ?????????}?X?^
616
--* BackupToTempTable
617
drop table if exists commoncostmiddle cascade;
618

    
619
--* RestoreFromTempTable
620
create table commoncostmiddle (
621
  LargeCode decimal(5,0) unsigned not null comment '????L?['
622
  , MiddleCode decimal(5,0) unsigned not null comment '??????L?['
623
  , DisplayOrder decimal(5,0) unsigned not null comment '?\????'
624
  , MiddleName varchar(50) not null comment '?????????'
625
  , CommentText varchar(120) comment '????????'
626
  , DeleteFlg decimal(1,0) not null comment '???t???O'
627
  , EntryDate datetime not null comment '?o?^???t'
628
  , UpdateDate datetime not null comment '?X?V???t'
629
  , constraint commoncostmiddle_PKC primary key (LargeCode,MiddleCode)
630
) comment '?????????}?X?^' ;
631

    
632
-- ?????????L?[?}?X?^
633
--* BackupToTempTable
634
drop table if exists commoncostmiddlesearchword cascade;
635

    
636
--* RestoreFromTempTable
637
create table commoncostmiddlesearchword (
638
  LargeCode decimal(5,0) unsigned not null comment '????L?['
639
  , MiddleCode decimal(5,0) unsigned not null comment '??????L?['
640
  , SeqNo decimal(5,0) unsigned not null comment '????'
641
  , SearchWord varchar(50) not null comment '????????'
642
  , EntryDate datetime not null comment '?o?^???t'
643
  , UpdateDate datetime not null comment '?X?V???t'
644
  , constraint commoncostmiddlesearchword_PKC primary key (LargeCode,MiddleCode,SeqNo)
645
) comment '?????????L?[?}?X?^' ;
646

    
647
-- ?\???H???A?}?X?^
648
--* BackupToTempTable
649
drop table if exists componentlinkmaster cascade;
650

    
651
--* RestoreFromTempTable
652
create table componentlinkmaster (
653
  ComponentCode decimal(5,0) unsigned not null comment '?\???L?['
654
  , ItemCode decimal(5,0) unsigned not null comment '?H??L?['
655
  , DisplayOrder decimal(5,0) unsigned comment '?\????'
656
  , EntryDate datetime not null comment '?o?^???t'
657
  , UpdateDate datetime not null comment '?X?V???t'
658
  , constraint componentlinkmaster_PKC primary key (ComponentCode,ItemCode)
659
) comment '?\???H???A?}?X?^' ;
660

    
661
create index ComponentLinkMaster_Index1
662
  on componentlinkmaster(ComponentCode);
663

    
664
create index ComponentLinkMaster_Index2
665
  on componentlinkmaster(ItemCode);
666

    
667
-- ?\???}?X?^
668
--* BackupToTempTable
669
drop table if exists componentmaster cascade;
670

    
671
--* RestoreFromTempTable
672
create table componentmaster (
673
  ComponentCode decimal(5,0) unsigned not null comment '?\???L?['
674
  , DisplayOrder decimal(5,0) unsigned not null comment '?\????'
675
  , ComponentName varchar(120) not null comment '?\??????'
676
  , SubItemsFlg decimal(1,0) comment '???????t???O'
677
  , DirectInputFlg decimal(1,0) comment '???????t???O'
678
  , MyExpensesFlg decimal(1,0) comment '????o??t???O'
679
  , DeleteFlg decimal(1,0) not null comment '???t???O'
680
  , EntryDate datetime not null comment '?o?^???t'
681
  , UpdateDate datetime not null comment '?X?V???t'
682
  , constraint componentmaster_PKC primary key (ComponentCode)
683
) comment '?\???}?X?^' ;
684

    
685
create index ComponentMaster_Index1
686
  on componentmaster(DisplayOrder);
687

    
688
-- ?H?????E?\???????N?}?X?^
689
--* BackupToTempTable
690
drop table if exists componenttotypemaster cascade;
691

    
692
--* RestoreFromTempTable
693
create table componenttotypemaster (
694
  TypeCode decimal(5,0) unsigned not null comment '?H?????R?[?h'
695
  , ComponentCode decimal(5,0) unsigned not null comment '?\???L?['
696
  , DisplayOrder decimal(5,0) unsigned not null comment '?\????'
697
  , EntryDate datetime not null comment '?o?^???t'
698
  , UpdateDate datetime not null comment '?X?V???t'
699
  , constraint componenttotypemaster_PKC primary key (TypeCode,ComponentCode)
700
) comment '?H?????E?\???????N?}?X?^' ;
701

    
702
create index ComponentToTypeMaster_Index1
703
  on componenttotypemaster(TypeCode);
704

    
705
create index ComponentToTypeMaster_Index2
706
  on componenttotypemaster(ComponentCode);
707

    
708
-- ?H???????o??f?[?^
709
--* BackupToTempTable
710
drop table if exists constrledgerexpenses cascade;
711

    
712
--* RestoreFromTempTable
713
create table constrledgerexpenses (
714
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
715
  , SeqNo decimal(5,0) not null comment '?}??'
716
  , NameCode decimal(5,0) unsigned not null comment '?o??R?[?h'
717
  , ExpensesRaito decimal(4,2) not null comment '?o??'
718
  , ExpensesValue decimal(10,0) not null comment '?o????z'
719
  , EntryDate datetime not null comment '?o?^???t'
720
  , UpdateDate datetime not null comment '?X?V???t'
721
  , constraint constrledgerexpenses_PKC primary key (ConstructionCode,SeqNo,NameCode)
722
) comment '?H???????o??f?[?^' ;
723

    
724
create index ConstrLedgerExpenses_Index1
725
  on constrledgerexpenses(ConstructionCode);
726

    
727
create index ConstrLedgerExpenses_Index2
728
  on constrledgerexpenses(SeqNo);
729

    
730
create index ConstrLedgerExpenses_Index3
731
  on constrledgerexpenses(NameCode);
732

    
733
-- ?H????{???
734
--* BackupToTempTable
735
drop table if exists constructionbaseinfo cascade;
736

    
737
--* RestoreFromTempTable
738
create table constructionbaseinfo (
739
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
740
  , TyingFlg decimal(1,0) not null comment '?R?t?f?[?^?t???O'
741
  , JoinFlg decimal(1,0) not null comment '?????_??H???t???O'
742
  , ConstructionYear smallint(5) unsigned not null comment '?H???N?x'
743
  , ConstructionPeriod smallint(5) unsigned not null comment '?H??????'
744
  , RequestedDate date comment '??????'
745
  , EstimatesSubmitDeadline date comment '?????o????'
746
  , EstimatesSubmittedDate date comment '?????o??'
747
  , ProvisionalOrderDate date comment '?????'
748
  , OrderDate date comment '???'
749
  , OrderStartingDate date comment '?J?n?\???'
750
  , OrderCompletionDate date comment '?????\???'
751
  , PreparationStartDate date comment '?{?H?????J?n??'
752
  , ConstructionStartingDate date comment '?{?H?J?n??'
753
  , ConstructionCompletionDate date comment '?{?H??????'
754
  , NonOrderDate date comment '????'
755
  , OrdersDecisionPrice decimal(12,0) not null comment '??????????z'
756
  , OrdersDecisionPriceInTax decimal(12,0) not null comment '??????????z'
757
  , SalesDepCode decimal(5,0) unsigned not null comment '?c??S????????R?[?h'
758
  , SalesPersonCode decimal(8,0) unsigned not null comment '?c??S????R?[?h'
759
  , SalesSubDepCode decimal(5,0) unsigned not null comment '?c????S????????R?[?h'
760
  , SalesSubPersonCode decimal(8,0) unsigned not null comment '?c????S????R?[?h'
761
  , ConstrDepCode decimal(5,0) unsigned not null comment '?H???S????????R?[?h'
762
  , ConstructionPersonCode decimal(8,0) not null comment '?H???S????R?[?h'
763
  , ConstrSubDepCode decimal(5,0) unsigned not null comment '?H?????S????????R?[?h'
764
  , ConstrSubPersonCode decimal(8,0) not null comment '?H?????S????R?[?h'
765
  , ConstrInstrDepCode decimal(5,0) unsigned not null comment '?H???w?????????R?[?h'
766
  , ConstructionInstructor decimal(8,0) not null comment '?H???w?????R?[?h'
767
  , TransferConstruction decimal(8,0) not null comment '?H??????R?[?h'
768
  , TransferConstructionDate date comment '?H??????'
769
  , OrderersDivision decimal(5,0) not null comment '????????R?[?h'
770
  , OrderersCode decimal(5,0) unsigned not null comment '??????R?[?h'
771
  , EstimatesExpirationDate date comment '????L??????'
772
  , ConstructionPeriodStart date comment '?_??H???J?n??'
773
  , ConstructionPeriodEnd date comment '?_??H??????'
774
  , ConstructionPeriodStart2 date comment '?_??H???J?n?i???????j'
775
  , ConstructionPeriodEnd2 date comment '?_??H???????i???????j'
776
  , StartDate date comment '?H???J?n??'
777
  , EndDate date comment '?H???I????'
778
  , PurchaseOrderMailingDate date comment '???????X????'
779
  , PurchaseOrderReturnDate date comment '???????????'
780
  , PurchaseOrderReturnCheckDate date comment '??????????m?F??'
781
  , ConsumptionTaxFlg decimal(1,0) not null comment '?????t???O'
782
  , PrimeContractorFlg decimal(1,0) not null comment '?????t???O'
783
  , SalesCostFlg decimal(1,0) not null comment '?c??o?????t???O'
784
  , ConstructionStatusFlg decimal(2,0) not null comment '?H?????t???O'
785
  , ConstructionType decimal(5,0) not null comment '?H?????R?[?h'
786
  , EstimateType decimal(1,0) not null comment '??????'
787
  , BillingStartDate date not null comment '?????????J?n??'
788
  , BillingDate date not null comment '??????'
789
  , BillingSplitFlg decimal(1,0) not null comment '??????t???O'
790
  , BillingSendDate date comment '???????X??/??n????'
791
  , LedgerComplateDate date not null comment '?H????????????????t'
792
  , InspectPlanningDate date not null comment '?????\???'
793
  , InspectExecuteDate date not null comment '???????s??'
794
  , RevCompleteDate date not null comment '??????????????'
795
  , ExpectedOrder decimal(3,0) not null comment '?????x'
796
  , EntryDate datetime not null comment '?o?^???t'
797
  , UpdateDate datetime not null comment '?X?V???t'
798
  , constraint constructionbaseinfo_PKC primary key (ConstructionCode)
799
) comment '?H????{???' ;
800

    
801
create index BaseInfo_Index1
802
  on constructionbaseinfo(ConstructionStatusFlg);
803

    
804
create index BaseInfo_Index2
805
  on constructionbaseinfo(EstimateType);
806

    
807
create index BaseInfo_Index3
808
  on constructionbaseinfo(SalesPersonCode);
809

    
810
create index BaseInfo_Index4
811
  on constructionbaseinfo(ConstructionPersonCode);
812

    
813
create index BaseInfo_Index5
814
  on constructionbaseinfo(ConstructionInstructor);
815

    
816
create index BaseInfo_Index6
817
  on constructionbaseinfo(ConstructionPeriod);
818

    
819
-- ?H????{????
820
--* BackupToTempTable
821
drop table if exists constructionbaseinfodetail cascade;
822

    
823
--* RestoreFromTempTable
824
create table constructionbaseinfodetail (
825
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
826
  , DetailNo decimal(3,0) not null comment '??????'
827
  , DetailString varchar(300) comment '??????e'
828
  , EntryDate datetime not null comment '?o?^???t'
829
  , UpdateDate datetime not null comment '?X?V???t'
830
  , constraint constructionbaseinfodetail_PKC primary key (ConstructionCode,DetailNo)
831
) comment '?H????{????' ;
832

    
833
create index BaseInfoDetail_Idx1
834
  on constructionbaseinfodetail(ConstructionCode);
835

    
836
create index BaseInfoDetail_Idx2
837
  on constructionbaseinfodetail(DetailNo);
838

    
839
-- ?H???{?H?\?Z?f?[?^
840
--* BackupToTempTable
841
drop table if exists constructionbudget cascade;
842

    
843
--* RestoreFromTempTable
844
create table constructionbudget (
845
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
846
  , CreatorCode decimal(8,0) not null comment '????R?[?h'
847
  , CreatorName varchar(60) comment '?????'
848
  , CreatorCosts decimal(11,0) not null comment '??????^'
849
  , AssistantCode decimal(8,0) not null comment '???S????R?[?h'
850
  , AssistantName varchar(60) comment '???S?????'
851
  , AssistantCosts decimal(11,0) not null comment '???S??????^'
852
  , InstructorCode decimal(8,0) not null comment '?H???w?????R?[?h'
853
  , InstructorName varchar(60) comment '?H???w??????'
854
  , InstructorCosts decimal(11,0) not null comment '?H???w???????^'
855
  , CreateDate date not null comment '????'
856
  , ConstructionTimes decimal(5,2) not null comment '?H???i?P??E???j'
857
  , ConstructionStart date not null comment '?_??H???J?n'
858
  , ConstructionEnd date not null comment '?_??H??????'
859
  , InstructorTimes decimal(5,2) not null comment '?w???????????'
860
  , SalaryFlg decimal(1,0) not null comment '???^?U????'
861
  , SalaryDays decimal(4,0) not null comment '?U??????'
862
  , A_SalaryFlg decimal(1,0) not null comment '???S??????^?U????'
863
  , A_SalaryDays decimal(4,0) not null comment '???S????U??????'
864
  , I_SalaryFlg decimal(1,0) not null comment '?w???????^?U????'
865
  , I_SalaryDays decimal(4,0) not null comment '?w?????U??????'
866
  , OrdersDecisionPrice decimal(12,0) not null comment '??????????z'
867
  , EntryDate datetime not null comment '?o?^???t'
868
  , UpdateDate datetime not null comment '?X?V???t'
869
  , constraint constructionbudget_PKC primary key (ConstructionCode)
870
) comment '?H???{?H?\?Z?f?[?^' ;
871

    
872
-- ?H???{?H?\?Z?f?[?^????
873
--* BackupToTempTable
874
drop table if exists constructionbudgetdetail cascade;
875

    
876
--* RestoreFromTempTable
877
create table constructionbudgetdetail (
878
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
879
  , GroupCount decimal(2,0) unsigned not null comment '?O???[?v???'
880
  , LineCount decimal(3,0) unsigned not null comment '?s???'
881
  , ComponentCode decimal(5,0) unsigned not null comment '?\???L?['
882
  , ItemCode decimal(5,0) unsigned not null comment '?H??L?['
883
  , FirstString varchar(120) comment '???????'
884
  , SecondString varchar(120) comment '?H?????e'
885
  , CompanyType decimal(1,0) not null comment '??????R?[?h?^?C?v'
886
  , CompanyCode decimal(8,0) not null comment '??????R?[?h'
887
  , CompanyName varchar(120) comment '?????????'
888
  , EstimatePrice decimal(12,0) not null comment '??Z????????z'
889
  , NegotiationPrice decimal(12,0) not null comment '??Z????????z'
890
  , OrderDesiredAmount decimal(12,0) not null comment '??????]???z'
891
  , ExecutionAmount decimal(12,0) not null comment '???s???z'
892
  , AmountConfigRate decimal(5,2) not null comment '???z?\????'
893
  , NegotiateFlg decimal(1,0) not null comment '?????????t???O'
894
  , EntryDate datetime not null comment '?o?^???t'
895
  , UpdateDate datetime not null comment '?X?V???t'
896
  , constraint constructionbudgetdetail_PKC primary key (ConstructionCode,GroupCount,LineCount)
897
) comment '?H???{?H?\?Z?f?[?^????' ;
898

    
899
-- ?H??}?X?^
900
--* BackupToTempTable
901
drop table if exists constructionitemmaster cascade;
902

    
903
--* RestoreFromTempTable
904
create table constructionitemmaster (
905
  ItemCode decimal(5,0) unsigned not null comment '?H??L?['
906
  , DisplayOrder decimal(5,0) unsigned not null comment '?\????'
907
  , ItemName varchar(120) not null comment '?H????'
908
  , SubItemsFlg decimal(1,0) comment '???????t???O'
909
  , MyExpensesFlg decimal(1,0) not null comment '????o??t???O'
910
  , DeleteFlg decimal(1,0) not null comment '???t???O'
911
  , EntryDate datetime not null comment '?o?^???t'
912
  , UpdateDate datetime not null comment '?X?V???t'
913
  , constraint constructionitemmaster_PKC primary key (ItemCode)
914
) comment '?H??}?X?^' ;
915

    
916
-- ?H???????f?[?^
917
--* BackupToTempTable
918
drop table if exists constructionledger cascade;
919

    
920
--* RestoreFromTempTable
921
create table constructionledger (
922
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
923
  , ConstructionPeriod decimal(4,0) unsigned not null comment '?????'
924
  , CreatorCode decimal(8,0) comment '????R?[?h'
925
  , CreatorName varchar(60) comment '?????'
926
  , CreateDate date not null comment '????'
927
  , ConstructionTimes decimal(5,2) not null comment '?H???i?P??E???j'
928
  , ConstructionStart date not null comment '?_??H???J?n'
929
  , ConstructionEnd date not null comment '?_??H??????'
930
  , OrdersDecisionPrice decimal(14,0) not null comment '??????????z'
931
  , CompanyExpenses decimal(10,0) not null comment '???o???v'
932
  , DepartmentExpenses decimal(10,0) not null comment '?????o???v'
933
  , SalesExpenses decimal(10,0) not null comment '?c??o???v'
934
  , TotalPayment decimal(10,0) not null comment '???x???z'
935
  , GrossProfit decimal(10,0) not null comment '?e??'
936
  , Allowance decimal(10,0) not null comment '???^'
937
  , NetProfit decimal(10,0) not null comment '?????v'
938
  , ComplateFlg decimal(1,0) not null comment '????????t???O'
939
  , IntegrationFlg decimal(1,0) not null comment '????z??Z?t???O'
940
  , EntryDate datetime not null comment '?o?^???t'
941
  , UpdateDate datetime not null comment '?X?V???t'
942
  , constraint constructionledger_PKC primary key (ConstructionCode)
943
) comment '?H???????f?[?^' ;
944

    
945
create index constructionledger_Index1
946
  on constructionledger(ConstructionStart);
947

    
948
create index constructionledger_Index2
949
  on constructionledger(ConstructionEnd);
950

    
951
-- ?H??????????f?[?^
952
--* BackupToTempTable
953
drop table if exists constructionledgerdetail cascade;
954

    
955
--* RestoreFromTempTable
956
create table constructionledgerdetail (
957
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
958
  , GroupCount decimal(2,0) unsigned not null comment '?O???[?v???'
959
  , LineCount decimal(4,0) unsigned not null comment '?s???'
960
  , ComponentCode decimal(5,0) unsigned not null comment '?\???L?['
961
  , ItemCode decimal(5,0) unsigned not null comment '?H??L?['
962
  , FirstString varchar(120) comment '???????'
963
  , SecondString varchar(120) comment '?H?????e'
964
  , CompanyType decimal(1,0) not null comment '??????R?[?h?^?C?v'
965
  , CompanyCode decimal(8,0) not null comment '??????R?[?h'
966
  , CompanyName varchar(120) comment '?????????'
967
  , EstimatePrice decimal(12,0) not null comment '?\?Z?i????j???z'
968
  , ExecutionAmount decimal(12,0) not null comment '???s???z'
969
  , AmountConfigRate decimal(5,2) not null comment '???z?\????'
970
  , PaymentBurden decimal(12,0) not null comment '?x????U?z'
971
  , FixDataFlg decimal(1,0) not null comment '???f?[?^?t???O'
972
  , IndependentFlg decimal(1,0) not null comment '????f?[?^?t???O'
973
  , FluctuationFlg decimal(1,0) not null comment '?????f?[?^?t???O'
974
  , SalaryFlg decimal(1,0) not null comment '???^?U????'
975
  , SalaryDays decimal(4,0) not null comment '???^?U??????'
976
  , OperatingFlg decimal(1,0) not null comment '?S?????t???O'
977
  , SourceCode decimal(10,0) unsigned not null comment '???H?????'
978
  , JoinTitleFlg decimal(1,0) not null comment '?H??????^?C?g??'
979
  , SalaryOnRegist decimal(12,0) not null comment '?o?^?????z???^'
980
  , PurchaseOrderFlg decimal(2,0) not null comment '?????????s?t???O'
981
  , DetailCount decimal(4,0) unsigned not null comment '??????'
982
  , InvalidLine decimal(1,0) not null comment '?????s'
983
  , EntryDate datetime not null comment '?o?^???t'
984
  , UpdateDate datetime not null comment '?X?V???t'
985
  , constraint constructionledgerdetail_PKC primary key (ConstructionCode,GroupCount,LineCount)
986
) comment '?H??????????f?[?^' ;
987

    
988
create index LedgerDetail_Index01
989
  on constructionledgerdetail(ConstructionCode);
990

    
991
create index LedgerDetail_Index02
992
  on constructionledgerdetail(GroupCount);
993

    
994
create index LedgerDetail_Index03
995
  on constructionledgerdetail(LineCount);
996

    
997
create index LedgerDetail_Index04
998
  on constructionledgerdetail(SourceCode);
999

    
1000
create index LedgerDetail_Index05
1001
  on constructionledgerdetail(DetailCount);
1002

    
1003
create index LedgerDetail_Index06
1004
  on constructionledgerdetail(SalaryFlg);
1005

    
1006
create index LedgerDetail_Index07
1007
  on constructionledgerdetail(CompanyCode);
1008

    
1009
-- ?H?????????s?f?[?^
1010
--* BackupToTempTable
1011
drop table if exists constructionledgerexcute cascade;
1012

    
1013
--* RestoreFromTempTable
1014
create table constructionledgerexcute (
1015
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
1016
  , GroupCount decimal(2,0) unsigned not null comment '?O???[?v???'
1017
  , LineCount decimal(4,0) unsigned not null comment '?s???'
1018
  , ColumnCount decimal(3,0) not null comment '????'
1019
  , PaymentAmount decimal(12,0) not null comment '?x?????z'
1020
  , TargetMonth date not null comment '???N??'
1021
  , EntryDate datetime not null comment '?o?^???t'
1022
  , UpdateDate datetime not null comment '?X?V???t'
1023
  , constraint constructionledgerexcute_PKC primary key (ConstructionCode,GroupCount,LineCount,ColumnCount)
1024
) comment '?H?????????s?f?[?^' ;
1025

    
1026
create index LedgerExcute_Index1
1027
  on constructionledgerexcute(ConstructionCode,TargetMonth,GroupCount,LineCount);
1028

    
1029
-- ?H???????N???
1030
--* BackupToTempTable
1031
drop table if exists constructionlink cascade;
1032

    
1033
--* RestoreFromTempTable
1034
create table constructionlink (
1035
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
1036
  , FluctuationCode decimal(10,0) not null comment '?q?H?????'
1037
  , LinkType decimal(1,0) not null comment '?????N???'
1038
  , EntryDate datetime not null comment '?o?^???t'
1039
  , UpdateDate datetime not null comment '?X?V???t'
1040
  , constraint constructionlink_PKC primary key (ConstructionCode,FluctuationCode)
1041
) comment '?H???????N???' ;
1042

    
1043
create index ConstructionLink_Index1
1044
  on constructionlink(ConstructionCode);
1045

    
1046
create index ConstructionLink_Index2
1047
  on constructionlink(FluctuationCode);
1048

    
1049
create index ConstructionLink_Index3
1050
  on constructionlink(LinkType);
1051

    
1052
-- ?H????????
1053
--* BackupToTempTable
1054
drop table if exists constructionmaterialinfo cascade;
1055

    
1056
--* RestoreFromTempTable
1057
create table constructionmaterialinfo (
1058
  CONSTRUCTIONCODE int(10) unsigned default 0 not null comment '?H?????'
1059
  , MATERIALITEMCODE smallint(5) unsigned default 0 not null comment '????i??R?[?h'
1060
  , PROCESSDATE datetime default '0000-00-00 00:00:00' not null comment '?????N????'
1061
  , RENTCOUNT smallint(5) unsigned comment '??o??'
1062
  , REPAYCOUNT smallint(5) unsigned comment '??p??'
1063
  , JUNKCOUNT smallint(5) unsigned comment '?j????'
1064
  , COMPLETEFLG tinyint(3) unsigned comment '?????t???O'
1065
  , ENTRYDATE datetime comment '?o?^???t'
1066
  , UPDATEDATE datetime comment '?X?V???t'
1067
  , constraint constructionmaterialinfo_PKC primary key (CONSTRUCTIONCODE,MATERIALITEMCODE,PROCESSDATE)
1068
) comment '?H????????' ;
1069

    
1070
-- ????i?????t?f?[?^
1071
--* BackupToTempTable
1072
drop table if exists constructionprogressdate cascade;
1073

    
1074
--* RestoreFromTempTable
1075
create table constructionprogressdate (
1076
  ConstructionCode decimal(10,0) not null comment '?H?????'
1077
  , ConstructionStatusFlg decimal(2,0) not null comment '???H?????'
1078
  , PreviousStatusFlg decimal(2,0) comment '??X?O???'
1079
  , ChangeDate datetime not null comment '?????t'
1080
  , ChangePersonCode decimal(8,0) not null comment '???S????'
1081
  , EntryDate datetime not null comment '?o?^???t'
1082
  , UpdateDate datetime not null comment '?X?V???t'
1083
  , constraint constructionprogressdate_PKC primary key (ConstructionCode,ChangeDate)
1084
) comment '????i?????t?f?[?^' ;
1085

    
1086
create index ConstrProg_Index1
1087
  on constructionprogressdate(ConstructionCode);
1088

    
1089
create index ConstrProg_Index2
1090
  on constructionprogressdate(ConstructionStatusFlg);
1091

    
1092
create index ConstrProg_Index3
1093
  on constructionprogressdate(ChangeDate);
1094

    
1095
-- ???}?X?^
1096
--* BackupToTempTable
1097
drop table if exists constructionspecmaster cascade;
1098

    
1099
--* RestoreFromTempTable
1100
create table constructionspecmaster (
1101
  ItemCode decimal(5,0) unsigned not null comment '?H??L?['
1102
  , SpecCode decimal(5,0) unsigned not null comment '???L?['
1103
  , DisplayOrder decimal(5,0) unsigned not null comment '?\????'
1104
  , ItemName varchar(120) comment '??????'
1105
  , SpecName varchar(120) comment '??????'
1106
  , UnitName varchar(30) comment '?P?????'
1107
  , UnitPrice decimal(9,2) not null comment '?P??'
1108
  , DeleteFlg decimal(1,0) not null comment '???t???O'
1109
  , EntryDate datetime not null comment '?o?^???t'
1110
  , UpdateDate datetime not null comment '?X?V???t'
1111
  , constraint constructionspecmaster_PKC primary key (ItemCode,SpecCode)
1112
) comment '???}?X?^' ;
1113

    
1114
create index ConstructionSpecMaster_Index1
1115
  on constructionspecmaster(DisplayOrder);
1116

    
1117
-- ???P???}?X?^
1118
--* BackupToTempTable
1119
drop table if exists constructionspecunitprice cascade;
1120

    
1121
--* RestoreFromTempTable
1122
create table constructionspecunitprice (
1123
  ConstructionTypeCode mediumint(8) unsigned not null comment '?H?????R?[?h'
1124
  , ComponentCode decimal(5,0) unsigned not null comment '?\???L?['
1125
  , ItemCode decimal(5,0) unsigned not null comment '?H??L?['
1126
  , SpecCode decimal(5,0) unsigned not null comment '???L?['
1127
  , UnitPrice decimal(9,2) not null comment '?P??'
1128
  , EntryDate datetime not null comment '?o?^???t'
1129
  , UpdateDate datetime not null comment '?X?V???t'
1130
  , constraint constructionspecunitprice_PKC primary key (ConstructionTypeCode,ComponentCode,ItemCode,SpecCode)
1131
) comment '???P???}?X?^' ;
1132

    
1133
create index constructionspecunitprice_Index1
1134
  on constructionspecunitprice(ConstructionTypeCode,ComponentCode,ItemCode);
1135

    
1136
-- ?H?????}?X?^
1137
--* BackupToTempTable
1138
drop table if exists constructiontypemaster cascade;
1139

    
1140
--* RestoreFromTempTable
1141
create table constructiontypemaster (
1142
  TypeCode decimal(5,0) unsigned not null comment '?H?????R?[?h'
1143
  , DisplayOrder decimal(5,0) unsigned not null comment '?\????'
1144
  , NameString varchar(100) not null comment '????'
1145
  , PublicFlg decimal(1,0) not null comment '?????t???O'
1146
  , RepairFlg decimal(1,0) not null comment '?V?z?E???C?t???O'
1147
  , SecRank decimal(1,0) not null comment '?????????N'
1148
  , ExpensesLink decimal(1,0) not null comment '?o??g?p??'
1149
  , CompanyProp decimal(1,0) not null comment '????H????'
1150
  , DeleteFlg decimal(1,0) not null comment '???t???O'
1151
  , EntryDate datetime not null comment '?o?^???t'
1152
  , UpdateDate datetime not null comment '?X?V???t'
1153
  , constraint constructiontypemaster_PKC primary key (TypeCode)
1154
) comment '?H?????}?X?^' ;
1155

    
1156
-- ?????f?[?^
1157
--* BackupToTempTable
1158
drop table if exists consumptiontax cascade;
1159

    
1160
--* RestoreFromTempTable
1161
create table consumptiontax (
1162
  StartDate date not null comment '?g?p?J?n?N????'
1163
  , ComplateDate date comment '?g?p?I???N????'
1164
  , TaxRate decimal(4,2) default '0.00' not null comment '??????'
1165
  , DeleteFlg decimal(1,0) comment '???t???O'
1166
  , EntryDate datetime comment '?o?^?N????'
1167
  , UpdateDate datetime comment '?X?V?N????'
1168
  , constraint consumptiontax_PKC primary key (StartDate)
1169
) comment '?????f?[?^' ;
1170

    
1171
-- ?????o?[?f?[?^
1172
--* BackupToTempTable
1173
drop table if exists costdataofdepartment cascade;
1174

    
1175
--* RestoreFromTempTable
1176
create table costdataofdepartment (
1177
  DepartmentCode decimal(5,0) unsigned not null comment '?????R?[?h'
1178
  , ConstrYear smallint(5) unsigned not null comment '?H???????E?N??'
1179
  , SeqNo decimal(5,0) unsigned not null comment '?f?[?^???'
1180
  , CostDate date not null comment '?????t'
1181
  , DepartmentName varchar(100) not null comment '??????'
1182
  , SuppliersCode decimal(8,0) unsigned not null comment '?o?[??R?[?h'
1183
  , SuppliersName varchar(120) comment '?o?[??'
1184
  , PaymentContent varchar(100) comment '?o?[???e'
1185
  , SendReceiveFlg decimal(1,0) not null comment '?o?[?t???O'
1186
  , EntryPrice decimal(12,0) not null comment '???z?i????j'
1187
  , EntryTax decimal(12,0) not null comment '???z?i????j'
1188
  , Coment varchar(100) comment '???l'
1189
  , EntryDate datetime not null comment '?o?^???t'
1190
  , UpdateDate datetime not null comment '?X?V???t'
1191
  , constraint costdataofdepartment_PKC primary key (DepartmentCode,ConstrYear,SeqNo)
1192
) comment '?????o?[?f?[?^' ;
1193

    
1194
-- ?S??????o??f?[?^
1195
--* BackupToTempTable
1196
drop table if exists costdataofperson cascade;
1197

    
1198
--* RestoreFromTempTable
1199
create table costdataofperson (
1200
  PersonCode decimal(8,0) unsigned not null comment '?S????R?[?h'
1201
  , ActionDate date not null comment '?????t'
1202
  , DataType decimal(1,0) not null comment '?f?[?^??'
1203
  , DataAddCount decimal(5,0) unsigned not null comment '?f?[?^??????'
1204
  , TargetMonth varchar(7) not null comment '???N??'
1205
  , ConstructionCode decimal(10,0) unsigned comment '?H???R?[?h'
1206
  , SuppliersCode decimal(5,0) unsigned not null comment '?x????R?[?h'
1207
  , SuppliersName varchar(120) comment '?x??????'
1208
  , PaymentContent varchar(60) comment '?x?????e'
1209
  , PaymentType decimal(1,0) not null comment '?x?????@?t???O'
1210
  , EntryPrice decimal(12,0) not null comment '???z?i????j'
1211
  , EntryPriceInTax decimal(12,0) not null comment '???z?i????j'
1212
  , SlipNumber varchar(12) comment '?`?[???'
1213
  , ComplateFlg decimal(1,0) not null comment '???????t???O'
1214
  , ApprovalFlg decimal(1,0) not null comment '???F?t???O'
1215
  , EntryDate datetime not null comment '?o?^???t'
1216
  , UpdateDate datetime not null comment '?X?V???t'
1217
  , constraint costdataofperson_PKC primary key (PersonCode,ActionDate,DataType,DataAddCount)
1218
) comment '?S??????o??f?[?^' ;
1219

    
1220
create index CostDataOfPerson_Index1
1221
  on costdataofperson(TargetMonth);
1222

    
1223
create index CostDataOfPerson_Index2
1224
  on costdataofperson(ConstructionCode);
1225

    
1226
-- ??????o?^?\???f?[?^
1227
--* BackupToTempTable
1228
drop table if exists costomerregist cascade;
1229

    
1230
--* RestoreFromTempTable
1231
create table costomerregist (
1232
  CreatePersonCode decimal(8,0) unsigned not null comment '?\??????'
1233
  , CreateDate date not null comment '????'
1234
  , SeqNo decimal(2,0) not null comment '?L?[?A??'
1235
  , DataMode decimal(1,0) not null comment '?f?[?^??'
1236
  , SourceCotegory decimal(5,0) unsigned not null comment '???????'
1237
  , SourceCode decimal(5,0) unsigned not null comment '??????R?[?h'
1238
  , PetitionPeriod decimal(4,0) unsigned not null comment '?????'
1239
  , OrderFlg decimal(1,0) not null comment '?@?l?c??E??l?t???O'
1240
  , CorporateStatusName varchar(100) comment '?@?l?i????'
1241
  , CorporateStatusPoint decimal(1,0) comment '?@?l?i?????u'
1242
  , OrderersName1 varchar(60) not null comment '???????1'
1243
  , OrderersName2 varchar(60) comment '????????Q'
1244
  , DepartmentName varchar(60) comment '??????'
1245
  , PersonName varchar(60) comment '?S?????'
1246
  , ZipCode varchar(8) comment '?X????'
1247
  , Address1 varchar(60) comment '?Z???P'
1248
  , Address2 varchar(60) comment '?Z??2'
1249
  , Address3 varchar(60) comment '?Z??3'
1250
  , PhoneNumber varchar(13) comment '?d?b???'
1251
  , FaxNumber varchar(13) comment 'FAX???'
1252
  , MailAddress varchar(257) comment '???[???A?h???X'
1253
  , Note varchar(300) comment '???l'
1254
  , OrderCotegory decimal(5,0) unsigned not null comment '???????'
1255
  , OrderDate decimal(6,0) unsigned not null comment '?\????'
1256
  , OrderNo decimal(2,0) unsigned not null comment '?\????t???'
1257
  , CreateDepartmentCode decimal(5,0) unsigned not null comment '?\???????R?[?h'
1258
  , CreateDepartmentName varchar(60) comment '?\????????'
1259
  , EntryDate datetime not null comment '?o?^???t'
1260
  , UpdateDate datetime not null comment '?X?V???t'
1261
  , constraint costomerregist_PKC primary key (CreatePersonCode,CreateDate,SeqNo)
1262
) comment '??????o?^?\???f?[?^' ;
1263

    
1264
create index CostomerRegist_Index1
1265
  on costomerregist(PetitionPeriod);
1266

    
1267
create index CostomerRegist_Index2
1268
  on costomerregist(CreatePersonCode);
1269

    
1270
create index CostomerRegist_Index3
1271
  on costomerregist(CreateDepartmentCode);
1272

    
1273
-- ????f?[?^
1274
--* BackupToTempTable
1275
drop table if exists dailydataconstruction cascade;
1276

    
1277
--* RestoreFromTempTable
1278
create table dailydataconstruction (
1279
  PersonCode decimal(8,0) unsigned not null comment '?S????R?[?h'
1280
  , DailyDataDate date not null comment '???????'
1281
  , ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
1282
  , Weather varchar(60) comment '?V?C'
1283
  , EntryDate datetime not null comment '?o?^???t'
1284
  , UpdateDate datetime not null comment '?X?V???t'
1285
  , constraint dailydataconstruction_PKC primary key (PersonCode,DailyDataDate,ConstructionCode)
1286
) comment '????f?[?^' ;
1287

    
1288
create index DailyDataConstruction_Index1
1289
  on dailydataconstruction(PersonCode);
1290

    
1291
create index DailyDataConstruction_Index2
1292
  on dailydataconstruction(DailyDataDate);
1293

    
1294
create index DailyDataConstruction_Index3
1295
  on dailydataconstruction(ConstructionCode);
1296

    
1297
-- ????f?[?^ (????)
1298
--* BackupToTempTable
1299
drop table if exists dailydatadetail cascade;
1300

    
1301
--* RestoreFromTempTable
1302
create table dailydatadetail (
1303
  PersonCode decimal(8,0) unsigned not null comment '?S????R?[?h'
1304
  , DailyDataDate date not null comment '???????'
1305
  , ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
1306
  , SeqNo decimal(3,0) unsigned not null comment '????s???'
1307
  , JobCategoryCode decimal(5,0) not null comment '?E??L?['
1308
  , CompanyCode decimal(8,0) not null comment '??????R?[?h'
1309
  , TodayHeadCount decimal(4,1) not null comment '?????l????'
1310
  , TotalHeadCount decimal(5,1) not null comment '??v?l????'
1311
  , TodayWork varchar(100) comment '?????????e'
1312
  , NextdayWork varchar(100) comment '?????????e'
1313
  , NextdayHeadCount decimal(4,1) not null comment '?????l????'
1314
  , EntryDate datetime not null comment '?o?^???t'
1315
  , UpdateDate datetime not null comment '?X?V???t'
1316
  , constraint dailydatadetail_PKC primary key (PersonCode,DailyDataDate,ConstructionCode,SeqNo)
1317
) comment '????f?[?^ (????)' ;
1318

    
1319
create index DailyDataDetail_Index
1320
  on dailydatadetail(PersonCode,DailyDataDate,ConstructionCode);
1321

    
1322
-- ????f?[?^ (??????)
1323
--* BackupToTempTable
1324
drop table if exists dailydatafield cascade;
1325

    
1326
--* RestoreFromTempTable
1327
create table dailydatafield (
1328
  PersonCode decimal(8,0) unsigned not null comment '????R?[?h'
1329
  , DailyDataDate date not null comment '???????'
1330
  , ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
1331
  , SeqNo decimal(3,0) unsigned not null comment '????s???'
1332
  , PatrolTime datetime not null comment '?????'
1333
  , ContentsText varchar(200) comment '???e'
1334
  , EntryDate datetime not null comment '?o?^???t'
1335
  , UpdateDate datetime not null comment '?X?V???t'
1336
  , constraint dailydatafield_PKC primary key (PersonCode,DailyDataDate,ConstructionCode,SeqNo)
1337
) comment '????f?[?^ (??????)' ;
1338

    
1339
create index DailyDataField_Index
1340
  on dailydatafield(PersonCode,DailyDataDate,ConstructionCode);
1341

    
1342
-- ????f?[?^ (????)
1343
--* BackupToTempTable
1344
drop table if exists dailydatamaterials cascade;
1345

    
1346
--* RestoreFromTempTable
1347
create table dailydatamaterials (
1348
  PersonCode decimal(8,0) unsigned not null comment '????R?[?h'
1349
  , DailyDataDate date not null comment '???????'
1350
  , ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
1351
  , SeqNo decimal(3,0) unsigned not null comment '????s???'
1352
  , Materials varchar(100) comment '?????'
1353
  , Quantity varchar(100) comment '????'
1354
  , Production varchar(100) comment '??????'
1355
  , Delivery varchar(100) comment '?[?????'
1356
  , QualityControl varchar(100) comment '?i?????????'
1357
  , EntryDate datetime not null comment '?o?^???t'
1358
  , UpdateDate datetime not null comment '?X?V???t'
1359
  , constraint dailydatamaterials_PKC primary key (PersonCode,DailyDataDate,ConstructionCode,SeqNo)
1360
) comment '????f?[?^ (????)' ;
1361

    
1362
create index DailyDataMaterials_Index
1363
  on dailydatamaterials(PersonCode,DailyDataDate,ConstructionCode);
1364

    
1365
-- ????f?[?^ (??????w??)
1366
--* BackupToTempTable
1367
drop table if exists dailydatasubcontractors cascade;
1368

    
1369
--* RestoreFromTempTable
1370
create table dailydatasubcontractors (
1371
  PersonCode decimal(8,0) unsigned not null comment '????R?[?h'
1372
  , DailyDataDate date not null comment '???????'
1373
  , ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
1374
  , SeqNo decimal(3,0) unsigned not null comment '????s???'
1375
  , Attendee varchar(100) comment '?o???'
1376
  , ContentsText varchar(200) comment '???e'
1377
  , EntryDate datetime not null comment '?o?^???t'
1378
  , UpdateDate datetime not null comment '?X?V???t'
1379
  , constraint dailydatasubcontractors_PKC primary key (PersonCode,DailyDataDate,ConstructionCode,SeqNo)
1380
) comment '????f?[?^ (??????w??)' ;
1381

    
1382
create index DailyDataSubcontractors_Index
1383
  on dailydatasubcontractors(PersonCode,DailyDataDate,ConstructionCode);
1384

    
1385
-- ????f?[?^ (???)
1386
--* BackupToTempTable
1387
drop table if exists dailydatavehicles cascade;
1388

    
1389
--* RestoreFromTempTable
1390
create table dailydatavehicles (
1391
  PersonCode decimal(8,0) unsigned not null comment '????R?[?h'
1392
  , DailyDataDate date not null comment '???????'
1393
  , ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
1394
  , SeqNo decimal(3,0) unsigned not null comment '????s???'
1395
  , Model varchar(100) comment '?@??'
1396
  , Performance varchar(100) comment '???\'
1397
  , Owner varchar(100) comment '???L???'
1398
  , Driver varchar(100) comment '?????^?]??'
1399
  , StartWorkingTime datetime not null comment '??????J?n'
1400
  , EndWorkingTime datetime not null comment '??????I??'
1401
  , EntryDate datetime not null comment '?o?^???t'
1402
  , UpdateDate datetime not null comment '?X?V???t'
1403
  , constraint dailydatavehicles_PKC primary key (PersonCode,DailyDataDate,ConstructionCode,SeqNo)
1404
) comment '????f?[?^ (???)' ;
1405

1406
create index DailyDataVehicles_Index
1407
  on dailydatavehicles(PersonCode,DailyDataDate,ConstructionCode);
1408

1409
-- ???}?X?^
1410
--* BackupToTempTable
1411
drop table if exists daymaster cascade;
1412

1413
--* RestoreFromTempTable
1414
create table daymaster (
1415
  days smallint(6) not null comment '??'
1416
  , constraint daymaster_PKC primary key (days)
1417
) comment '???}?X?^' ;
1418

1419
-- ?????}?X?^
1420
--* BackupToTempTable
1421
drop table if exists deadlinemaster cascade;
1422

1423
--* RestoreFromTempTable
1424
create table deadlinemaster (
1425
  LABOURKIND decimal(1,0) default '0' not null comment '??????'
1426
  , DEADLINE decimal(2,0) comment '????'
1427
  , PAYDAY decimal(2,0) comment '?x????'
1428
  , NOTE varchar(120) comment '???l'
1429
  , DELETEFLG decimal(1,0) comment '???t???O'
1430
  , ENTRYDATE datetime comment '?o?^???t'
1431
  , UPDATEDATE datetime comment '?X?V???t'
1432
  , constraint deadlinemaster_PKC primary key (LABOURKIND)
1433
) comment '?????}?X?^' ;
1434

1435
-- ?????o???}?X?^
1436
--* BackupToTempTable
1437
drop table if exists departmentexpensesmaster cascade;
1438

1439
--* RestoreFromTempTable
1440
create table departmentexpensesmaster (
1441
  DepartmentCode decimal(5,0) unsigned not null comment '?????R?[?h'
1442
  , ExpensesPeriod smallint(6) not null comment '?????'
1443
  , NameCode decimal(5,0) unsigned not null comment '?o??R?[?h'
1444
  , NameString varchar(100) not null comment '????'
1445
  , DisplayOrder decimal(5,0) unsigned not null comment '?\????'
1446
  , ExpensesRaito decimal(4,2) not null comment '?o??'
1447
  , DeleteFlg decimal(1,0) not null comment '???t???O'
1448
  , EntryDate datetime not null comment '?o?^???t'
1449
  , UpdateDate datetime not null comment '?X?V???t'
1450
  , constraint departmentexpensesmaster_PKC primary key (DepartmentCode,ExpensesPeriod,NameCode)
1451
) comment '?????o???}?X?^' ;
1452

1453
-- ?????}?X?^
1454
--* BackupToTempTable
1455
drop table if exists departmentmaster cascade;
1456

1457
--* RestoreFromTempTable
1458
create table departmentmaster (
1459
  DepartmentCode decimal(5,0) unsigned not null comment '?????R?[?h'
1460
  , DisplayOrder decimal(5,0) unsigned not null comment '?\????'
1461
  , DepartmentString varchar(100) not null comment '??????'
1462
  , ActionScheduleFlg decimal(1,0) not null comment '?s???\??\???t???O'
1463
  , StaffAssignFlg decimal(1,0) not null comment '?l???z?u?\???t???O'
1464
  , StartDate datetime not null comment '?J?n???t'
1465
  , CompDate datetime not null comment '?I?????t'
1466
  , DeleteFlg decimal(1,0) not null comment '???t???O'
1467
  , EntryDate datetime not null comment '?o?^???t'
1468
  , UpdateDate datetime not null comment '?X?V???t'
1469
  , constraint departmentmaster_PKC primary key (DepartmentCode)
1470
) comment '?????}?X?^' ;
1471

1472
create index DepartmentMaster_index1
1473
  on departmentmaster(DisplayOrder);
1474

1475
-- ?????m?F???F?f?[?^
1476
--* BackupToTempTable
1477
drop table if exists depositapprovalinfo cascade;
1478

1479
--* RestoreFromTempTable
1480
create table depositapprovalinfo (
1481
  ORDERERSDIVISION decimal(5,0) not null comment '???????'
1482
  , ORDERERSCODE decimal(5,0) not null comment '??????R?[?h'
1483
  , TARGETDATE decimal(6,0) not null comment '???N??'
1484
  , SEQNO decimal(3,0) not null comment '?A??'
1485
  , LINECOUNT decimal(3,0) not null comment '?s???'
1486
  , APPROVALNO decimal(3,0) not null comment '???F????'
1487
  , APPROVALPERSON decimal(8,0) comment '???F??R?[?h'
1488
  , APPROVALPERSONNAME varchar(20) comment '???F???'
1489
  , APPROVALAUTHORITY decimal(1,0) comment '???F??????'
1490
  , APPROVALDATE date comment '???F???t'
1491
  , ENTRYDATE datetime comment '?o?^???t'
1492
  , UPDATEDATE datetime comment '?X?V???t'
1493
  , constraint depositapprovalinfo_PKC primary key (ORDERERSDIVISION,ORDERERSCODE,TARGETDATE,SEQNO,LINECOUNT,APPROVALNO)
1494
) comment '?????m?F???F?f?[?^' ;
1495

1496
-- ?????f?[?^
1497
--* BackupToTempTable
1498
drop table if exists depositdata cascade;
1499

1500
--* RestoreFromTempTable
1501
create table depositdata (
1502
  ORDERERSDIVISION decimal(5,0) not null comment '???????'
1503
  , ORDERERSCODE decimal(5,0) not null comment '??????R?[?h'
1504
  , TARGETDATE decimal(6,0) not null comment '???N??'
1505
  , SEQNO decimal(3,0) not null comment '?A??'
1506
  , BUSINESSPERIOD decimal(4,0) comment '?c???'
1507
  , DEPOSITDATE date comment '??????'
1508
  , DEPOSITAMOUNT decimal(12,0) comment '???????z'
1509
  , DEPOSITAMOUNTCASH decimal(10,0) comment '???????z?i?????j'
1510
  , DEPOSITAMOUNTBILL decimal(10,0) comment '???????z?i??`?j'
1511
  , FEES decimal(10,0) comment '????'
1512
  , OTHERADJUSTMENTS decimal(10,0) comment '????'
1513
  , CNSTRPRICE decimal(10,0) comment '?????'
1514
  , REMAININGCLEARING decimal(10,0) comment '?????c???z'
1515
  , DEPOSITPERSONCODE decimal(8,0) not null comment '?????S????R?[?h'
1516
  , NOTE varchar(120) comment '???l'
1517
  , ENTRYDATE datetime comment '?o?^???t'
1518
  , UPDATEDATE datetime comment '?X?V???t'
1519
  , constraint depositdata_PKC primary key (ORDERERSDIVISION,ORDERERSCODE,TARGETDATE,SEQNO)
1520
) comment '?????f?[?^' ;
1521

1522
-- ????????f?[?^
1523
--* BackupToTempTable
1524
drop table if exists depositdatadetail cascade;
1525

1526
--* RestoreFromTempTable
1527
create table depositdatadetail (
1528
  ORDERERSDIVISION decimal(5,0) not null comment '???????'
1529
  , ORDERERSCODE decimal(5,0) not null comment '??????R?[?h'
1530
  , TARGETDATE decimal(6,0) not null comment '???N??'
1531
  , REQUESTNO decimal(10,0) not null comment '????No'
1532
  , ORDERNO decimal(2,0) not null comment '??t???'
1533
  , DEPOSITMONTH decimal(6,0) not null comment '?????N??'
1534
  , SEQNO decimal(3,0) not null comment '?????A??'
1535
  , DEPOSITAMOUNT decimal(10,0) comment '???????z?i??????j'
1536
  , TAXAMOUNT decimal(10,0) comment '?????'
1537
  , DISCOUNTAMOUNT decimal(10,0) comment '?l???????z'
1538
  , CNSTRPRICE decimal(10,0) comment '?????'
1539
  , FEES decimal(10,0) comment '????'
1540
  , OTHERADJUSTMENTS decimal(10,0) comment '?????'
1541
  , DIFFERENCEAMOUNT decimal(10,0) comment '????'
1542
  , CONFIRMATIONPERSONCODE decimal(8,0) comment '?m?F?S????R?[?h'
1543
  , CONFIRMATIONDATE date comment '?S????m?F???t'
1544
  , CONFIRMATIONENDFLG decimal(1,0) comment '?m?F?????t???O'
1545
  , NOTE varchar(120) comment '???l'
1546
  , ENTRYDATE datetime comment '?o?^???t'
1547
  , UPDATEDATE datetime comment '?X?V???t'
1548
  , constraint depositdatadetail_PKC primary key (ORDERERSDIVISION,ORDERERSCODE,TARGETDATE,REQUESTNO,ORDERNO)
1549
) comment '????????f?[?^' ;
1550

1551
create index depositdatadetail_Index1
1552
  on depositdatadetail(TARGETDATE);
1553

1554
create index depositdatadetail_Index2
1555
  on depositdatadetail(ORDERERSDIVISION,ORDERERSCODE,DEPOSITMONTH,SEQNO);
1556

1557
-- ???}?X?^
1558
--* BackupToTempTable
1559
drop table if exists divisionmaster cascade;
1560

1561
--* RestoreFromTempTable
1562
create table divisionmaster (
1563
  DivisionCode decimal(5,0) unsigned not null comment '???R?[?h'
1564
  , NameCode decimal(5,0) unsigned not null comment '????R?[?h'
1565
  , DisplayOrder decimal(5,0) unsigned not null comment '?\????'
1566
  , NameString varchar(100) not null comment '????'
1567
  , DeleteFlg decimal(1,0) not null comment '???t???O'
1568
  , EntryDate datetime not null comment '?o?^???t'
1569
  , UpdateDate datetime not null comment '?X?V???t'
1570
  , constraint divisionmaster_PKC primary key (DivisionCode,NameCode)
1571
) comment '???}?X?^' ;
1572

1573
-- ??Z?\?Z???f?[?^
1574
--* BackupToTempTable
1575
drop table if exists estimatebudget cascade;
1576

1577
--* RestoreFromTempTable
1578
create table estimatebudget (
1579
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
1580
  , ConstructionTime decimal(5,2) unsigned not null comment '?H??'
1581
  , IntegratedCode decimal(8,0) not null comment '??Z??'
1582
  , DataCreateDate datetime not null comment '?f?[?^??????'
1583
  , RetValue1 decimal(12,0) not null comment '?\???i'
1584
  , RetValue2 decimal(12,0) not null comment '????H????'
1585
  , RetValue3 decimal(12,0) not null comment '????????????'
1586
  , RetValue4 decimal(12,0) not null comment '????????????'
1587
  , RetPercent decimal(5,2) not null comment '???????'
1588
  , EntryDate datetime not null comment '?o?^???t'
1589
  , UpdateDate datetime not null comment '?X?V???t'
1590
  , constraint estimatebudget_PKC primary key (ConstructionCode)
1591
) comment '??Z?\?Z???f?[?^' ;
1592

1593
-- ??Z?\?Z????f?[?^????
1594
--* BackupToTempTable
1595
drop table if exists estimatebudgetdetail cascade;
1596

1597
--* RestoreFromTempTable
1598
create table estimatebudgetdetail (
1599
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
1600
  , GroupCount decimal(2,0) unsigned not null comment '?O???[?v???'
1601
  , LineCount decimal(3,0) unsigned not null comment '?s???'
1602
  , ComponentCode decimal(5,0) unsigned not null comment '?\???L?['
1603
  , ItemCode decimal(5,0) unsigned comment '?H??L?['
1604
  , CompanyCode decimal(8,0) not null comment '??????R?[?h'
1605
  , FirstString varchar(120) comment '???????'
1606
  , SecondString varchar(120) comment '?H????E???????'
1607
  , Content varchar(120) comment '???e'
1608
  , EstimatePrice decimal(12,0) not null comment '????????z'
1609
  , NegotiationPrice decimal(12,0) not null comment '????????z'
1610
  , Notes varchar(120) comment '???????'
1611
  , EntryDate datetime not null comment '?o?^???t'
1612
  , UpdateDate datetime not null comment '?X?V???t'
1613
  , constraint estimatebudgetdetail_PKC primary key (ConstructionCode,GroupCount,LineCount)
1614
) comment '??Z?\?Z????f?[?^????' ;
1615

1616
-- ??Z????f?[?^
1617
--* BackupToTempTable
1618
drop table if exists estimatedata cascade;
1619

1620
--* RestoreFromTempTable
1621
create table estimatedata (
1622
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
1623
  , LineCount decimal(3,0) unsigned not null comment '?s???'
1624
  , ComponentCode decimal(5,0) unsigned not null comment '?\???L?['
1625
  , FixedItemCode varchar(1) comment '?????L?['
1626
  , ItemName varchar(120) comment '??????'
1627
  , SpecName varchar(120) comment '???^?i???E?`??E???@'
1628
  , PriceValue decimal(14,0) not null comment '???z'
1629
  , note varchar(60) comment '???l'
1630
  , MyExpensesFlg decimal(1,0) not null comment '????o??t???O'
1631
  , InputFlg decimal(1,0) not null comment '????t???O'
1632
  , EntryDate datetime not null comment '?o?^???t'
1633
  , UpdateDate datetime not null comment '?X?V???t'
1634
  , constraint estimatedata_PKC primary key (ConstructionCode,LineCount)
1635
) comment '??Z????f?[?^' ;
1636

1637
create index EstimateData_Index1
1638
  on estimatedata(ConstructionCode,FixedItemCode);
1639

1640
-- ??Z????y?[?W?f?[?^
1641
--* BackupToTempTable
1642
drop table if exists estimatedatabody cascade;
1643

1644
--* RestoreFromTempTable
1645
create table estimatedatabody (
1646
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
1647
  , PageCount decimal(4,0) unsigned not null comment '?y?[?W???'
1648
  , Category decimal(1,0) not null comment '?y?[?W??'
1649
  , UnionComponentCode decimal(5,0) unsigned not null comment '?????\???L?['
1650
  , ComponentCode decimal(5,0) unsigned not null comment '?\???L?['
1651
  , ItemCode decimal(5,0) unsigned not null comment '?H??L?['
1652
  , SelectComponent decimal(5,0) unsigned not null comment '?I???\???L?['
1653
  , PageTitle varchar(120) not null comment '?y?[?W?\????'
1654
  , DetailLineCount decimal(3,0) unsigned not null comment '????s???'
1655
  , EntryDate datetime not null comment '?o?^???t'
1656
  , UpdateDate datetime not null comment '?X?V???t'
1657
  , constraint estimatedatabody_PKC primary key (ConstructionCode,PageCount)
1658
) comment '??Z????y?[?W?f?[?^' ;
1659

1660
create index EstimateDataBody_Index1
1661
  on estimatedatabody(ConstructionCode,ComponentCode,ItemCode);
1662

1663
-- ??Z????f?[?^????
1664
--* BackupToTempTable
1665
drop table if exists estimatedatadetail cascade;
1666

1667
--* RestoreFromTempTable
1668
create table estimatedatadetail (
1669
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
1670
  , PageCount decimal(4,0) unsigned not null comment '?y?[?W???'
1671
  , LineCount decimal(3,0) unsigned not null comment '?s???'
1672
  , DataType decimal(1,0) not null comment '?f?[?^???'
1673
  , ComponentCode decimal(5,0) unsigned not null comment '?\???L?['
1674
  , ItemCode decimal(5,0) unsigned not null comment '?H??L?['
1675
  , SpecCode decimal(5,0) unsigned not null comment '???L?['
1676
  , ItemName varchar(120) comment '??????'
1677
  , SpecName varchar(120) comment '???^?i???E?`??E???@'
1678
  , Unitcount decimal(8,2) not null comment '????'
1679
  , UnitName varchar(30) comment '?P?????'
1680
  , UnitPrice decimal(9,2) not null comment '?P??'
1681
  , LineTotal decimal(12,0) not null comment '???z'
1682
  , note varchar(60) comment '???l'
1683
  , CompanyCode decimal(8,0) not null comment '??????R?[?h'
1684
  , MyExpensesFlg decimal(1,0) not null comment '????o??t???O'
1685
  , InputFlg decimal(1,0) comment '????t???O'
1686
  , EntryDate datetime not null comment '?o?^???t'
1687
  , UpdateDate datetime not null comment '?X?V???t'
1688
  , constraint estimatedatadetail_PKC primary key (ConstructionCode,PageCount,LineCount)
1689
) comment '??Z????f?[?^????' ;
1690

1691
create index EstimateDataDetail_Index1
1692
  on estimatedatadetail(ConstructionCode,PageCount);
1693

1694
-- ?o???}?X?^
1695
--* BackupToTempTable
1696
drop table if exists expensesmaster cascade;
1697

1698
--* RestoreFromTempTable
1699
create table expensesmaster (
1700
  DivisionCode smallint(6) not null comment '?H?????R?[?h'
1701
  , NameCode smallint(6) not null comment '?o????R?[?h'
1702
  , DisplayOrder smallint(6) not null comment '?\????'
1703
  , ExpensesRatio decimal(4,2) not null comment '?o??'
1704
  , DeleteFlg decimal(1,0) not null comment '???t???O'
1705
  , EntryDate datetime not null comment '?o?^???t'
1706
  , UpdateDate datetime not null comment '?X?V???t'
1707
  , constraint expensesmaster_PKC primary key (DivisionCode,NameCode)
1708
) comment '?o???}?X?^' ;
1709

1710
-- ???x???}?X?^
1711
--* BackupToTempTable
1712
drop table if exists holidaycalendermaster cascade;
1713

1714
--* RestoreFromTempTable
1715
create table holidaycalendermaster (
1716
  Holiday date not null comment '?x??'
1717
  , BusinessYear smallint(5) unsigned not null comment '?c??N?x'
1718
  , TargetMonth tinyint(3) unsigned not null comment '?Y????'
1719
  , TargetDay tinyint(3) unsigned not null comment '?Y????'
1720
  , constraint holidaycalendermaster_PKC primary key (Holiday)
1721
) comment '???x???}?X?^' ;
1722

1723
create index HolidayCalender_Index1
1724
  on holidaycalendermaster(BusinessYear);
1725

1726
create index HolidayCalenderMaster_Index2
1727
  on holidaycalendermaster(TargetMonth);
1728

1729
create index HolidayCalenderMaster_Index3
1730
  on holidaycalendermaster(TargetDay);
1731

1732
-- ??????????f?[?^
1733
--* BackupToTempTable
1734
drop table if exists inputbillingdata cascade;
1735

1736
--* RestoreFromTempTable
1737
create table inputbillingdata (
1738
  COMPANYCODE decimal(8,0) default '0' not null comment '??????R?[?h'
1739
  , TARGETDATE decimal(6,0) default '0' not null comment '???N??'
1740
  , SEQNO decimal(3,0) default '0' not null comment '?A??'
1741
  , CONSTRUCTIONCODE decimal(10,0) comment '?H?????'
1742
  , FIELDNAME varchar(120) comment '????'
1743
  , PERSONNAME varchar(60) comment '?S?????'
1744
  , BILLPRICE decimal(10,0) comment '???????z'
1745
  , CONSUMPTIONTAX decimal(10,0) comment '?????'
1746
  , OTHERPRICE decimal(10,0) comment '??????'
1747
  , DELETEFLG decimal(1,0) comment '???t???O'
1748
  , ENTRYDATE datetime comment '?o?^?N????'
1749
  , UPDATEDATE datetime comment '?X?V?N????'
1750
  , constraint inputbillingdata_PKC primary key (COMPANYCODE,TARGETDATE,SEQNO)
1751
) comment '??????????f?[?^' ;
1752

1753
-- ?????????????f?[?^
1754
--* BackupToTempTable
1755
drop table if exists inputbillingdatadetail cascade;
1756

1757
--* RestoreFromTempTable
1758
create table inputbillingdatadetail (
1759
  COMPANYCODE decimal(8,0) default '0' not null comment '??????R?[?h'
1760
  , TARGETDATE decimal(6,0) default '0' not null comment '???N??'
1761
  , SEQNO decimal(3,0) default '0' not null comment '?A??'
1762
  , LINECOUNT decimal(3,0) default '0' not null comment '?s???'
1763
  , LABOURKIND decimal(1,0) not null comment '?x???????E????'
1764
  , CONSTRUCTIONCODE decimal(10,0) comment '?H?????'
1765
  , CONSTRUCTIONROWCNT decimal(3,0) default '0' not null comment '????????'
1766
  , CONSTRUCTIONCOLCNT decimal(3,0) default '0' not null comment '??????'
1767
  , FIELDNAME varchar(120) comment '????'
1768
  , SECONDSTRING varchar(120) comment '?H?????e'
1769
  , BILLPRICE decimal(10,0) comment '???????z'
1770
  , HIGHWPRICE decimal(10,0) comment '??????'
1771
  , HARDWPRICE decimal(10,0) comment '??????'
1772
  , INDSWASTETAX decimal(10,0) comment '?Y?p??'
1773
  , NOTE varchar(120) comment '???l'
1774
  , DELETEFLG decimal(1,0) comment '???t???O'
1775
  , ENTRYDATE datetime comment '?o?^?N????'
1776
  , UPDATEDATE datetime comment '?X?V?N????'
1777
  , constraint inputbillingdatadetail_PKC primary key (COMPANYCODE,TARGETDATE,SEQNO,LINECOUNT)
1778
) comment '?????????????f?[?^' ;
1779

1780
-- ????????????
1781
--* BackupToTempTable
1782
drop table if exists inputbillingstatus cascade;
1783

1784
--* RestoreFromTempTable
1785
create table inputbillingstatus (
1786
  COMPANYCODE decimal(8,0) default '0' not null comment '??????R?[?h'
1787
  , TARGETDATE decimal(6,0) default '0' not null comment '???N??'
1788
  , SEQNO decimal(3,0) default '0' not null comment '?A??'
1789
  , STATUS decimal(1,0) default '0' comment '???????'
1790
  , ENTRYDATE datetime comment '?o?^?N????'
1791
  , UPDATEDATE datetime comment '?X?V?N????'
1792
  , constraint inputbillingstatus_PKC primary key (COMPANYCODE,TARGETDATE,SEQNO)
1793
) comment '????????????' ;
1794

1795
-- ?????????????
1796
--* BackupToTempTable
1797
drop table if exists inputsearchlogdata cascade;
1798

1799
--* RestoreFromTempTable
1800
create table inputsearchlogdata (
1801
  ConstructionCode decimal(10,0) not null comment '?H???R?[?h'
1802
  , UsedProcessNo decimal(4,0) not null comment '?g?p?@?\???'
1803
  , DisplayOrder decimal(4,0) unsigned not null comment '?\????'
1804
  , DataType decimal(1,0) not null comment '?f?[?^???'
1805
  , InputCode decimal(10,0) comment '????R?[?h'
1806
  , constraint inputsearchlogdata_PKC primary key (ConstructionCode,UsedProcessNo,DisplayOrder)
1807
) comment '?????????????' ;
1808

1809
create index InputSearchLogData_Index1
1810
  on inputsearchlogdata(ConstructionCode,UsedProcessNo,InputCode);
1811

1812
-- ???????f?[?^
1813
--* BackupToTempTable
1814
drop table if exists invoicedata cascade;
1815

1816
--* RestoreFromTempTable
1817
create table invoicedata (
1818
  INVOICENO decimal(9,0) not null comment '??????No'
1819
  , ORDERERSDIVISION decimal(5,0) not null comment '???????'
1820
  , ORDERERSCODE decimal(5,0) not null comment '??????R?[?h'
1821
  , REQUESTMONTH decimal(6,0) not null comment '??????'
1822
  , SEQNO decimal(2,0) not null comment '?A??'
1823
  , CRETATEDATE date not null comment '????'
1824
  , REQUESTDATE date not null comment '??????'
1825
  , REQUESTNAME varchar(120) comment '??????'
1826
  , TOTALAMOUNT decimal(10,0) comment '???????v???z'
1827
  , TAXAMOUNT decimal(10,0) comment '???????z'
1828
  , COMMENT1 varchar(60) comment '?R?????g1'
1829
  , COMMENT2 varchar(60) comment '?R?????g2'
1830
  , COMMENT3 varchar(60) not null comment '?R?????g3'
1831
  , COMMENT4 varchar(60) not null comment '?R?????g4'
1832
  , COMMENT5 varchar(60) not null comment '?R?????g5'
1833
  , COMPLETEFLG decimal(1,0) default '0' not null comment '?????t???O'
1834
  , ENTRYDATE datetime not null comment '?o?^?N????'
1835
  , UPDATEDATE datetime not null comment '?X?V?N????'
1836
  , constraint invoicedata_PKC primary key (INVOICENO)
1837
) comment '???????f?[?^' ;
1838

1839
alter table invoicedata add unique ORDERERSDIVISION (ORDERERSDIVISION,ORDERERSCODE,REQUESTMONTH,SEQNO) ;
1840

1841
-- ???[???R???e???c?}?X?^
1842
--* BackupToTempTable
1843
drop table if exists mailcontentsmaster cascade;
1844

1845
--* RestoreFromTempTable
1846
create table mailcontentsmaster (
1847
  MailDelivery decimal(3,0) not null comment '???M??????'
1848
  , MailTitle varchar(30) comment '???[???^?C?g??'
1849
  , MailContent varchar(400) comment '???[???{??'
1850
  , constraint mailcontentsmaster_PKC primary key (MailDelivery)
1851
) comment '???[???R???e???c?}?X?^' ;
1852

1853
-- ??????
1854
--* BackupToTempTable
1855
drop table if exists materialinfo cascade;
1856

1857
--* RestoreFromTempTable
1858
create table materialinfo (
1859
  MATERIALITEMCODE smallint(5) unsigned default 0 not null comment '????i??R?[?h'
1860
  , MATERIALCOUNT smallint(5) unsigned comment '?????'
1861
  , RENTCOUNT smallint(5) unsigned comment '??o??\??'
1862
  , DELETEFLG smallint(5) unsigned comment '???t???O'
1863
  , ENTRYDATE datetime comment '?o?^???t'
1864
  , UPDATEDATE datetime comment '?X?V???t'
1865
  , constraint materialinfo_PKC primary key (MATERIALITEMCODE)
1866
) comment '??????' ;
1867

1868
-- ????i??}?X?^
1869
--* BackupToTempTable
1870
drop table if exists materialitemmaster cascade;
1871

1872
--* RestoreFromTempTable
1873
create table materialitemmaster (
1874
  MATERIALITEMCODE smallint(5) unsigned default 0 not null comment '????i??R?[?h'
1875
  , MATERIALKINDCODE smallint(5) unsigned comment '??????R?[?h'
1876
  , MATERIALITEMNAME varchar(40) comment '????i?????'
1877
  , DISPLAYORDER smallint(5) unsigned comment '?\????'
1878
  , DELETEFLG tinyint(3) unsigned comment '???t???O'
1879
  , ENTRYDATE datetime comment '?o?^???t'
1880
  , UPDATEDATE datetime comment '?X?V???t'
1881
  , VERSIONNO decimal(8,0) default '0' not null comment '?o?[?W???????'
1882
  , constraint materialitemmaster_PKC primary key (MATERIALITEMCODE)
1883
) comment '????i??}?X?^' ;
1884

1885
-- ??????}?X?^
1886
--* BackupToTempTable
1887
drop table if exists materialkindmaster cascade;
1888

1889
--* RestoreFromTempTable
1890
create table materialkindmaster (
1891
  MATERIALKINDCODE smallint(5) unsigned default 0 not null comment '??????R?[?h'
1892
  , MATERIALKINDNAME varchar(40) comment '?????????'
1893
  , DISPLAYORDER smallint(5) unsigned comment '?\????'
1894
  , DELETEFLG tinyint(3) unsigned comment '???t???O'
1895
  , ENTRYDATE datetime comment '?o?^???t'
1896
  , UPDATEDATE datetime comment '?X?V???t'
1897
  , constraint materialkindmaster_PKC primary key (MATERIALKINDCODE)
1898
) comment '??????}?X?^' ;
1899

1900
-- ??????????
1901
--* BackupToTempTable
1902
drop table if exists materialrecordinfo cascade;
1903

1904
--* RestoreFromTempTable
1905
create table materialrecordinfo (
1906
  MATERIALITEMCODE smallint(5) unsigned default 0 not null comment '????i??R?[?h'
1907
  , PROCESSDATE date default '0000-00-00' not null comment '?????N????'
1908
  , SEQNO smallint(5) unsigned default 0 not null comment '?A??'
1909
  , RECKIND tinyint(3) unsigned comment '???R?[?h??'
1910
  , CONSTRUCTIONCODE int(10) unsigned comment '?H?????'
1911
  , PERSONCODE int(10) unsigned comment '?S????R?[?h'
1912
  , MATERIALCOUNT smallint(5) unsigned comment '?????'
1913
  , REPAYPLANDATE date comment '??p?\??N????'
1914
  , COMMENTTEXT varchar(80) comment '?R?????g'
1915
  , ENTRYDATE datetime comment '?o?^???t'
1916
  , UPDATEDATE datetime comment '?X?V???t'
1917
  , constraint materialrecordinfo_PKC primary key (MATERIALITEMCODE,PROCESSDATE,SEQNO)
1918
) comment '??????????' ;
1919

1920
-- ?f??????b?Z?[?W
1921
--* BackupToTempTable
1922
drop table if exists messageboarddata cascade;
1923

1924
--* RestoreFromTempTable
1925
create table messageboarddata (
1926
  RecordNumber decimal(6,0) unsigned not null comment '???R?[?h???'
1927
  , BranchNumber decimal(3,0) unsigned not null comment '???R?[?h?}??'
1928
  , FromCode decimal(8,0) unsigned not null comment '???????R?[?h'
1929
  , FromName varchar(60) not null comment '???????'
1930
  , MessageTitile varchar(100) comment '?`???^?C?g??'
1931
  , MessageContent varchar(1333) not null comment '?`?????e'
1932
  , LinkType decimal(2,0) not null comment '?????N????^?C?v'
1933
  , LinkMessage varchar(200) comment '?????N??????'
1934
  , LinkCode varchar(30) comment '?????N?L?['
1935
  , WritingDate datetime not null comment '?????????'
1936
  , PersonCode decimal(8,0) not null comment '??????S????R?[?h'
1937
  , ShareFlag decimal(2,0) not null comment '???????t???O'
1938
  , MessageColor varchar(8) comment '?????F'
1939
  , BackColor varchar(8) comment '?o?b?N?J???['
1940
  , MessageFlag decimal(1,0) not null comment '???b?Z?[?W?t???O'
1941
  , EntryDate datetime not null comment '?o?^???t'
1942
  , UpdateDate datetime not null comment '?X?V???t'
1943
  , constraint messageboarddata_PKC primary key (RecordNumber,BranchNumber)
1944
) comment '?f??????b?Z?[?W' ;
1945

1946
create index MessageBoardData_Index1
1947
  on messageboarddata(WritingDate);
1948

1949
create index MessageBoardData_Index2
1950
  on messageboarddata(MessageFlag);
1951

1952
-- ?f???????e?[?u??
1953
--* BackupToTempTable
1954
drop table if exists messageboardterget cascade;
1955

1956
--* RestoreFromTempTable
1957
create table messageboardterget (
1958
  RecordNumber decimal(6,0) unsigned not null comment '???R?[?h???'
1959
  , BranchNumber decimal(3,0) unsigned not null comment '???R?[?h?}??'
1960
  , SeqNum decimal(3,0) unsigned not null comment '????'
1961
  , ToCode decimal(8,0) not null comment '????R?[?h'
1962
  , ToName varchar(60) not null comment '????'
1963
  , EntryDate datetime not null comment '?o?^???t'
1964
  , UpdateDate datetime not null comment '?X?V???t'
1965
  , constraint messageboardterget_PKC primary key (RecordNumber,BranchNumber,SeqNum)
1966
) comment '?f???????e?[?u??' ;
1967

1968
create index MessageBoardTerget_Index1
1969
  on messageboardterget(RecordNumber,BranchNumber);
1970

1971
-- ?f??????b?Z?[?W?{??????
1972
--* BackupToTempTable
1973
drop table if exists messagebrowsinghistory cascade;
1974

1975
--* RestoreFromTempTable
1976
create table messagebrowsinghistory (
1977
  RecordNumber decimal(6,0) unsigned not null comment '???R?[?h???'
1978
  , BranchNumber decimal(3,0) unsigned not null comment '???R?[?h?}??'
1979
  , SeqNum decimal(3,0) unsigned not null comment '????'
1980
  , BrowsingCode decimal(8,0) not null comment '?{????R?[?h'
1981
  , BrowsingDate datetime not null comment '?{?????t'
1982
  , EntryDate datetime not null comment '?o?^???t'
1983
  , UpdateDate datetime not null comment '?X?V???t'
1984
  , constraint messagebrowsinghistory_PKC primary key (RecordNumber,BranchNumber,SeqNum)
1985
) comment '?f??????b?Z?[?W?{??????' ;
1986

1987
-- ???}?X?^
1988
--* BackupToTempTable
1989
drop table if exists monthmaster cascade;
1990

1991
--* RestoreFromTempTable
1992
create table monthmaster (
1993
  month smallint(6) not null comment '??'
1994
  , constraint monthmaster_PKC primary key (month)
1995
) comment '???}?X?^' ;
1996

1997
-- ???m?????
1998
--* BackupToTempTable
1999
drop table if exists notificationmessage cascade;
2000

2001
--* RestoreFromTempTable
2002
create table notificationmessage (
2003
  MessageDate datetime not null comment '?\???N????'
2004
  , SeqNo decimal(3,0) unsigned not null comment '?A??'
2005
  , MessageTitle varchar(100) comment '???m???^?C?g??'
2006
  , MessageContent varchar(1333) not null comment '???m?????e'
2007
  , PersonCode decimal(8,0) not null comment '??????S????R?[?h'
2008
  , ShareFlag decimal(2,0) not null comment '???????t???O'
2009
  , MessageColor varchar(8) comment '?????F'
2010
  , BackColor varchar(8) comment '?o?b?N?J???['
2011
  , QueSeqNo decimal(8,0) default '0' not null comment '???M?L???[?A??'
2012
  , EntryDate datetime not null comment '?o?^???t'
2013
  , UpdateDate datetime not null comment '?X?V???t'
2014
  , constraint notificationmessage_PKC primary key (MessageDate,SeqNo)
2015
) comment '???m?????' ;
2016

2017
-- ???m???{?????
2018
--* BackupToTempTable
2019
drop table if exists notificationmessagebrowsing cascade;
2020

2021
--* RestoreFromTempTable
2022
create table notificationmessagebrowsing (
2023
  MessageDate datetime not null comment '?\???N????'
2024
  , SeqNo decimal(4,0) unsigned not null comment '?A??'
2025
  , CompanyCode decimal(8,0) not null comment '??????R?[?h'
2026
  , BrowsingFlag decimal(1,0) unsigned default '0' not null comment '?{???t???O'
2027
  , EntryDate datetime not null comment '?o?^???t'
2028
  , UpdateDate datetime not null comment '?X?V???t'
2029
  , constraint notificationmessagebrowsing_PKC primary key (MessageDate,SeqNo,CompanyCode)
2030
) comment '???m???{?????' ;
2031

2032
create index NotificationMessageBrowsing_Index1
2033
  on notificationmessagebrowsing(CompanyCode);
2034

2035
-- ???m???????I?????
2036
--* BackupToTempTable
2037
drop table if exists notificationmessageselect cascade;
2038

2039
--* RestoreFromTempTable
2040
create table notificationmessageselect (
2041
  MessageDate datetime not null comment '?\???N????'
2042
  , SeqNo decimal(4,0) unsigned not null comment '?A??'
2043
  , CompanyCode decimal(8,0) not null comment '??????R?[?h'
2044
  , EntryDate datetime not null comment '?o?^???t'
2045
  , UpdateDate datetime not null comment '?X?V???t'
2046
  , constraint notificationmessageselect_PKC primary key (MessageDate,SeqNo,CompanyCode)
2047
) comment '???m???????I?????' ;
2048

2049
-- ??????}?X?^
2050
--* BackupToTempTable
2051
drop table if exists orderersmaster cascade;
2052

2053
--* RestoreFromTempTable
2054
create table orderersmaster (
2055
  OrderCotegory decimal(5,0) unsigned not null comment '???????'
2056
  , OrderersCode decimal(5,0) unsigned not null comment '??????R?[?h'
2057
  , DisplayOrder decimal(5,0) unsigned not null comment '?\????'
2058
  , OrderFlg decimal(1,0) not null comment '?@?l?c??E??l?t???O'
2059
  , CorporateStatusName varchar(100) comment '?@?l?i????'
2060
  , CorporateStatusPoint decimal(1,0) comment '?@?l?i?????u'
2061
  , OrderersName1 varchar(60) not null comment '???????1'
2062
  , OrderersName2 varchar(60) comment '????????Q'
2063
  , DepartmentName varchar(60) comment '??????'
2064
  , ChargePersonName varchar(60) comment '?S?????'
2065
  , ZipCode varchar(8) comment '?X????'
2066
  , Address1 varchar(60) comment '?Z???P'
2067
  , Address2 varchar(60) comment '?Z??2'
2068
  , Address3 varchar(60) comment '?Z??3'
2069
  , PhoneNumber varchar(13) comment '?d?b???'
2070
  , FaxNumber varchar(13) comment 'FAX???'
2071
  , MailAddress varchar(257) comment '???[???A?h???X'
2072
  , Note varchar(300) comment '???l'
2073
  , PersonCode decimal(8,0) not null comment '?o?^?S????R?[?h'
2074
  , DeleteFlg decimal(1,0) not null comment '???t???O'
2075
  , EntryDate datetime not null comment '?o?^???t'
2076
  , UpdateDate datetime not null comment '?X?V???t'
2077
  , constraint orderersmaster_PKC primary key (OrderCotegory,OrderersCode)
2078
) comment '??????}?X?^' ;
2079

2080
-- ????z?f?[?^
2081
--* BackupToTempTable
2082
drop table if exists orderspricedata cascade;
2083

2084
--* RestoreFromTempTable
2085
create table orderspricedata (
2086
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
2087
  , ChangeNo decimal(3,0) unsigned not null comment '??X???'
2088
  , ChangeDate date not null comment '??X??'
2089
  , ChangePersonCode decimal(8,0) unsigned not null comment '??X??R?[?h'
2090
  , ChangePersonName varchar(60) comment '??X???'
2091
  , BeforeValue decimal(14,0) not null comment '??X?O???????z'
2092
  , BeforeValueInTax decimal(14,0) not null comment '??X?O???????z'
2093
  , AfterValue decimal(14,0) not null comment '??X????????z'
2094
  , AfterValueInTax decimal(14,0) not null comment '??X????????z'
2095
  , ChangeComment varchar(200) comment '??X???R'
2096
  , EntryDate datetime not null comment '?o?^???t'
2097
  , UpdateDate datetime not null comment '?X?V???t'
2098
  , constraint orderspricedata_PKC primary key (ConstructionCode,ChangeNo)
2099
) comment '????z?f?[?^' ;
2100

2101
-- ?x?????F???f?[?^
2102
--* BackupToTempTable
2103
drop table if exists paymentapprovalinfo cascade;
2104

2105
--* RestoreFromTempTable
2106
create table paymentapprovalinfo (
2107
  COMPANYCODE decimal(8,0) default '0' not null comment '??????R?[?h'
2108
  , TARGETDATE decimal(6,0) default '0' not null comment '???N??'
2109
  , SEQNO decimal(3,0) default '0' not null comment '?A??'
2110
  , LINECOUNT decimal(3,0) default '0' not null comment '?s???'
2111
  , APPROVALNO decimal(3,0) default '0' not null comment '???F????'
2112
  , APPROVALPERSON decimal(8,0) comment '???F??R?[?h'
2113
  , APPROVALPERSONNAME varchar(20) comment '???F???'
2114
  , APPROVALAUTHORITY decimal(1,0) comment '???F??????'
2115
  , APPROVALDATE date comment '???F???t'
2116
  , ENTRYDATE datetime comment '?o?^???t'
2117
  , UPDATEDATE datetime comment '?X?V???t'
2118
  , constraint paymentapprovalinfo_PKC primary key (COMPANYCODE,TARGETDATE,SEQNO,LINECOUNT,APPROVALNO)
2119
) comment '?x?????F???f?[?^' ;
2120

2121
-- ?x??????f?[?^
2122
--* BackupToTempTable
2123
drop table if exists paymentdatadetail cascade;
2124

2125
--* RestoreFromTempTable
2126
create table paymentdatadetail (
2127
  COMPANYCODE decimal(8,0) default '0' not null comment '??????R?[?h'
2128
  , TARGETDATE decimal(6,0) default '0' not null comment '???N??'
2129
  , SEQNO decimal(3,0) default '0' not null comment '?A??'
2130
  , LINECOUNT decimal(3,0) default '0' not null comment '?s???'
2131
  , LABOURKIND decimal(1,0) not null comment '?x???????E????'
2132
  , BILLPRICE decimal(10,0) comment '???????z'
2133
  , DISCOUNTPRICE decimal(10,0) comment '?l???????z'
2134
  , OFFSETPRICE decimal(10,0) comment '???E???z'
2135
  , NEXTCOPRICE decimal(10,0) comment '????J?z'
2136
  , HIGHWPRICE decimal(10,0) comment '??????'
2137
  , HARDWPRICE decimal(10,0) comment '??????'
2138
  , INDSWASTETAX decimal(10,0) comment '?Y?p??'
2139
  , CNSTRPRICE decimal(10,0) comment '?????'
2140
  , CNSTRPRICEEXIST decimal(1,0) comment '??????L??'
2141
  , APPROVALPERSONCODE decimal(8,0) comment '?\???S????R?[?h'
2142
  , APPROVALDATE date comment '?S????\?????t'
2143
  , APPROVALENDFLG decimal(1,0) comment '???F?????t???O'
2144
  , ENTRYDATE datetime comment '?o?^???t'
2145
  , UPDATEDATE datetime comment '?X?V???t'
2146
  , constraint paymentdatadetail_PKC primary key (COMPANYCODE,TARGETDATE,SEQNO,LINECOUNT,LABOURKIND)
2147
) comment '?x??????f?[?^' ;
2148

2149
create index PayDataDetail_Index1
2150
  on paymentdatadetail(TARGETDATE);
2151

2152
create index PayDataDetail_Index2
2153
  on paymentdatadetail(APPROVALPERSONCODE);
2154

2155
-- ?H??????????f?[?^
2156
--* BackupToTempTable
2157
drop table if exists periodavoidance cascade;
2158

2159
--* RestoreFromTempTable
2160
create table periodavoidance (
2161
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
2162
  , ConstructionStatusFlg decimal(2,0) not null comment '?H?????t???O'
2163
  , FieldNo decimal(2,0) not null comment '?`?F?b?N???t?B?[???h???'
2164
  , EntryDate datetime not null comment '?o?^???t'
2165
  , UpdateDate datetime not null comment '?X?V???t'
2166
  , constraint periodavoidance_PKC primary key (ConstructionCode,ConstructionStatusFlg,FieldNo)
2167
) comment '?H??????????f?[?^' ;
2168

2169
create index PeriodAvoidance_Index1
2170
  on periodavoidance(ConstructionCode);
2171

2172
create index PeriodAvoidance_Index2
2173
  on periodavoidance(ConstructionStatusFlg);
2174

2175
create index PeriodAvoidance_Index3
2176
  on periodavoidance(FieldNo);
2177

2178
-- ?S??????F?f?[?^
2179
--* BackupToTempTable
2180
drop table if exists personapproval cascade;
2181

2182
--* RestoreFromTempTable
2183
create table personapproval (
2184
  PersonCode decimal(8,0) unsigned not null comment '?S????R?[?h'
2185
  , ApprovalCode decimal(3,0) unsigned not null comment '???F?@?\???'
2186
  , OrderDate decimal(6,0) unsigned not null comment '??t??'
2187
  , OrderNo decimal(2,0) unsigned not null comment '??t???'
2188
  , SeqNo decimal(2,0) not null comment '?}??'
2189
  , PersonCodeApproval decimal(8,0) unsigned not null comment '?\???E???F??R?[?h'
2190
  , PetitionApprovalDate datetime not null comment '?\???E???F???t'
2191
  , ApprovalLimitDates datetime not null comment '???F??]??'
2192
  , ApprovalStatus decimal(1,0) not null comment '???F???'
2193
  , InputComment varchar(300) comment '?R?????g'
2194
  , EntryDate datetime not null comment '?o?^???t'
2195
  , UpdateDate datetime not null comment '?X?V???t'
2196
  , constraint personapproval_PKC primary key (PersonCode,ApprovalCode,OrderDate,OrderNo,SeqNo)
2197
) comment '?S??????F?f?[?^' ;
2198

2199
create index personapproval_Index1
2200
  on personapproval(PersonCode);
2201

2202
create index personapproval_Index2
2203
  on personapproval(ApprovalCode);
2204

2205
create index personapproval_Index3
2206
  on personapproval(OrderDate);
2207

2208
create index personapproval_Index4
2209
  on personapproval(OrderNo);
2210

2211
create index personapproval_Index5
2212
  on personapproval(PersonCodeApproval);
2213

2214
-- ?S??????F?R?????g?f?[?^
2215
--* BackupToTempTable
2216
drop table if exists personapprovalcomment cascade;
2217

2218
--* RestoreFromTempTable
2219
create table personapprovalcomment (
2220
  PersonCode decimal(8,0) unsigned not null comment '?S????R?[?h'
2221
  , ApprovalCode decimal(3,0) unsigned not null comment '???F?@?\???'
2222
  , OrderDate decimal(6,0) unsigned not null comment '??t??'
2223
  , OrderNo decimal(2,0) unsigned not null comment '??t???'
2224
  , CommentNo decimal(2,0) not null comment '?R?????g???'
2225
  , ParentNo decimal(2,0) not null comment '?e?R?????g???'
2226
  , ApproValComment varchar(300) comment '?w???E?A???R?????g'
2227
  , EntryDate datetime not null comment '?o?^???t'
2228
  , UpdateDate datetime not null comment '?X?V???t'
2229
  , constraint personapprovalcomment_PKC primary key (PersonCode,ApprovalCode,OrderDate,OrderNo,CommentNo)
2230
) comment '?S??????F?R?????g?f?[?^' ;
2231

2232
-- ?S??????????}?X?^
2233
--* BackupToTempTable
2234
drop table if exists persondepartmentmaster cascade;
2235

2236
--* RestoreFromTempTable
2237
create table persondepartmentmaster (
2238
  PersonCode decimal(8,0) unsigned not null comment '?S????R?[?h'
2239
  , DepartmentCode decimal(5,0) unsigned not null comment '?????R?[?h'
2240
  , AffiliationFlg decimal(1,0) not null comment '?????t???O'
2241
  , EntryDate datetime not null comment '?o?^???t'
2242
  , UpdateDate datetime not null comment '?X?V???t'
2243
  , constraint persondepartmentmaster_PKC primary key (PersonCode,DepartmentCode)
2244
) comment '?S??????????}?X?^' ;
2245

2246
create index PersonDepartmentMaster_Index1
2247
  on persondepartmentmaster(PersonCode);
2248

2249
create index PersonDepartmentMaster_Index2
2250
  on persondepartmentmaster(DepartmentCode);
2251

2252
-- ?S????}?X?^
2253
--* BackupToTempTable
2254
drop table if exists personinchargemaster cascade;
2255

2256
--* RestoreFromTempTable
2257
create table personinchargemaster (
2258
  PersonCode decimal(8,0) unsigned not null comment '?S????R?[?h'
2259
  , DisplayOrder decimal(8,0) unsigned not null comment '?\????'
2260
  , PersonName varchar(60) not null comment '?S?????'
2261
  , PersonNameKana varchar(60) comment '?t???K?i'
2262
  , Sex decimal(1,0) default '0' comment '????'
2263
  , BloodType varchar(6) comment '???t?^'
2264
  , Birthday date not null comment '???N????'
2265
  , ZipCode varchar(8) comment '?X????'
2266
  , Address1 varchar(60) comment '???Z??1'
2267
  , Address2 varchar(60) comment '???Z??2'
2268
  , Address3 varchar(60) comment '???Z??3'
2269
  , PhoneNumber varchar(13) comment '?A????d?b???'
2270
  , EmgPhoneNumber varchar(13) comment '??}?A????d?b???'
2271
  , EmgContact varchar(60) comment '??}?A????'
2272
  , StartDate date not null comment '????N????'
2273
  , EndDate date comment '???N????'
2274
  , PassWord varchar(16) comment '?p?X???[?h'
2275
  , SecurityManagement decimal(1,0) not null comment '?@????'
2276
  , SecCode decimal(2,0) unsigned not null comment '???????'
2277
  , MsgBackColor varchar(8) comment '???b?Z?[?W?w?i?F'
2278
  , DisplayString varchar(20) comment '??E????'
2279
  , DepartmentCode decimal(5,0) unsigned comment '?????R?[?h'
2280
  , MonthlySalary decimal(11,0) not null comment '???????z'
2281
  , YearSalary decimal(12,0) not null comment '?N????z'
2282
  , Qualification varchar(120) comment '???i?????'
2283
  , SealPrintName varchar(5) comment '???\????'
2284
  , EmployeeClassFlg decimal(1,0) not null comment '?????'
2285
  , LedgerFlg decimal(1,0) not null comment '???v?Z???t???O'
2286
  , CommutingDistance decimal(5,2) not null comment '??????'
2287
  , CommuteCosts decimal(5,0) not null comment '??????'
2288
  , PaidVacationDays decimal(4,1) not null comment '???N?x?L???x?????'
2289
  , PaidVacationDaysPrev decimal(4,1) not null comment '?O?N?x?L???x?????'
2290
  , WorkingCode decimal(3,0) unsigned not null comment '?A??R?[?h'
2291
  , PaidDayOffFlg decimal(1,0) unsigned not null comment '?L?????t???O'
2292
  , DeleteFlg decimal(1,0) not null comment '???t???O'
2293
  , EntryDate datetime not null comment '?o?^???t'
2294
  , UpdateDate datetime not null comment '?X?V???t'
2295
  , constraint personinchargemaster_PKC primary key (PersonCode)
2296
) comment '?S????}?X?^' ;
2297

2298
create index PersonInChargeMaster_Index1
2299
  on personinchargemaster(StartDate);
2300

2301
create index PersonInChargeMaster_Index2
2302
  on personinchargemaster(DepartmentCode);
2303

2304
-- ?S??????i?f?[?^
2305
--* BackupToTempTable
2306
drop table if exists personqualification cascade;
2307

2308
--* RestoreFromTempTable
2309
create table personqualification (
2310
  PersonCode decimal(8,0) unsigned not null comment '?S????R?[?h'
2311
  , SeqNo decimal(3,0) unsigned not null comment '?f?[?^????'
2312
  , DCode decimal(5,0) unsigned not null comment '?????'
2313
  , Qcode decimal(5,0) unsigned not null comment '???i?R?[?h'
2314
  , DateOfAcquisition datetime not null comment '???i?????t'
2315
  , Qualification varchar(120) comment '????????i??'
2316
  , Notes varchar(120) comment '???l'
2317
  , EntryDate datetime not null comment '?o?^???t'
2318
  , UpdateDate datetime not null comment '?X?V???t'
2319
  , constraint personqualification_PKC primary key (PersonCode,SeqNo)
2320
) comment '?S??????i?f?[?^' ;
2321

2322
-- ?S??????^?}?X?^
2323
--* BackupToTempTable
2324
drop table if exists personsalarymaster cascade;
2325

2326
--* RestoreFromTempTable
2327
create table personsalarymaster (
2328
  PersonCode decimal(8,0) unsigned not null comment '?S????R?[?h'
2329
  , StartDate date not null comment '?g?p?J?n?N????'
2330
  , MonthlySalary decimal(11,0) not null comment '???????z'
2331
  , YearSalary decimal(12,0) not null comment '?N????z'
2332
  , EntryDate datetime not null comment '?o?^???t'
2333
  , UpdateDate datetime not null comment '?X?V???t'
2334
  , constraint personsalarymaster_PKC primary key (PersonCode,StartDate)
2335
) comment '?S??????^?}?X?^' ;
2336

2337
create index PersonSalaryMaster_Index1
2338
  on personsalarymaster(PersonCode);
2339

2340
create index PersonSalaryMaster_Index2
2341
  on personsalarymaster(StartDate);
2342

2343
create index PersonSalaryMaster_Index3
2344
  on personsalarymaster(MonthlySalary);
2345

2346
-- ?w???????f?[?^
2347
--* BackupToTempTable
2348
drop table if exists pointingoutcomment cascade;
2349

2350
--* RestoreFromTempTable
2351
create table pointingoutcomment (
2352
  ConstructionCode decimal(10,0) not null comment '?H???R?[?h'
2353
  , ProcessNo smallint(6) not null comment '????????i??????j'
2354
  , SeqNo smallint(6) not null comment '????'
2355
  , PageCount smallint(6) not null comment '?y?[?W???'
2356
  , PersonCode decimal(8,0) not null comment '?L????R?[?h'
2357
  , DrowColor varchar(8) comment '?`??F'
2358
  , CommentMessage varchar(1000) comment '???b?Z?[?W'
2359
  , StartPointX smallint(6) not null comment '?w?E?????u?w'
2360
  , StartPointY smallint(6) not null comment '?w?E?????u?x'
2361
  , CurrentPointX smallint(6) not null comment '??????u?w'
2362
  , CurrentPointY smallint(6) not null comment '??????u?x'
2363
  , CurrentWidth smallint(6) not null comment '?\???T?C?YWidth'
2364
  , CurrentHeight smallint(6) not null comment '?\???T?C?YHeigth'
2365
  , EntryDate datetime not null comment '?o?^???t'
2366
  , UpdateDate datetime not null comment '?X?V???t'
2367
  , constraint pointingoutcomment_PKC primary key (ConstructionCode,ProcessNo,SeqNo)
2368
) comment '?w???????f?[?^' ;
2369

2370
-- ?????????????c???^?f?[?^
2371
--* BackupToTempTable
2372
drop table if exists proceedingsdata cascade;
2373

2374
--* RestoreFromTempTable
2375
create table proceedingsdata (
2376
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
2377
  , ProceedingsDataDate date not null comment '?c???^????'
2378
  , StartMeetingTime decimal(4,0) unsigned not null comment '??c????J?n'
2379
  , EndMeetingTime decimal(4,0) unsigned not null comment '??c????I??'
2380
  , CreatorCode decimal(8,0) not null comment '????R?[?h'
2381
  , PalceFlag decimal(1,0) not null comment '???n?t???O'
2382
  , MeetingPalce varchar(120) comment '???????'
2383
  , EntryDate datetime not null comment '?o?^???t'
2384
  , UpdateDate datetime not null comment '?X?V???t'
2385
  , constraint proceedingsdata_PKC primary key (ConstructionCode,ProceedingsDataDate,StartMeetingTime)
2386
) comment '?????????????c???^?f?[?^' ;
2387

2388
-- ?????????????c???^?f?[?^?i?o???j
2389
--* BackupToTempTable
2390
drop table if exists proceedingsdataattend cascade;
2391

2392
--* RestoreFromTempTable
2393
create table proceedingsdataattend (
2394
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
2395
  , ProceedingsDataDate date not null comment '?c???^????'
2396
  , StartMeetingTime decimal(4,0) unsigned not null comment '??c????J?n'
2397
  , SeqNo decimal(3,0) unsigned not null comment '????s???'
2398
  , Department varchar(20) comment '?o??????'
2399
  , AttendName varchar(10) comment '?o??????'
2400
  , EntryDate datetime not null comment '?o?^???t'
2401
  , UpdateDate datetime not null comment '?X?V???t'
2402
  , constraint proceedingsdataattend_PKC primary key (ConstructionCode,ProceedingsDataDate,StartMeetingTime,SeqNo)
2403
) comment '?????????????c???^?f?[?^?i?o???j' ;
2404

2405
-- ?????????????c???^?f?[?^?i????j
2406
--* BackupToTempTable
2407
drop table if exists proceedingsdatadetail cascade;
2408

2409
--* RestoreFromTempTable
2410
create table proceedingsdatadetail (
2411
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
2412
  , ProceedingsDataDate date not null comment '?c???^????'
2413
  , StartMeetingTime decimal(4,0) unsigned not null comment '??c????J?n'
2414
  , SeqNo decimal(3,0) unsigned not null comment '????s???'
2415
  , TitleNo varchar(5) comment '?c????'
2416
  , Title varchar(20) comment '?c??'
2417
  , ContentsText varchar(50) comment '???e'
2418
  , EntryDate datetime not null comment '?o?^???t'
2419
  , UpdateDate datetime not null comment '?X?V???t'
2420
  , constraint proceedingsdatadetail_PKC primary key (ConstructionCode,ProceedingsDataDate,StartMeetingTime,SeqNo)
2421
) comment '?????????????c???^?f?[?^?i????j' ;
2422

2423
-- ???F?f?[?^
2424
--* BackupToTempTable
2425
drop table if exists processapproval cascade;
2426

2427
--* RestoreFromTempTable
2428
create table processapproval (
2429
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
2430
  , ApprovalCode decimal(3,0) unsigned not null comment '???F?@?\???'
2431
  , OrderNo decimal(2,0) unsigned not null comment '??t???'
2432
  , SeqNo decimal(2,0) not null comment '?}??'
2433
  , PersonCode decimal(8,0) unsigned not null comment '?\???E???F??R?[?h'
2434
  , PetitionApprovalDate datetime not null comment '?\???E???F???t'
2435
  , ApprovalLimitDates datetime not null comment '???F??]??'
2436
  , ApprovalStatus decimal(1,0) not null comment '???F???'
2437
  , InputComment varchar(300) comment '?R?????g'
2438
  , EntryDate datetime not null comment '?o?^???t'
2439
  , UpdateDate datetime not null comment '?X?V???t'
2440
  , constraint processapproval_PKC primary key (ConstructionCode,ApprovalCode,OrderNo,SeqNo)
2441
) comment '???F?f?[?^' ;
2442

2443
-- ???F?R?????g?f?[?^
2444
--* BackupToTempTable
2445
drop table if exists processapprovalcomment cascade;
2446

2447
--* RestoreFromTempTable
2448
create table processapprovalcomment (
2449
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
2450
  , ApprovalCode decimal(3,0) unsigned not null comment '???F?@?\???'
2451
  , OrderNo decimal(2,0) unsigned not null comment '??t???'
2452
  , CommentNo decimal(2,0) not null comment '?R?????g???'
2453
  , ParentNo decimal(2,0) not null comment '?e?R?????g???'
2454
  , ApproValComment varchar(300) comment '?w???E?A???R?????g'
2455
  , EntryDate datetime not null comment '?o?^???t'
2456
  , UpdateDate datetime not null comment '?X?V???t'
2457
  , constraint processapprovalcomment_PKC primary key (ConstructionCode,ApprovalCode,OrderNo,CommentNo)
2458
) comment '???F?R?????g?f?[?^' ;
2459

2460
-- ???F????f?[?^
2461
--* BackupToTempTable
2462
drop table if exists processapprovaldetail cascade;
2463

2464
--* RestoreFromTempTable
2465
create table processapprovaldetail (
2466
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
2467
  , ApprovalCode decimal(3,0) unsigned not null comment '???F?@?\???'
2468
  , OrderNo decimal(2,0) unsigned not null comment '??t???'
2469
  , SerialNo decimal(2,0) unsigned not null comment '?}??'
2470
  , LinkCode decimal(10,0) not null comment '?????N???'
2471
  , EntryDate datetime not null comment '?o?^???t'
2472
  , UpdateDate datetime not null comment '?X?V???t'
2473
  , constraint processapprovaldetail_PKC primary key (ConstructionCode,ApprovalCode,OrderNo,SerialNo)
2474
) comment '???F????f?[?^' ;
2475

2476
-- ?N?????}?X?^
2477
--* BackupToTempTable
2478
drop table if exists processexcutemaster cascade;
2479

2480
--* RestoreFromTempTable
2481
create table processexcutemaster (
2482
  SecCode decimal(2,0) unsigned not null comment '???????'
2483
  , ExecCode decimal(4,0) unsigned not null comment '?N?????????'
2484
  , EditFlg decimal(1,0) not null comment '??W?t???O'
2485
  , EntryDate datetime not null comment '?o?^???t'
2486
  , UpdateDate datetime not null comment '?X?V???t'
2487
  , constraint processexcutemaster_PKC primary key (SecCode,ExecCode)
2488
) comment '?N?????}?X?^' ;
2489

2490
create index ProcessExcuteMaster_Index1
2491
  on processexcutemaster(SecCode);
2492

2493
create index ProcessExcuteMaster_Index2
2494
  on processexcutemaster(ExecCode);
2495

2496
-- ???????f?[?^
2497
--* BackupToTempTable
2498
drop table if exists purchaseorder cascade;
2499

2500
--* RestoreFromTempTable
2501
create table purchaseorder (
2502
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
2503
  , SeqNo decimal(3,0) unsigned not null comment '???????}??'
2504
  , CompanyCode decimal(8,0) not null comment '??????R?[?h'
2505
  , CreateDate date comment '?????t'
2506
  , OrderPrice decimal(12,0) not null comment '???????z'
2507
  , LastRowStringDate date not null comment '??I?s?\?????t'
2508
  , OrderSheetType decimal(1,0) not null comment '???E?{???t???O'
2509
  , PaymentTerms decimal(1,0) not null comment '?x????????'
2510
  , CashRatio decimal(4,1) not null comment '?????????i???j'
2511
  , BillPeriod decimal(4,0) not null comment '??`????'
2512
  , PrePayments decimal(1,0) not null comment '?O????'
2513
  , PrePaymentsDays decimal(3,0) not null comment '?O????????'
2514
  , PrePaymentsPrice decimal(12,0) not null comment '?O???????z'
2515
  , PartialPayment decimal(1,0) not null comment '??????'
2516
  , PartialPaymentMounth decimal(2,0) unsigned not null comment '???????????'
2517
  , PartialPaymentDay1 decimal(2,0) unsigned not null comment '???????????'
2518
  , PartialPaymentDay2 decimal(2,0) unsigned not null comment '???????x????'
2519
  , PartialPaymentPrice decimal(12,0) not null comment '?????????z'
2520
  , CompletionPayment decimal(1,0) not null comment '???n??????x??'
2521
  , CompletionPaymentDays decimal(3,0) unsigned not null comment '???n??????x??????'
2522
  , CompletionPaymentPrice decimal(12,0) not null comment '???n??????x?????z'
2523
  , LeadEngineerCode decimal(8,0) comment '??C?Z?p??R?[?h'
2524
  , LeadEngineerName varchar(60) comment '??C?Z?p???'
2525
  , SafetyOfficerCode decimal(8,0) comment '???S?????R?[?h'
2526
  , SafetyOfficerName varchar(60) comment '???S??????'
2527
  , WorkersCount decimal(3,0) unsigned comment '??????'
2528
  , PrintoutDate date not null comment '????N????'
2529
  , RePrintFlag decimal(1,0) default '0' not null comment '??????\?t???O?i???g?p?j'
2530
  , OrderDate date not null comment '??E?L?????Z???N????'
2531
  , OrderStatus decimal(1,0) default '0' not null comment '????'
2532
  , OrderStDate date not null comment '???H??'
2533
  , OrderEdDate date not null comment '??????'
2534
  , EntryDate datetime not null comment '?o?^???t'
2535
  , UpdateDate datetime not null comment '?X?V???t'
2536
  , constraint purchaseorder_PKC primary key (ConstructionCode,SeqNo)
2537
) comment '???????f?[?^' ;
2538

2539
-- ?????????t?f?[?^
2540
--* BackupToTempTable
2541
drop table if exists purchaseorderdate cascade;
2542

2543
--* RestoreFromTempTable
2544
create table purchaseorderdate (
2545
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
2546
  , SeqNo decimal(3,0) unsigned not null comment '???????}??'
2547
  , CompanyCode decimal(8,0) not null comment '??????R?[?h'
2548
  , SendDate date not null comment '???????X????'
2549
  , ReturnDate date not null comment '???????????'
2550
  , ReturnCheckDate date not null comment '??????????m?F??'
2551
  , EntryDate datetime not null comment '?o?^???t'
2552
  , UpdateDate datetime not null comment '?X?V???t'
2553
  , constraint purchaseorderdate_PKC primary key (ConstructionCode,SeqNo)
2554
) comment '?????????t?f?[?^' ;
2555

2556
-- ??????????f?[?^
2557
--* BackupToTempTable
2558
drop table if exists purchaseorderdetail cascade;
2559

2560
--* RestoreFromTempTable
2561
create table purchaseorderdetail (
2562
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
2563
  , SeqNo decimal(3,0) unsigned not null comment '???????}??'
2564
  , GroupCount decimal(1,0) not null comment '?O???[?v???'
2565
  , LineCount decimal(3,0) unsigned not null comment '?s???'
2566
  , ComponentCode decimal(5,0) unsigned not null comment '?\???L?['
2567
  , ItemCode decimal(5,0) unsigned not null comment '?H??L?['
2568
  , FirstString varchar(120) comment '?H??E?i??'
2569
  , SecondString varchar(120) comment '???e????'
2570
  , UnitCount decimal(8,2) not null comment '????'
2571
  , UnitName varchar(30) comment '?P??'
2572
  , UnitPrice decimal(10,0) not null comment '?P??'
2573
  , OrdersLinePrice decimal(12,0) comment '???z'
2574
  , SourceCode decimal(10,0) unsigned not null comment '???H?????'
2575
  , SourceDetailCnt decimal(4,0) unsigned not null comment '????????'
2576
  , DataTypeFlag decimal(1,0) unsigned not null comment '?f?[?^?^?C?v?t???O'
2577
  , StatutoryWelfareRate decimal(4,2) not null comment '?@???????'
2578
  , EntryDate datetime not null comment '?o?^???t'
2579
  , UpdateDate datetime not null comment '?X?V???t'
2580
  , constraint purchaseorderdetail_PKC primary key (ConstructionCode,SeqNo,GroupCount,LineCount)
2581
) comment '??????????f?[?^' ;
2582

2583
create index POrderDetail_Index1
2584
  on purchaseorderdetail(SourceCode);
2585

2586
-- ???i?}?X?^
2587
--* BackupToTempTable
2588
drop table if exists qualificationmaster cascade;
2589

2590
--* RestoreFromTempTable
2591
create table qualificationmaster (
2592
  DCode decimal(5,0) unsigned not null comment '?????'
2593
  , Qcode decimal(5,0) unsigned not null comment '???i?R?[?h'
2594
  , Qualification varchar(120) comment '????E???i??'
2595
  , DisplayOrder decimal(5,0) unsigned not null comment '?\????'
2596
  , DeleteFlg decimal(1,0) default '0' not null comment '???t???O'
2597
  , EntryDate datetime not null comment '?o?^???t'
2598
  , UpdateDate datetime not null comment '?X?V???t'
2599
  , constraint qualificationmaster_PKC primary key (DCode,Qcode)
2600
) comment '???i?}?X?^' ;
2601

2602
create index QualificationMaster_Index1
2603
  on qualificationmaster(DCode);
2604

2605
create index QualificationMaster_Index2
2606
  on qualificationmaster(Qcode);
2607

2608
create index QualificationMaster_Index3
2609
  on qualificationmaster(DisplayOrder);
2610

2611
-- ???R?[?h??????
2612
--* BackupToTempTable
2613
drop table if exists recordkey cascade;
2614

2615
--* RestoreFromTempTable
2616
create table recordkey (
2617
  KeyNo decimal(2,0) unsigned not null comment '?L?[?R?[?h'
2618
  , RecordNumber decimal(6,0) unsigned not null comment '???R?[?h???'
2619
  , EntryDate datetime not null comment '?o?^???t'
2620
  , UpdateDate datetime not null comment '?X?V???t'
2621
  , constraint recordkey_PKC primary key (KeyNo,RecordNumber)
2622
) comment '???R?[?h??????' ;
2623

2624
-- ?????????f?[?^
2625
--* BackupToTempTable
2626
drop table if exists reminvoicedata cascade;
2627

2628
--* RestoreFromTempTable
2629
create table reminvoicedata (
2630
  InvoiceNo decimal(9,0) not null comment '??????No'
2631
  , RemPerson decimal(8,0) not null comment '???S????R?[?h'
2632
  , RemDate date not null comment '?????t'
2633
  , RemComment varchar(300) comment '?????R'
2634
  , EntryDate datetime not null comment '?o?^?N????'
2635
  , UpdateDate datetime not null comment '?X?V?N????'
2636
  , constraint reminvoicedata_PKC primary key (InvoiceNo)
2637
) comment '?????????f?[?^' ;
2638

2639
-- ????????????f?[?^
2640
--* BackupToTempTable
2641
drop table if exists reminvoicedatadetail cascade;
2642

2643
--* RestoreFromTempTable
2644
create table reminvoicedatadetail (
2645
  InvoiceNo decimal(9,0) not null comment '??????No'
2646
  , SeqNo smallint(5) unsigned not null comment '?A??'
2647
  , RequestNo decimal(9,0) not null comment '????No'
2648
  , EntryDate datetime not null comment '?o?^?N????'
2649
  , UpdateDate datetime not null comment '?X?V?N????'
2650
  , constraint reminvoicedatadetail_PKC primary key (InvoiceNo,SeqNo)
2651
) comment '????????????f?[?^' ;
2652

2653
-- ????????f?[?^
2654
--* BackupToTempTable
2655
drop table if exists removerequest cascade;
2656

2657
--* RestoreFromTempTable
2658
create table removerequest (
2659
  RemoveNo decimal(10,0) not null comment '???No'
2660
  , RemoveDate decimal(8,0) not null comment '?????????'
2661
  , RemovePersonCode decimal(8,0) unsigned not null comment '????????S????R?[?h'
2662
  , RemoveComment varchar(500) comment '??????e'
2663
  , RequestNo decimal(9,0) not null comment '????No'
2664
  , ReqConstructionCode decimal(10,0) not null comment '?????H?????'
2665
  , ORDERNO decimal(2,0) not null comment '??t???'
2666
  , RequestMonth decimal(6,0) not null comment '??????'
2667
  , OrderersDivision decimal(5,0) not null comment '???????'
2668
  , OrderersCode decimal(5,0) not null comment '??????R?[?h'
2669
  , OrderersName varchar(120) not null comment '???????'
2670
  , ReqConstructionName varchar(120) not null comment '?????H??????'
2671
  , RequestTotalAmount decimal(10,0) not null comment '???????z???v'
2672
  , RequestAmount decimal(10,0) not null comment '???????z'
2673
  , TaxAmount decimal(10,0) not null comment '?????'
2674
  , UnPaidAmount decimal(10,0) comment '??????'
2675
  , Note varchar(120) comment '???l'
2676
  , AssignedFlg decimal(1,0) comment '??????t???O'
2677
  , InvoiceNo decimal(9,0) not null comment '??????no'
2678
  , ENTRYDATE datetime not null comment '?o?^?N????'
2679
  , UPDATEDATE datetime not null comment '?X?V?N????'
2680
  , constraint removerequest_PKC primary key (RemoveNo,RemoveDate)
2681
) comment '????????f?[?^' ;
2682

2683
create index RemoveRequest_Index1
2684
  on removerequest(RequestNo);
2685

2686
create index RemoveRequest_Index2
2687
  on removerequest(ReqConstructionCode);
2688

2689
create index RemoveRequest_Index3
2690
  on removerequest(ORDERNO);
2691

2692
-- ????????f?[?^????
2693
--* BackupToTempTable
2694
drop table if exists removerequestdetail cascade;
2695

2696
--* RestoreFromTempTable
2697
create table removerequestdetail (
2698
  RemoveNo decimal(10,0) not null comment '???No'
2699
  , SeqNo decimal(9,0) not null comment '??tno'
2700
  , RequestNo decimal(9,0) not null comment '????no'
2701
  , MainConstructionCode decimal(10,0) not null comment '?{?H?????'
2702
  , ConstructionCode decimal(10,0) not null comment '?H?????'
2703
  , ConstructionKind decimal(1,0) not null comment '?H????'
2704
  , RequestAmount decimal(10,0) not null comment '???????z'
2705
  , TaxAmount decimal(10,0) not null comment '?????'
2706
  , ENTRYDATE datetime not null comment '?o?^?N????'
2707
  , UPDATEDATE datetime not null comment '?X?V?N????'
2708
  , constraint removerequestdetail_PKC primary key (RemoveNo,SeqNo)
2709
) comment '????????f?[?^????' ;
2710

2711
-- ?????f?[?^
2712
--* BackupToTempTable
2713
drop table if exists requestdata cascade;
2714

2715
--* RestoreFromTempTable
2716
create table requestdata (
2717
  REQUESTNO decimal(9,0) not null comment '????No'
2718
  , MAINCONSTRUCTIONCODE decimal(10,0) not null comment '?{?H?????'
2719
  , CONSTRUCTIONNAME varchar(120) not null comment '?H??????'
2720
  , CONTRACTAMOUNT decimal(10,0) not null comment '???????z'
2721
  , PAIDAMOUNT decimal(10,0) not null comment '????????z'
2722
  , REQUESTAMOUNT0 decimal(10,0) not null comment '???????z?O'
2723
  , REQUESTAMOUNT1 decimal(10,0) not null comment '???????z?P'
2724
  , REQUESTAMOUNT2 decimal(10,0) comment '???????z?Q'
2725
  , REQUESTAMOUNT3 decimal(10,0) comment '???????z?R'
2726
  , REQUESTAMOUNT4 decimal(10,0) comment '???????z?S'
2727
  , REQUESTAMOUNT5 decimal(10,0) comment '???????z?T'
2728
  , REQUESTAMOUNT6 decimal(10,0) comment '???????z?U'
2729
  , UNCLAIMEDAMOUNT decimal(10,0) not null comment '?????c???z'
2730
  , UNPAIDAMOUNT decimal(10,0) not null comment '?????????z'
2731
  , TAXAMOUNT decimal(10,0) not null comment '?????'
2732
  , NOTE varchar(120) not null comment '???l'
2733
  , ENTRYDATE datetime not null comment '?o?^?N????'
2734
  , UPDATEDATE datetime not null comment '?X?V?N????'
2735
  , constraint requestdata_PKC primary key (REQUESTNO,MAINCONSTRUCTIONCODE)
2736
) comment '?????f?[?^' ;
2737

2738
-- ?????f?[?^????
2739
--* BackupToTempTable
2740
drop table if exists requestdatadetail cascade;
2741

2742
--* RestoreFromTempTable
2743
create table requestdatadetail (
2744
  REQUESTNO decimal(9,0) not null comment '????No'
2745
  , MAINCONSTRUCTIONCODE decimal(10,0) not null comment '?{?H?????'
2746
  , CONSTRUCTIONCODE decimal(10,0) not null comment '?H?????'
2747
  , CONSTRUCTIONKIND decimal(1,0) not null comment '?H????'
2748
  , REQUESTAMOUNT decimal(10,0) not null comment '???????z'
2749
  , TAXAMOUNT decimal(10,0) not null comment '?????'
2750
  , ENTRYDATE datetime not null comment '?o?^?N????'
2751
  , UPDATEDATE datetime not null comment '?X?V?N????'
2752
  , constraint requestdatadetail_PKC primary key (REQUESTNO,MAINCONSTRUCTIONCODE,CONSTRUCTIONCODE,CONSTRUCTIONKIND)
2753
) comment '?????f?[?^????' ;
2754

2755
-- ?????w?b?_
2756
--* BackupToTempTable
2757
drop table if exists requesthead cascade;
2758

2759
--* RestoreFromTempTable
2760
create table requesthead (
2761
  REQUESTNO decimal(9,0) not null comment '????No'
2762
  , REQCONSTRUCTIONCODE decimal(10,0) not null comment '?????H?????'
2763
  , ORDERNO decimal(2,0) not null comment '??t???'
2764
  , REQUESTMONTH decimal(6,0) not null comment '??????'
2765
  , ORDERERSDIVISION decimal(5,0) not null comment '???????'
2766
  , ORDERERSCODE decimal(5,0) not null comment '??????R?[?h'
2767
  , ORDERERSNAME varchar(120) not null comment '???????'
2768
  , REQCONSTRUCTIONNAME varchar(120) not null comment '?????H??????'
2769
  , REQUESTTOTALAMOUNT decimal(10,0) not null comment '???????z???v'
2770
  , REQUESTAMOUNT decimal(10,0) not null comment '???????z'
2771
  , TAXAMOUNT decimal(10,0) not null comment '?????'
2772
  , UNPAIDAMOUNT decimal(10,0) comment '??????'
2773
  , NOTE varchar(120) comment '???l'
2774
  , ASSIGNEDFLG decimal(1,0) comment '??????t???O'
2775
  , INVOICENO decimal(9,0) not null comment '??????No'
2776
  , BILLINGDATE datetime not null comment '??????'
2777
  , BILLCONFIRMDATE datetime not null comment '?????m?F??'
2778
  , ENTRYDATE datetime not null comment '?o?^?N????'
2779
  , UPDATEDATE datetime not null comment '?X?V?N????'
2780
  , constraint requesthead_PKC primary key (REQUESTNO)
2781
) comment '?????w?b?_' ;
2782

2783
alter table requesthead add unique REQCONSTRUCTIONCODE (REQCONSTRUCTIONCODE,ORDERNO) ;
2784

2785
-- ?????????t?f?[?^
2786
--* BackupToTempTable
2787
drop table if exists requestorderdate cascade;
2788

2789
--* RestoreFromTempTable
2790
create table requestorderdate (
2791
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
2792
  , InvoiceNo decimal(9,0) not null comment '??????No'
2793
  , SendDate date not null comment '???????????X????'
2794
  , EntryDate datetime not null comment '?o?^???t'
2795
  , UpdateDate datetime not null comment '?X?V???t'
2796
  , constraint requestorderdate_PKC primary key (ConstructionCode,InvoiceNo)
2797
) comment '?????????t?f?[?^' ;
2798

2799
-- ????O???t?f?[?^
2800
--* BackupToTempTable
2801
drop table if exists salesgraphdata cascade;
2802

2803
--* RestoreFromTempTable
2804
create table salesgraphdata (
2805
  GraphDataCode decimal(8,0) not null comment '?O???t?f?[?^?R?[?h'
2806
  , ConstructionPeriod decimal(4,0) unsigned not null comment '?????'
2807
  , SalesDataDays date not null comment '????N??'
2808
  , DisplayOrder decimal(8,0) unsigned not null comment '?\????'
2809
  , DataName varchar(100) not null comment '?f?[?^?\??????'
2810
  , SalesAmount decimal(10,0) not null comment '????f?[?^'
2811
  , AdministrativeExpense decimal(10,0) not null comment '???E?????o??'
2812
  , GrossProfit decimal(10,0) not null comment '?e???v'
2813
  , NetIncome decimal(10,0) not null comment '?????v(???v)'
2814
  , EntryDate datetime not null comment '?o?^???t'
2815
  , UpdateDate datetime not null comment '?X?V???t'
2816
  , constraint salesgraphdata_PKC primary key (GraphDataCode,ConstructionPeriod,SalesDataDays)
2817
) comment '????O???t?f?[?^' ;
2818

2819
create index SalesGraphData_Idx1
2820
  on salesgraphdata(DisplayOrder);
2821

2822
create index SalesGraphData_idx2
2823
  on salesgraphdata(ConstructionPeriod);
2824

2825
-- ?????}?X?^
2826
--* BackupToTempTable
2827
drop table if exists securitymaster cascade;
2828

2829
--* RestoreFromTempTable
2830
create table securitymaster (
2831
  SecCode decimal(2,0) unsigned not null comment '???????'
2832
  , DisplayOrder decimal(2,0) not null comment '?\????'
2833
  , SecName varchar(60) not null comment '????????'
2834
  , SecRank decimal(1,0) not null comment '?????????N'
2835
  , SecRange decimal(1,0) not null comment '???????'
2836
  , GeneralAffairs decimal(1,0) not null comment '????????t???O'
2837
  , SelectBackColor varchar(8) not null comment '?I??w?i?F'
2838
  , EntryDate datetime not null comment '?o?^???t'
2839
  , UpdateDate datetime not null comment '?X?V???t'
2840
  , constraint securitymaster_PKC primary key (SecCode)
2841
) comment '?????}?X?^' ;
2842

2843
create index SecurityMaster_Index1
2844
  on securitymaster(DisplayOrder);
2845

2846
create index SecurityMaster_Index2
2847
  on securitymaster(SecRank);
2848

2849
create index SecurityMaster_Index3
2850
  on securitymaster(SecRange);
2851

2852
-- ???S?p?g???[???f?[?^
2853
--* BackupToTempTable
2854
drop table if exists sfpdata cascade;
2855

2856
--* RestoreFromTempTable
2857
create table sfpdata (
2858
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
2859
  , DataCount decimal(2,0) unsigned not null comment '?p?g???[????'
2860
  , RequestDate datetime not null comment '?p?g???[???v??????'
2861
  , PersonCode decimal(8,0) unsigned not null comment '?\????R?[?h'
2862
  , StringValue varchar(300) comment '?R?????g'
2863
  , OrderNo decimal(2,0) unsigned not null comment '?\????t???'
2864
  , EntryDate datetime not null comment '?o?^???t'
2865
  , UpdateDate datetime not null comment '?X?V???t'
2866
  , constraint sfpdata_PKC primary key (ConstructionCode,DataCount)
2867
) comment '???S?p?g???[???f?[?^' ;
2868

2869
create index SFPData_Index1
2870
  on sfpdata(RequestDate);
2871

2872
-- ???S?p?g???[??????f?[?^
2873
--* BackupToTempTable
2874
drop table if exists sfpdatadetail cascade;
2875

2876
--* RestoreFromTempTable
2877
create table sfpdatadetail (
2878
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
2879
  , DataCount decimal(2,0) unsigned not null comment '?p?g???[????'
2880
  , SeqNo decimal(2,0) unsigned not null comment '?f?[?^?}??'
2881
  , CompanyCode decimal(8,0) unsigned not null comment '??????R?[?h'
2882
  , EntryDate datetime not null comment '?o?^???t'
2883
  , UpdateDate datetime not null comment '?X?V???t'
2884
  , constraint sfpdatadetail_PKC primary key (ConstructionCode,DataCount,SeqNo)
2885
) comment '???S?p?g???[??????f?[?^' ;
2886

2887
-- ????????[?????M?L???[
2888
--* BackupToTempTable
2889
drop table if exists subconmailqueue cascade;
2890

2891
--* RestoreFromTempTable
2892
create table subconmailqueue (
2893
  SeqNo decimal(8,0) default '0' not null comment '?A??'
2894
  , CompanyCode decimal(8,0) default '0' not null comment '??????R?[?h'
2895
  , MailDelivery decimal(3,0) default '0' not null comment '???M??????'
2896
  , Argument0 varchar(32) comment '???[???}???????O'
2897
  , Argument1 varchar(32) comment '???[???}???????P'
2898
  , Argument2 varchar(32) comment '???[???}???????Q'
2899
  , Argument3 varchar(32) comment '???[???}???????R'
2900
  , Argument4 varchar(32) comment '???[???}???????S'
2901
  , Status decimal(1,0) default '0' not null comment '?X?e?[?^?X'
2902
  , EntryDate datetime not null comment '?o?^???t'
2903
  , UpdateDate datetime not null comment '?X?V???t'
2904
  , constraint subconmailqueue_PKC primary key (SeqNo,CompanyCode)
2905
) comment '????????[?????M?L???[' ;
2906

2907
create index subconmailqueue_Index1
2908
  on subconmailqueue(CompanyCode);
2909

2910
create index subconmailqueue_Index2
2911
  on subconmailqueue(Argument0);
2912

2913
-- ??????{?H?H??o?^?\???f?[?^
2914
--* BackupToTempTable
2915
drop table if exists subconstrjobitemregist cascade;
2916

2917
--* RestoreFromTempTable
2918
create table subconstrjobitemregist (
2919
  PersonCode decimal(8,0) unsigned not null comment '?\??????'
2920
  , CreateDate date not null comment '????'
2921
  , SeqNo decimal(2,0) unsigned not null comment '?\???A??'
2922
  , DisplayOrder decimal(8,0) unsigned not null comment '?\????'
2923
  , ItemCode decimal(5,0) unsigned not null comment '?H??L?['
2924
  , EntryDate datetime not null comment '?o?^???t'
2925
  , UpdateDate datetime not null comment '?X?V???t'
2926
  , constraint subconstrjobitemregist_PKC primary key (PersonCode,CreateDate,SeqNo,DisplayOrder)
2927
) comment '??????{?H?H??o?^?\???f?[?^' ;
2928

2929
-- ??????E?????N?o?^?\???f?[?^
2930
--* BackupToTempTable
2931
drop table if exists subconstrjoblinkregist cascade;
2932

2933
--* RestoreFromTempTable
2934
create table subconstrjoblinkregist (
2935
  PersonCode decimal(8,0) unsigned not null comment '?\??????'
2936
  , CreateDate date not null comment '????'
2937
  , SeqNo decimal(2,0) unsigned not null comment '?\???A??'
2938
  , DisplayOrder decimal(8,0) unsigned not null comment '?\????'
2939
  , JobCategoryCode decimal(5,0) not null comment '?E??L?['
2940
  , EntryDate datetime not null comment '?o?^???t'
2941
  , UpdateDate datetime not null comment '?X?V???t'
2942
  , constraint subconstrjoblinkregist_PKC primary key (PersonCode,CreateDate,SeqNo,DisplayOrder)
2943
) comment '??????E?????N?o?^?\???f?[?^' ;
2944

2945
-- ??????o?^?\???f?[?^
2946
--* BackupToTempTable
2947
drop table if exists subconstrregist cascade;
2948

2949
--* RestoreFromTempTable
2950
create table subconstrregist (
2951
  PersonCode decimal(8,0) unsigned not null comment '?\??????'
2952
  , CreateDate date not null comment '????'
2953
  , SeqNo decimal(2,0) unsigned not null comment '?\???A??'
2954
  , DataMode decimal(1,0) comment '?f?[?^??'
2955
  , SourceCode decimal(8,0) not null comment '??????R?[?h'
2956
  , PetitionPeriod decimal(4,0) unsigned not null comment '?\???N?x'
2957
  , CorporateStatusName varchar(40) comment '?@?l?i????'
2958
  , CorporateStatusPoint decimal(1,0) not null comment '?@?l?i?????u'
2959
  , CompanyName varchar(100) not null comment '???????'
2960
  , CEOPositionName varchar(60) comment '??\???E??'
2961
  , CEOName varchar(60) comment '??\?????'
2962
  , ContactPersonName varchar(60) comment '?S???????'
2963
  , ZipCode varchar(8) comment '?X????'
2964
  , Address1 varchar(60) comment '?Z???P'
2965
  , Address2 varchar(60) comment '?Z??2'
2966
  , Address3 varchar(60) comment '?Z??3'
2967
  , CellPhoneNumber varchar(13) comment '?g??d?b???'
2968
  , MailAddress varchar(257) comment '???[???A?h???X'
2969
  , PhoneNumber varchar(13) comment '?d?b???'
2970
  , FaxNumber varchar(13) comment 'FAX???'
2971
  , JapaneseSyllabary varchar(2) comment '50?????'
2972
  , StartDate date not null comment '????J?n?N????'
2973
  , Note varchar(300) comment '???l'
2974
  , labourKind decimal(1,0) not null comment '?x???????E????'
2975
  , OrderDate decimal(6,0) unsigned comment '?\????'
2976
  , OrderNo decimal(2,0) unsigned not null comment '?\????t???'
2977
  , EntryDate datetime not null comment '?o?^???t'
2978
  , UpdateDate datetime not null comment '?X?V???t'
2979
  , constraint subconstrregist_PKC primary key (PersonCode,CreateDate,SeqNo)
2980
) comment '??????o?^?\???f?[?^' ;
2981

2982
-- ??????H??}?X?^
2983
--* BackupToTempTable
2984
drop table if exists subcontractoritemmaster cascade;
2985

2986
--* RestoreFromTempTable
2987
create table subcontractoritemmaster (
2988
  ItemCode decimal(5,0) unsigned not null comment '?H??L?['
2989
  , DisplayOrder decimal(5,0) unsigned not null comment '?\????'
2990
  , ItemName varchar(120) not null comment '?H????'
2991
  , DeleteFlg decimal(1,0) not null comment '???t???O'
2992
  , EntryDate datetime not null comment '?o?^???t'
2993
  , UpdateDate datetime not null comment '?X?V???t'
2994
  , constraint subcontractoritemmaster_PKC primary key (ItemCode)
2995
) comment '??????H??}?X?^' ;
2996

2997
-- ??????E??}?X?^
2998
--* BackupToTempTable
2999
drop table if exists subcontractorjobcategory cascade;
3000

3001
--* RestoreFromTempTable
3002
create table subcontractorjobcategory (
3003
  JobCategoryCode decimal(5,0) not null comment '?E??L?['
3004
  , DisplayOrder decimal(5,0) unsigned not null comment '?\????'
3005
  , JobCategoryName varchar(120) not null comment '?E????'
3006
  , DeleteFlg decimal(1,0) not null comment '???t???O'
3007
  , EntryDate datetime not null comment '?o?^???t'
3008
  , UpdateDate datetime not null comment '?X?V???t'
3009
  , constraint subcontractorjobcategory_PKC primary key (JobCategoryCode)
3010
) comment '??????E??}?X?^' ;
3011

3012
-- ??????{?H?H??f?[?^
3013
--* BackupToTempTable
3014
drop table if exists subcontractorjobitem cascade;
3015

3016
--* RestoreFromTempTable
3017
create table subcontractorjobitem (
3018
  CompanyCode decimal(8,0) not null comment '??????R?[?h'
3019
  , ItemCode decimal(5,0) unsigned not null comment '?H??L?['
3020
  , DisplayOrder decimal(5,0) unsigned not null comment '?\????'
3021
  , EntryDate datetime not null comment '?o?^???t'
3022
  , UpdateDate datetime not null comment '?X?V???t'
3023
  , constraint subcontractorjobitem_PKC primary key (CompanyCode,ItemCode)
3024
) comment '??????{?H?H??f?[?^' ;
3025

3026
create index SubContractorJobItem_Index1
3027
  on subcontractorjobitem(CompanyCode);
3028

3029
create index SubContractorJobItem_Index2
3030
  on subcontractorjobitem(ItemCode);
3031

3032
-- ??????E?????N?}?X?^
3033
--* BackupToTempTable
3034
drop table if exists subcontractorjoblink cascade;
3035

3036
--* RestoreFromTempTable
3037
create table subcontractorjoblink (
3038
  CompanyCode decimal(8,0) not null comment '??????R?[?h'
3039
  , JobCategoryCode decimal(5,0) not null comment '?E??L?['
3040
  , DisplayOrder decimal(5,0) unsigned not null comment '?\????'
3041
  , EntryDate datetime not null comment '?o?^???t'
3042
  , UpdateDate datetime not null comment '?X?V???t'
3043
  , constraint subcontractorjoblink_PKC primary key (CompanyCode,JobCategoryCode)
3044
) comment '??????E?????N?}?X?^' ;
3045

3046
create index SubContractorJobLink_Index1
3047
  on subcontractorjoblink(CompanyCode);
3048

3049
create index SubContractorJobLink_Index2
3050
  on subcontractorjoblink(JobCategoryCode);
3051

3052
-- ????????[???f?[?^
3053
--* BackupToTempTable
3054
drop table if exists subcontractormail cascade;
3055

3056
--* RestoreFromTempTable
3057
create table subcontractormail (
3058
  CompanyCode decimal(8,0) default '0' not null comment '??????R?[?h'
3059
  , SeqNo decimal(3,0) default '0' not null comment '?A??'
3060
  , MailAddress varchar(257) comment '???[???A?h???X'
3061
  , EntryDate datetime not null comment '?o?^???t'
3062
  , UpdateDate datetime not null comment '?X?V???t'
3063
  , constraint subcontractormail_PKC primary key (CompanyCode,SeqNo)
3064
) comment '????????[???f?[?^' ;
3065

3066
-- ??????}?X?^
3067
--* BackupToTempTable
3068
drop table if exists subcontractormaster cascade;
3069

3070
--* RestoreFromTempTable
3071
create table subcontractormaster (
3072
  CompanyCode decimal(8,0) not null comment '??????R?[?h'
3073
  , DisplayOrder decimal(8,0) unsigned not null comment '?\????'
3074
  , CorporateStatusName varchar(40) comment '?@?l?i????'
3075
  , CorporateStatusPoint decimal(1,0) not null comment '?@?l?i?????u'
3076
  , CompanyName varchar(100) not null comment '???????'
3077
  , CompanyNameKana varchar(100) not null comment '????????i?J?i?j'
3078
  , CEOPositionName varchar(60) comment '??\???E??'
3079
  , CEOName varchar(60) comment '??\?????'
3080
  , CEONameKana varchar(60) comment '??\??????i?J?i?j'
3081
  , ContactPersonName varchar(60) comment '?S???????'
3082
  , ContactPersonNameKana varchar(60) comment '?S????????i?J?i?j'
3083
  , ZipCode varchar(8) comment '?X????'
3084
  , Address1 varchar(60) comment '?Z???P'
3085
  , Address2 varchar(60) comment '?Z??2'
3086
  , Address3 varchar(60) comment '?Z??3'
3087
  , CellPhoneNumber varchar(13) comment '?g??d?b???'
3088
  , MailAddress varchar(257) comment '???[???A?h???X'
3089
  , PhoneNumber varchar(13) comment '?d?b???'
3090
  , FaxNumber varchar(13) comment 'FAX???'
3091
  , JapaneseSyllabary varchar(2) comment '50?????'
3092
  , StartDate date not null comment '????J?n?N????'
3093
  , Note varchar(300) comment '???l'
3094
  , labourKind decimal(1,0) not null comment '?x???????E????'
3095
  , RequestImputId varchar(8) not null comment '????????ID'
3096
  , Password varchar(20) comment '?p?X???[?h'
3097
  , BankCode decimal(4,0) unsigned not null comment '??s?R?[?h'
3098
  , BankName varchar(20) comment '??s??'
3099
  , BankBranchCode decimal(3,0) unsigned not null comment '?x?X?R?[?h'
3100
  , BankBranchName varchar(20) comment '?x?X??'
3101
  , BankAccountKind decimal(1,0) not null comment '???????'
3102
  , BankAccountNo decimal(7,0) unsigned not null comment '???????'
3103
  , BankAccountName varchar(30) comment '???????`(???l??)'
3104
  , TransferFees decimal(4,0) unsigned not null comment '?U??????'
3105
  , ConfirmedDate datetime not null comment '?f?[?^?m?F??'
3106
  , DeleteFlg decimal(1,0) default '0' not null comment '???t???O'
3107
  , EntryDate datetime not null comment '?o?^???t'
3108
  , UpdateDate datetime not null comment '?X?V???t'
3109
  , constraint subcontractormaster_PKC primary key (CompanyCode)
3110
) comment '??????}?X?^' ;
3111

3112
alter table subcontractormaster add unique SubContractorMaster_Index2 (RequestImputId) ;
3113

3114
create index SubContractorMaster_Index1
3115
  on subcontractormaster(JapaneseSyllabary);
3116

3117
-- ????????[?????M???
3118
--* BackupToTempTable
3119
drop table if exists subcontrmaildelivery cascade;
3120

3121
--* RestoreFromTempTable
3122
create table subcontrmaildelivery (
3123
  CompanyCode decimal(8,0) default '0' not null comment '??????R?[?h'
3124
  , SeqNo decimal(3,0) default '0' not null comment '?A??'
3125
  , MailDelivery decimal(3,0) default '0' not null comment '???M??????'
3126
  , EntryDate datetime not null comment '?o?^???t'
3127
  , UpdateDate datetime not null comment '?X?V???t'
3128
  , constraint subcontrmaildelivery_PKC primary key (CompanyCode,SeqNo,MailDelivery)
3129
) comment '????????[?????M???' ;
3130

3131
-- ?d????}?X?^
3132
--* BackupToTempTable
3133
drop table if exists suppliersmaster cascade;
3134

3135
--* RestoreFromTempTable
3136
create table suppliersmaster (
3137
  SuppliersCode decimal(5,0) unsigned not null comment '?d????R?[?h'
3138
  , DisplayOrder decimal(5,0) unsigned not null comment '?\????'
3139
  , SuppliersName1 varchar(60) not null comment '?d????1'
3140
  , SuppliersName2 varchar(60) comment '?d?????Q'
3141
  , ZipCode varchar(8) comment '?X????'
3142
  , Address1 varchar(60) comment '?Z???P'
3143
  , Address2 varchar(60) comment '?Z??2'
3144
  , Address3 varchar(60) comment '?Z??3'
3145
  , PhoneNumber varchar(13) comment '?d?b???'
3146
  , FaxNumber varchar(13) comment 'FAX???'
3147
  , Note varchar(300) comment '???l'
3148
  , DeleteFlg decimal(1,0) not null comment '???t???O'
3149
  , EntryDate datetime not null comment '?o?^???t'
3150
  , UpdateDate datetime not null comment '?X?V???t'
3151
  , constraint suppliersmaster_PKC primary key (SuppliersCode)
3152
) comment '?d????}?X?^' ;
3153

3154
-- ?V?X?e???N???m?F?f?[?^
3155
--* BackupToTempTable
3156
drop table if exists systemexecute cascade;
3157

3158
--* RestoreFromTempTable
3159
create table systemexecute (
3160
  PrimaryCode tinyint(4) not null comment '?L?[????'
3161
  , TargetDate date not null comment '?N?????t'
3162
  , SystemVersion int(11) not null comment '?{??E????o?[?W????'
3163
  , UpDateCopyVersion int(11) not null comment '?R?s?[?o?[?W????'
3164
  , EntryDate datetime not null comment '?o?^???t'
3165
  , UpdateDate datetime not null comment '?X?V???t'
3166
  , constraint systemexecute_PKC primary key (PrimaryCode)
3167
) comment '?V?X?e???N???m?F?f?[?^' ;
3168

3169
-- ????}?X?^
3170
--* BackupToTempTable
3171
drop table if exists systemmaster cascade;
3172

3173
--* RestoreFromTempTable
3174
create table systemmaster (
3175
  SystemCode decimal(3,0) unsigned not null comment '???R?[?h'
3176
  , CompanyName1 varchar(60) not null comment '?????P'
3177
  , CompanyName2 varchar(60) comment '?????Q'
3178
  , CEOName varchar(60) not null comment '??\?????'
3179
  , CEOPositionName varchar(60) comment '??\???E??'
3180
  , ZipCode varchar(8) not null comment '?X????'
3181
  , Address1 varchar(60) not null comment '?Z???P'
3182
  , Address2 varchar(60) comment '?Z??2'
3183
  , Address3 varchar(60) comment '?Z??3'
3184
  , PhoneNumber varchar(13) not null comment '?d?b???'
3185
  , FaxNumber varchar(13) comment 'FAX???'
3186
  , HomePageURL varchar(120) comment '?z?[???y?[?WURL'
3187
  , ConsumptionTax decimal(4,2) not null comment '?????'
3188
  , CooperationRate decimal(4,2) not null comment '???????'
3189
  , StatutoryWelfareRate decimal(4,2) not null comment '?@???????'
3190
  , FuelPrice decimal(5,2) not null comment '?R???L???P??'
3191
  , AreaDistance decimal(5,2) not null comment '????u????????'
3192
  , ExcelSavePath varchar(120) comment 'Excel????p?X'
3193
  , BusinessPeriod smallint(6) not null comment '????c?????'
3194
  , ConstrYear smallint(6) not null comment '????H???N?x'
3195
  , BusinessBeginDate datetime not null comment '?c????????'
3196
  , ConstrBeginDate datetime not null comment '?H???N?x?????'
3197
  , BusinessCompDate datetime not null comment '?c?????????'
3198
  , ConstrCompDate datetime not null comment '?H???N?x??????'
3199
  , ConstructionNoBase decimal(1,0) not null comment '?H????????l'
3200
  , SloganString1 varchar(100) comment '?W??1'
3201
  , SloganString2 varchar(100) comment '?W??2'
3202
  , SloganString3 varchar(100) comment '?W??3'
3203
  , OperationFlg decimal(2,0) unsigned not null comment '???F?^?p?t???O'
3204
  , EntryDate datetime not null comment '?o?^???t'
3205
  , UpdateDate datetime not null comment '?X?V???t'
3206
  , constraint systemmaster_PKC primary key (SystemCode)
3207
) comment '????}?X?^' ;
3208

3209
-- ?????}?X?^
3210
--* BackupToTempTable
3211
drop table if exists termmaster cascade;
3212

3213
--* RestoreFromTempTable
3214
create table termmaster (
3215
  ConstructionStatusFlg decimal(2,0) not null comment '?H?????t???O'
3216
  , FieldNo decimal(2,0) not null comment '?`?F?b?N???t?B?[???h???'
3217
  , SeqNo decimal(2,0) not null comment '?}??'
3218
  , DisplayOrder decimal(2,0) not null comment '?\????'
3219
  , CheckSchdule decimal(1,0) not null comment '?`?F?b?N?^?C?~???O'
3220
  , TermDays decimal(3,0) not null comment '?o???'
3221
  , SendTitile varchar(100) comment '?^?C?g??'
3222
  , SendMessage varchar(100) comment '???b?Z?[?W'
3223
  , BackColor varchar(8) comment '?w?i?F'
3224
  , ForeColor varchar(8) comment '?????F'
3225
  , EntryDate datetime not null comment '?o?^???t'
3226
  , UpdateDate datetime not null comment '?X?V???t'
3227
  , constraint termmaster_PKC primary key (ConstructionStatusFlg,FieldNo,SeqNo)
3228
) comment '?????}?X?^' ;
3229

3230
create index TermMaster_Index1
3231
  on termmaster(DisplayOrder);
3232

3233
-- ?o?????f?[?^
3234
--* BackupToTempTable
3235
drop table if exists tranceportdailydata cascade;
3236

3237
--* RestoreFromTempTable
3238
create table tranceportdailydata (
3239
  PersonCode decimal(8,0) unsigned not null comment '????R?[?h'
3240
  , AttendanceDate date not null comment '???????'
3241
  , StartDistance decimal(7,1) not null comment '?????o???L????'
3242
  , ComplateDistance decimal(7,1) not null comment '?????I???L????'
3243
  , TotalDistance decimal(6,1) not null comment '???????v?L????'
3244
  , OfficeGoFlg decimal(1,0) not null comment '???????o??t???O'
3245
  , OfficeOutFlg decimal(1,0) not null comment '???????A??t???O'
3246
  , TrancePayGoFlg decimal(1,0) not null comment '?L?????o??t???O'
3247
  , TrancePayOutFlg decimal(1,0) not null comment '?L?????A??t???O'
3248
  , WareHouseFlg decimal(1,0) not null comment '????u??t???O'
3249
  , EntryDate datetime not null comment '?o?^???t'
3250
  , UpdateDate datetime not null comment '?X?V???t'
3251
  , constraint tranceportdailydata_PKC primary key (PersonCode,AttendanceDate)
3252
) comment '?o?????f?[?^' ;
3253

3254
create index TranceportDailyData_Index1
3255
  on tranceportdailydata(AttendanceDate);
3256

3257
-- ?H?????o???}?X?^
3258
--* BackupToTempTable
3259
drop table if exists typeexpensesmaster cascade;
3260

3261
--* RestoreFromTempTable
3262
create table typeexpensesmaster (
3263
  TypeCode decimal(5,0) unsigned not null comment '?H?????R?[?h'
3264
  , ExpensesPeriod smallint(6) not null comment '?????'
3265
  , NameCode decimal(5,0) unsigned not null comment '?o????R?[?h'
3266
  , ExpensesRaito decimal(4,2) not null comment '?o??'
3267
  , DeleteFlg decimal(1,0) not null comment '???t???O'
3268
  , EntryDate datetime not null comment '?o?^???t'
3269
  , UpdateDate datetime not null comment '?X?V???t'
3270
  , constraint typeexpensesmaster_PKC primary key (TypeCode,ExpensesPeriod,NameCode)
3271
) comment '?H?????o???}?X?^' ;
3272

3273
-- ?P??}?X?^
3274
--* BackupToTempTable
3275
drop table if exists unitmaster cascade;
3276

3277
--* RestoreFromTempTable
3278
create table unitmaster (
3279
  UnitKey decimal(5,0) unsigned not null comment '?P??L?['
3280
  , DisplayOrder decimal(5,0) unsigned not null comment '?\????'
3281
  , UnitName varchar(30) not null comment '?P?????'
3282
  , EntryDate datetime not null comment '?o?^???t'
3283
  , UpdateDate datetime not null comment '?X?V???t'
3284
  , constraint unitmaster_PKC primary key (UnitKey)
3285
) comment '?P??}?X?^' ;
3286

3287
create index UnitMaster_Index1
3288
  on unitmaster(DisplayOrder);
3289

3290
-- ????}?X?^
3291
--* BackupToTempTable
3292
drop table if exists vehiclemaster cascade;
3293

3294
--* RestoreFromTempTable
3295
create table vehiclemaster (
3296
  VehicleCode decimal(5,0) unsigned not null comment '????R?[?h'
3297
  , DisplayOrder decimal(5,0) unsigned not null comment '?\????'
3298
  , VehicleName varchar(100) not null comment '???????'
3299
  , RegistrationNumber varchar(30) comment '?o?^???'
3300
  , IdentificationNumber varchar(30) comment '?????'
3301
  , ModelCode varchar(30) comment '?^??'
3302
  , DepartmentCode decimal(5,0) unsigned not null comment '???????'
3303
  , VehicleScheduleFlg decimal(1,0) not null comment '????\??\???t???O'
3304
  , PurchaseDate date comment '?w????'
3305
  , PurchaseName varchar(30) comment '?w????'
3306
  , PurchaseContactPersons varchar(30) comment '?w????S????'
3307
  , PurchasePhone varchar(13) comment '?w????d?b???'
3308
  , LeaseDate date comment '???[?X?J?n??'
3309
  , LeaseDestination varchar(30) comment '???[?X??'
3310
  , LeaseContactPersons varchar(30) comment '???[?X??S????'
3311
  , LeasePhone varchar(13) comment '???[?X??d?b???'
3312
  , InsuranceCompany varchar(30) comment '?C???????'
3313
  , InsuranceContactPersons varchar(30) comment '?C???????S????'
3314
  , InsurancePhone varchar(13) comment '?C???????d?b???'
3315
  , Note varchar(300) comment '???l'
3316
  , EntryDate datetime comment '?o?^???t'
3317
  , UpdateDate datetime comment '?X?V???t'
3318
  , constraint vehiclemaster_PKC primary key (VehicleCode)
3319
) comment '????}?X?^' ;
3320

3321
-- ????L?^?f?[?^
3322
--* BackupToTempTable
3323
drop table if exists vehiclerecorddata cascade;
3324

3325
--* RestoreFromTempTable
3326
create table vehiclerecorddata (
3327
  VehicleCode decimal(5,0) unsigned not null comment '????R?[?h'
3328
  , DivisionCode decimal(2,0) unsigned not null comment '?f?[?^??'
3329
  , SeqNo decimal(2,0) not null comment '?}??'
3330
  , RecordDate date comment '???n??'
3331
  , Mileage mediumint(9) comment '???s????'
3332
  , Content varchar(100) comment '???e'
3333
  , PaymentCost decimal(10,0) comment '??p'
3334
  , EntryDate datetime not null comment '?o?^???t'
3335
  , UpdateDate datetime not null comment '?X?V???t'
3336
  , constraint vehiclerecorddata_PKC primary key (VehicleCode,DivisionCode,SeqNo)
3337
) comment '????L?^?f?[?^' ;
3338

3339
-- ????\??f?[?^
3340
--* BackupToTempTable
3341
drop table if exists vehiclescheduledata cascade;
3342

3343
--* RestoreFromTempTable
3344
create table vehiclescheduledata (
3345
  TargetDate date not null comment '????'
3346
  , VehicleCode decimal(5,0) unsigned not null comment '????R?[?h'
3347
  , MorningAfternoon decimal(1,0) not null comment '??O?E???'
3348
  , PersonCode decimal(8,0) unsigned not null comment '?S????R?[?h'
3349
  , TargetYear year(4) not null comment '?Y???N'
3350
  , TargetMonth tinyint(3) unsigned not null comment '?Y????'
3351
  , TargetDay year(4) not null comment '?Y????'
3352
  , EntryDate datetime not null comment '?o?^???t'
3353
  , UpdateDate datetime not null comment '?X?V???t'
3354
  , constraint vehiclescheduledata_PKC primary key (TargetDate,VehicleCode,MorningAfternoon)
3355
) comment '????\??f?[?^' ;
3356

3357
create index VehicleScheduleData_Index1
3358
  on vehiclescheduledata(TargetYear);
3359

3360
create index VehicleScheduleData_Index2
3361
  on vehiclescheduledata(TargetMonth);
3362

3363
create index VehicleScheduleData_Index3
3364
  on vehiclescheduledata(TargetDay);
3365

3366
-- ?A?????}?X?^
3367
--* BackupToTempTable
3368
drop table if exists workingtime cascade;
3369

3370
--* RestoreFromTempTable
3371
create table workingtime (
3372
  WorkingCode decimal(3,0) unsigned not null comment '?A??R?[?h'
3373
  , DisplayOrder decimal(5,0) unsigned not null comment '?\????'
3374
  , WorkingName varchar(60) comment '?A????????'
3375
  , StartTime datetime not null comment '?J?n????'
3376
  , CompTime datetime not null comment '?I??????'
3377
  , OverStartTime datetime not null comment '?c??\???J?n????'
3378
  , OnCalender decimal(1,0) not null comment '?J?????_?[???t???O'
3379
  , MonValue decimal(1,0) not null comment '???j???x?t???O'
3380
  , TueValue decimal(1,0) not null comment '??j???x?t???O'
3381
  , WedValue decimal(1,0) not null comment '???j???x?t???O'
3382
  , ThuValue decimal(1,0) not null comment '??j???x?t???O'
3383
  , FriValue decimal(1,0) not null comment '???j???x?t???O'
3384
  , SatValue decimal(1,0) not null comment '?y?j???x?t???O'
3385
  , SunValue decimal(1,0) not null comment '???j???x?t???O'
3386
  , Note varchar(300) comment '???l'
3387
  , DeleteFlg decimal(1,0) not null comment '???t???O'
3388
  , EntryDate datetime not null comment '?o?^???t'
3389
  , UpdateDate datetime not null comment '?X?V???t'
3390
  , constraint workingtime_PKC primary key (WorkingCode)
3391
) comment '?A?????}?X?^' ;
3392

3393
-- ?A??x?e????}?X?^
3394
--* BackupToTempTable
3395
drop table if exists workingtimebreak cascade;
3396

3397
--* RestoreFromTempTable
3398
create table workingtimebreak (
3399
  WorkingCode decimal(3,0) unsigned not null comment '?A??R?[?h'
3400
  , BreakNo decimal(2,0) unsigned not null comment '?x?e???'
3401
  , StartTime datetime not null comment '?J?n????'
3402
  , CompTime datetime not null comment '?I??????'
3403
  , EntryDate datetime not null comment '?o?^???t'
3404
  , UpdateDate datetime not null comment '?X?V???t'
3405
  , constraint workingtimebreak_PKC primary key (WorkingCode,BreakNo)
3406
) comment '?A??x?e????}?X?^' ;
3407

3408
-- ?N?}?X?^
3409
--* BackupToTempTable
3410
drop table if exists yearmaster cascade;
3411

3412
--* RestoreFromTempTable
3413
create table yearmaster (
3414
  years smallint(6) not null comment '?N'
3415
  , constraint yearmaster_PKC primary key (years)
3416
) comment '?N?}?X?^' ;
3417