プロジェクト

全般

プロフィール

統計
| リビジョン:

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

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

1
-- Project Name : noname
2
-- Date/Time    : 2018/08/06 8:37:19
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) unsigned not null comment '?H???R?[?h'
66
  , ActionResult varchar(30) not null comment '?s??????'
67
  , StartTime datetime comment '?J?n????'
68
  , CompTime datetime comment '?I??????'
69
  , DayTimes decimal(4,1) not null comment '????????v????'
70
  , WorkingComment varchar(120) comment '?R?????g'
71
  , WorkKindFlg decimal(1,0) not null comment '?????t???O'
72
  , EntryDate datetime not null comment '?o?^???t'
73
  , UpdateDate datetime not null comment '?X?V???t'
74
  , constraint attendancedailydata_PKC primary key (PersonCode,AttendanceDate,SeqNo)
75
) comment '?o?????f?[?^' ;
76

    
77
create index AttendDaily_Index1
78
  on attendancedailydata(ConstructionCode);
79

    
80
create index AttendDaily_Index2
81
  on attendancedailydata(AttendanceDate);
82

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

    
87
--* RestoreFromTempTable
88
create table attendancedata (
89
  PersonCode decimal(8,0) unsigned not null comment '????R?[?h'
90
  , AttendanceMonth date not null comment '?o?????N??'
91
  , LastDays decimal(2,0) unsigned not null comment '??????I??'
92
  , AttendDayCount decimal(2,0) unsigned not null comment '?o?????'
93
  , TotalOverTimes decimal(4,1) not null comment '?c??????'
94
  , OrderDate date not null comment '?\????'
95
  , OrderNo decimal(2,0) unsigned not null comment '?\????t???'
96
  , EntryDate datetime not null comment '?o?^???t'
97
  , UpdateDate datetime not null comment '?X?V???t'
98
  , constraint attendancedata_PKC primary key (PersonCode,AttendanceMonth)
99
) comment '?o?????f?[?^' ;
100

    
101
-- ??s?c????}?X?^
102
--* BackupToTempTable
103
drop table if exists bankbusinessdaymaster cascade;
104

    
105
--* RestoreFromTempTable
106
create table bankbusinessdaymaster (
107
  YEARMONTH decimal(6,0) default '0' not null comment '?N??'
108
  , BANKBUSINESSDAY decimal(2,0) default '0' not null comment '??s?c???'
109
  , NOTE varchar(120) comment '???l'
110
  , DELETEFLG decimal(1,0) comment '???t???O'
111
  , ENTRYDATE datetime comment '?o?^?N????'
112
  , UPDATEDATE datetime comment '?X?V?N????'
113
  , constraint bankbusinessdaymaster_PKC primary key (YEARMONTH,BANKBUSINESSDAY)
114
) comment '??s?c????}?X?^' ;
115

    
116
-- ???????f?[?^
117
--* BackupToTempTable
118
drop table if exists billingdata cascade;
119

    
120
--* RestoreFromTempTable
121
create table billingdata (
122
  COMPANYCODE decimal(8,0) default '0' not null comment '??????R?[?h'
123
  , TARGETDATE decimal(6,0) default '0' not null comment '???N??'
124
  , SEQNO decimal(3,0) default '0' not null comment '?A??'
125
  , BILLPRICE decimal(10,0) comment '???????z'
126
  , ENTRYDATE datetime comment '?o?^?N????'
127
  , UPDATEDATE datetime comment '?X?V?N????'
128
  , constraint billingdata_PKC primary key (COMPANYCODE,TARGETDATE,SEQNO)
129
) comment '???????f?[?^' ;
130

    
131
-- ??????????f?[?^
132
--* BackupToTempTable
133
drop table if exists billingdatadetail cascade;
134

    
135
--* RestoreFromTempTable
136
create table billingdatadetail (
137
  COMPANYCODE decimal(8,0) default '0' not null comment '??????R?[?h'
138
  , TARGETDATE decimal(6,0) default '0' not null comment '???N??'
139
  , SEQNO decimal(3,0) default '0' not null comment '?A??'
140
  , LINECOUNT decimal(3,0) default '0' not null comment '?s???'
141
  , CONSTRUCTIONCODE decimal(10,0) comment '?H?????'
142
  , CONSTRUCTIONROWCNT decimal(3,0) default '0' not null comment '?s???'
143
  , CONSTRUCTIONCOLCNT decimal(3,0) default '0' not null comment '????'
144
  , FIELDNAME varchar(120) comment '????'
145
  , BILLPRICE decimal(10,0) comment '???????z'
146
  , HIGHWPRICE decimal(10,0) comment '??????'
147
  , HARDWPRICE decimal(10,0) comment '??????'
148
  , INDSWASTETAX decimal(10,0) comment '?Y?p??'
149
  , NOTE varchar(120) comment '???l'
150
  , ENTRYDATE datetime comment '?o?^?N????'
151
  , UPDATEDATE datetime comment '?X?V?N????'
152
  , constraint billingdatadetail_PKC primary key (COMPANYCODE,TARGETDATE,SEQNO,LINECOUNT)
153
) comment '??????????f?[?^' ;
154

    
155
-- ???????x???T?}???[?f?[?^
156
--* BackupToTempTable
157
drop table if exists billingpaymentsummary cascade;
158

    
159
--* RestoreFromTempTable
160
create table billingpaymentsummary (
161
  COMPANYCODE decimal(8,0) default '0' not null comment '??????R?[?h'
162
  , TARGETDATE decimal(6,0) default '0' not null comment '???N??'
163
  , CHARGEPAYMENTKIND decimal(1,0) default '0' not null comment '?????x????'
164
  , PAYDAY date comment '?x????'
165
  , BILLPRICESTOTAL decimal(10,0) comment '???????z???v'
166
  , CONSUMPTIONTAXRATE decimal(6,3) comment '??????'
167
  , CONSUMPTIONTAXPRICE decimal(10,0) comment '?????z'
168
  , HIGHWPRICESTOTAL decimal(10,0) comment '???????v'
169
  , HARDWPRICESTOTAL decimal(10,0) comment '???????v'
170
  , INDSWASTETAXSTOTAL decimal(10,0) comment '?Y?p????v'
171
  , CNSTRPRICERATE decimal(6,3) comment '???????'
172
  , CNSTRPRICESTOTAL decimal(10,0) comment '????????v'
173
  , BILLINGPRICETOTAL decimal(10,0) comment '???????z???v'
174
  , ENTRYDATE datetime comment '?o?^?N????'
175
  , UPDATEDATE datetime comment '?X?V?N????'
176
  , constraint billingpaymentsummary_PKC primary key (COMPANYCODE,TARGETDATE,CHARGEPAYMENTKIND)
177
) comment '???????x???T?}???[?f?[?^' ;
178

    
179
-- ?^?c?????????
180
--* BackupToTempTable
181
drop table if exists bizperiodhistory cascade;
182

    
183
--* RestoreFromTempTable
184
create table bizperiodhistory (
185
  PeriodYear smallint(6) not null comment '?c??????E?H???N?x'
186
  , PeriodFlag smallint(1) not null comment '?c??????E?H???N?x?t???O'
187
  , BeginDate datetime not null comment '?????'
188
  , CompleteDate datetime not null comment '??????'
189
  , EntryDate datetime not null comment '?o?^???t'
190
  , UpdateDate datetime not null comment '?X?V???t'
191
  , constraint bizperiodhistory_PKC primary key (PeriodYear,PeriodFlag)
192
) comment '?^?c?????????' ;
193

    
194
-- ?H???????f?[?^?y???p?z
195
--* BackupToTempTable
196
drop table if exists bk_constructionledger cascade;
197

    
198
--* RestoreFromTempTable
199
create table bk_constructionledger (
200
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
201
  , ConstructionPeriod decimal(4,0) unsigned not null comment '?????'
202
  , CreatorCode decimal(8,0) comment '????R?[?h'
203
  , CreatorName varchar(60) comment '?????'
204
  , CreateDate date not null comment '????'
205
  , ConstructionTimes decimal(5,2) not null comment '?H???i?P??E???j'
206
  , ConstructionStart date not null comment '?_??H???J?n'
207
  , ConstructionEnd date not null comment '?_??H??????'
208
  , OrdersDecisionPrice decimal(14,0) not null comment '??????????z'
209
  , CompanyExpenses decimal(10,0) not null comment '???o???v'
210
  , DepartmentExpenses decimal(10,0) not null comment '?????o???v'
211
  , SalesExpenses decimal(10,0) not null comment '?c??o???v'
212
  , TotalPayment decimal(10,0) not null comment '???x???z'
213
  , GrossProfit decimal(10,0) not null comment '?e??'
214
  , Allowance decimal(10,0) not null comment '???^'
215
  , NetProfit decimal(10,0) not null comment '?????v'
216
  , ComplateFlg decimal(1,0) not null comment '????????t???O'
217
  , IntegrationFlg decimal(1,0) not null comment '????z??Z?t???O'
218
  , EntryDate datetime not null comment '?o?^???t'
219
  , UpdateDate datetime not null comment '?X?V???t'
220
  , constraint bk_constructionledger_PKC primary key (ConstructionCode)
221
) comment '?H???????f?[?^?y???p?z' ;
222

    
223
-- ?H??????????f?[?^?y???p?z
224
--* BackupToTempTable
225
drop table if exists bk_constructionledgerdetail cascade;
226

    
227
--* RestoreFromTempTable
228
create table bk_constructionledgerdetail (
229
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
230
  , GroupCount decimal(2,0) unsigned not null comment '?O???[?v???'
231
  , LineCount decimal(5,0) unsigned not null comment '?s???'
232
  , ComponentCode decimal(5,0) unsigned not null comment '?\???L?['
233
  , ItemCode decimal(5,0) unsigned not null comment '?H??L?['
234
  , FirstString varchar(120) comment '???????'
235
  , SecondString varchar(120) comment '?H?????e'
236
  , CompanyType decimal(1,0) not null comment '??????R?[?h?^?C?v'
237
  , CompanyCode decimal(8,0) not null comment '??????R?[?h'
238
  , CompanyName varchar(120) comment '?????????'
239
  , EstimatePrice decimal(12,0) not null comment '?\?Z?i????j???z'
240
  , ExecutionAmount decimal(12,0) not null comment '???s???z'
241
  , AmountConfigRate decimal(5,2) not null comment '???z?\????'
242
  , PaymentBurden decimal(12,0) not null comment '?x????U?z'
243
  , FixDataFlg decimal(1,0) not null comment '???f?[?^?t???O'
244
  , IndependentFlg decimal(1,0) not null comment '????f?[?^?t???O'
245
  , FluctuationFlg decimal(1,0) not null comment '?????f?[?^?t???O'
246
  , SalaryFlg decimal(1,0) not null comment '???^?U????'
247
  , SalaryDays decimal(4,0) not null comment '???^?U??????'
248
  , OperatingFlg decimal(1,0) not null comment '?S?????t???O'
249
  , SourceCode decimal(10,0) unsigned not null comment '???H?????'
250
  , JoinTitleFlg decimal(1,0) not null comment '?H??????^?C?g??'
251
  , SalaryOnRegist decimal(12,0) not null comment '?o?^?????z???^'
252
  , PurchaseOrderFlg decimal(2,0) not null comment '?????????s?t???O'
253
  , EntryDate datetime not null comment '?o?^???t'
254
  , UpdateDate datetime not null comment '?X?V???t'
255
  , constraint bk_constructionledgerdetail_PKC primary key (ConstructionCode,GroupCount,LineCount)
256
) comment '?H??????????f?[?^?y???p?z' ;
257

    
258
-- ?H?????????s?f?[?^?y???p?z
259
--* BackupToTempTable
260
drop table if exists bk_constructionledgerexcute cascade;
261

    
262
--* RestoreFromTempTable
263
create table bk_constructionledgerexcute (
264
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
265
  , GroupCount decimal(2,0) unsigned not null comment '?O???[?v???'
266
  , LineCount decimal(5,0) unsigned not null comment '?s???'
267
  , ColumnCount decimal(3,0) not null comment '????'
268
  , PaymentAmount decimal(12,0) not null comment '?x?????z'
269
  , TargetMonth date not null comment '???N??'
270
  , EntryDate datetime not null comment '?o?^???t'
271
  , UpdateDate datetime not null comment '?X?V???t'
272
  , constraint bk_constructionledgerexcute_PKC primary key (ConstructionCode,GroupCount,LineCount,ColumnCount)
273
) comment '?H?????????s?f?[?^?y???p?z' ;
274

    
275
-- ??Z????f?[?^?y???p?z
276
--* BackupToTempTable
277
drop table if exists bk_estimatedata cascade;
278

    
279
--* RestoreFromTempTable
280
create table bk_estimatedata (
281
  SaveDate datetime not null comment '?????t'
282
  , ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
283
  , LineCount decimal(3,0) unsigned not null comment '?s???'
284
  , ComponentCode decimal(5,0) unsigned not null comment '?\???L?['
285
  , FixedItemCode varchar(1) comment '?????L?['
286
  , ItemName varchar(120) comment '??????'
287
  , SpecName varchar(120) comment '???^?i???E?`??E???@'
288
  , PriceValue decimal(14,0) not null comment '???z'
289
  , note varchar(60) comment '???l'
290
  , MyExpensesFlg decimal(1,0) not null comment '????o??t???O'
291
  , InputFlg decimal(1,0) not null comment '????t???O'
292
  , EntryDate datetime not null comment '?o?^???t'
293
  , UpdateDate datetime not null comment '?X?V???t'
294
  , constraint bk_estimatedata_PKC primary key (SaveDate,ConstructionCode,LineCount)
295
) comment '??Z????f?[?^?y???p?z' ;
296

    
297
-- ??Z????y?[?W?f?[?^?y???p?z
298
--* BackupToTempTable
299
drop table if exists bk_estimatedatabody cascade;
300

    
301
--* RestoreFromTempTable
302
create table bk_estimatedatabody (
303
  SaveDate datetime not null comment '?????t'
304
  , ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
305
  , PageCount decimal(4,0) unsigned not null comment '?y?[?W???'
306
  , Category decimal(1,0) not null comment '?y?[?W??'
307
  , UnionComponentCode decimal(5,0) unsigned not null comment '?????\???L?['
308
  , ComponentCode decimal(5,0) unsigned not null comment '?\???L?['
309
  , ItemCode decimal(5,0) unsigned not null comment '?H??L?['
310
  , SelectComponent decimal(5,0) unsigned not null comment '?I???\???L?['
311
  , PageTitle varchar(120) not null comment '?y?[?W?\????'
312
  , DetailLineCount decimal(3,0) unsigned not null comment '????s???'
313
  , EntryDate datetime not null comment '?o?^???t'
314
  , UpdateDate datetime not null comment '?X?V???t'
315
  , constraint bk_estimatedatabody_PKC primary key (SaveDate,ConstructionCode,PageCount)
316
) comment '??Z????y?[?W?f?[?^?y???p?z' ;
317

    
318
-- ??Z????f?[?^????y???p?z
319
--* BackupToTempTable
320
drop table if exists bk_estimatedatadetail cascade;
321

    
322
--* RestoreFromTempTable
323
create table bk_estimatedatadetail (
324
  SaveDate datetime not null comment '?????t'
325
  , ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
326
  , PageCount decimal(4,0) unsigned not null comment '?y?[?W???'
327
  , LineCount decimal(3,0) unsigned not null comment '?s???'
328
  , DataType decimal(1,0) not null comment '?f?[?^???'
329
  , ComponentCode decimal(5,0) unsigned not null comment '?\???L?['
330
  , ItemCode decimal(5,0) unsigned not null comment '?H??L?['
331
  , SpecCode decimal(5,0) unsigned not null comment '???L?['
332
  , ItemName varchar(120) comment '??????'
333
  , SpecName varchar(120) comment '???^?i???E?`??E???@'
334
  , Unitcount decimal(8,2) not null comment '????'
335
  , UnitName varchar(30) comment '?P?????'
336
  , UnitPrice decimal(9,2) not null comment '?P??'
337
  , LineTotal decimal(12,0) not null comment '???z'
338
  , note varchar(60) comment '???l'
339
  , CompanyCode decimal(8,0) not null comment '??????R?[?h'
340
  , MyExpensesFlg decimal(1,0) not null comment '????o??t???O'
341
  , InputFlg decimal(1,0) comment '????t???O'
342
  , EntryDate datetime not null comment '?o?^???t'
343
  , UpdateDate datetime not null comment '?X?V???t'
344
  , constraint bk_estimatedatadetail_PKC primary key (SaveDate,ConstructionCode,PageCount,LineCount)
345
) comment '??Z????f?[?^????y???p?z' ;
346

    
347
-- ?\?Z???W?v?R?[?h?}?X?^
348
--* BackupToTempTable
349
drop table if exists budgetsumcode cascade;
350

    
351
--* RestoreFromTempTable
352
create table budgetsumcode (
353
  BlockCode decimal(2,0) unsigned not null comment '?u???b?N???'
354
  , GroupCode decimal(2,0) unsigned not null comment '?O???[?v???'
355
  , ComponentCode decimal(5,0) unsigned not null comment '?\???L?['
356
  , ItemCode decimal(5,0) unsigned not null comment '?H??L?['
357
  , ElementsName varchar(100) not null comment '?v?f????'
358
  , EntryDate datetime not null comment '?o?^???t'
359
  , UpdateDate datetime not null comment '?X?V???t'
360
  , constraint budgetsumcode_PKC primary key (BlockCode,GroupCode,ComponentCode,ItemCode)
361
) comment '?\?Z???W?v?R?[?h?}?X?^' ;
362

    
363
-- ?@?l?i?}?X?^
364
--* BackupToTempTable
365
drop table if exists businesstypemaster cascade;
366

    
367
--* RestoreFromTempTable
368
create table businesstypemaster (
369
  BusinessTypeCode decimal(5,0) unsigned not null comment '?@?l?i?R?[?h'
370
  , DisplayOrder decimal(5,0) unsigned not null comment '?\????'
371
  , BusinessTypeName varchar(100) not null comment '???'
372
  , EntryDate datetime not null comment '?o?^???t'
373
  , UpdateDate datetime not null comment '?X?V???t'
374
  , constraint businesstypemaster_PKC primary key (BusinessTypeCode)
375
) comment '?@?l?i?}?X?^' ;
376

    
377
create index BusinessTypeMaster_Index1
378
  on businesstypemaster(DisplayOrder);
379

    
380
-- ?S????????????f?[?^
381
--* BackupToTempTable
382
drop table if exists chgchargedep cascade;
383

    
384
--* RestoreFromTempTable
385
create table chgchargedep (
386
  PersonCode decimal(8,0) not null comment '?S????R?[?h'
387
  , StartDate date not null comment '?J?n?N????'
388
  , CompDate date not null comment '?I???N????'
389
  , DepartmentCode decimal(5,0) unsigned not null comment '?????R?[?h'
390
  , DepartmentName varchar(60) comment '??????'
391
  , EntryDate datetime not null comment '?o?^???t'
392
  , UpdateDate datetime not null comment '?X?V???t'
393
  , constraint chgchargedep_PKC primary key (PersonCode,StartDate)
394
) comment '?S????????????f?[?^' ;
395

    
396
-- ?H???S????X?????f?[?^
397
--* BackupToTempTable
398
drop table if exists chgconstrcharge cascade;
399

    
400
--* RestoreFromTempTable
401
create table chgconstrcharge (
402
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
403
  , Division decimal(1,0) not null comment '????'
404
  , SeqNo smallint(5) unsigned not null comment '?A??'
405
  , DepartmentCode decimal(5,0) unsigned not null comment '?????R?[?h'
406
  , PersonCode decimal(8,0) not null comment '?S????R?[?h'
407
  , StartDate date comment '?S???J?n?N????'
408
  , CompDate date comment '?S???I???N????'
409
  , SourceCode decimal(10,0) unsigned not null comment '???H???R?[?h'
410
  , DeleteFlg decimal(1,0) not null comment '???t???O'
411
  , EntryDate datetime not null comment '?o?^???t'
412
  , UpdateDate datetime not null comment '?X?V???t'
413
  , constraint chgconstrcharge_PKC primary key (ConstructionCode,Division,SeqNo)
414
) comment '?H???S????X?????f?[?^' ;
415

    
416
-- ????????}?X?^
417
--* BackupToTempTable
418
drop table if exists commoncostlarge cascade;
419

    
420
--* RestoreFromTempTable
421
create table commoncostlarge (
422
  LargeCode decimal(5,0) unsigned not null comment '????L?['
423
  , DisplayOrder decimal(5,0) unsigned not null comment '?\????'
424
  , LargeName varchar(50) not null comment '???????'
425
  , CommentText varchar(120) comment '????????'
426
  , DeleteFlg decimal(1,0) not null comment '???t???O'
427
  , EntryDate datetime not null comment '?o?^???t'
428
  , UpdateDate datetime not null comment '?X?V???t'
429
  , constraint commoncostlarge_PKC primary key (LargeCode)
430
) comment '????????}?X?^' ;
431

    
432
-- ?????H???A?}?X?^
433
--* BackupToTempTable
434
drop table if exists commoncostlinkms cascade;
435

    
436
--* RestoreFromTempTable
437
create table commoncostlinkms (
438
  LargeCode decimal(5,0) unsigned not null comment '????L?['
439
  , MiddleCode decimal(5,0) unsigned not null comment '??????L?['
440
  , ItemCode decimal(5,0) unsigned not null comment '?H??L?['
441
  , EntryDate datetime comment '?o?^???t'
442
  , UpdateDate datetime comment '?X?V???t'
443
  , constraint commoncostlinkms_PKC primary key (LargeCode,MiddleCode,ItemCode)
444
) comment '?????H???A?}?X?^' ;
445

    
446
-- ?????????}?X?^
447
--* BackupToTempTable
448
drop table if exists commoncostmiddle cascade;
449

    
450
--* RestoreFromTempTable
451
create table commoncostmiddle (
452
  LargeCode decimal(5,0) unsigned not null comment '????L?['
453
  , MiddleCode decimal(5,0) unsigned not null comment '??????L?['
454
  , DisplayOrder decimal(5,0) unsigned not null comment '?\????'
455
  , MiddleName varchar(50) not null comment '?????????'
456
  , CommentText varchar(120) comment '????????'
457
  , DeleteFlg decimal(1,0) not null comment '???t???O'
458
  , EntryDate datetime not null comment '?o?^???t'
459
  , UpdateDate datetime not null comment '?X?V???t'
460
  , constraint commoncostmiddle_PKC primary key (LargeCode,MiddleCode)
461
) comment '?????????}?X?^' ;
462

    
463
-- ?????????L?[?}?X?^
464
--* BackupToTempTable
465
drop table if exists commoncostmiddlesearchword cascade;
466

    
467
--* RestoreFromTempTable
468
create table commoncostmiddlesearchword (
469
  LargeCode decimal(5,0) unsigned not null comment '????L?['
470
  , MiddleCode decimal(5,0) unsigned not null comment '??????L?['
471
  , SeqNo decimal(5,0) unsigned not null comment '????'
472
  , SearchWord varchar(50) not null comment '????????'
473
  , EntryDate datetime not null comment '?o?^???t'
474
  , UpdateDate datetime not null comment '?X?V???t'
475
  , constraint commoncostmiddlesearchword_PKC primary key (LargeCode,MiddleCode,SeqNo)
476
) comment '?????????L?[?}?X?^' ;
477

    
478
-- ?\???H???A?}?X?^
479
--* BackupToTempTable
480
drop table if exists componentlinkmaster cascade;
481

    
482
--* RestoreFromTempTable
483
create table componentlinkmaster (
484
  ComponentCode decimal(5,0) unsigned not null comment '?\???L?['
485
  , ItemCode decimal(5,0) unsigned not null comment '?H??L?['
486
  , DisplayOrder decimal(5,0) unsigned comment '?\????'
487
  , EntryDate datetime not null comment '?o?^???t'
488
  , UpdateDate datetime not null comment '?X?V???t'
489
  , constraint componentlinkmaster_PKC primary key (ComponentCode,ItemCode)
490
) comment '?\???H???A?}?X?^' ;
491

    
492
create index ComponentLinkMaster_Index1
493
  on componentlinkmaster(ComponentCode);
494

    
495
create index ComponentLinkMaster_Index2
496
  on componentlinkmaster(ItemCode);
497

    
498
-- ?\???}?X?^
499
--* BackupToTempTable
500
drop table if exists componentmaster cascade;
501

    
502
--* RestoreFromTempTable
503
create table componentmaster (
504
  ComponentCode decimal(5,0) unsigned not null comment '?\???L?['
505
  , DisplayOrder decimal(5,0) unsigned not null comment '?\????'
506
  , ComponentName varchar(120) not null comment '?\??????'
507
  , SubItemsFlg decimal(1,0) comment '???????t???O'
508
  , DirectInputFlg decimal(1,0) comment '???????t???O'
509
  , MyExpensesFlg decimal(1,0) comment '????o??t???O'
510
  , DeleteFlg decimal(1,0) not null comment '???t???O'
511
  , EntryDate datetime not null comment '?o?^???t'
512
  , UpdateDate datetime not null comment '?X?V???t'
513
  , constraint componentmaster_PKC primary key (ComponentCode)
514
) comment '?\???}?X?^' ;
515

    
516
create index ComponentMaster_Index1
517
  on componentmaster(DisplayOrder);
518

    
519
-- ?\???H??????A?}?X?^
520
--* BackupToTempTable
521
drop table if exists componenttotypemaster cascade;
522

    
523
--* RestoreFromTempTable
524
create table componenttotypemaster (
525
  ComponentCode decimal(5,0) unsigned not null comment '?\???L?['
526
  , TypeCode decimal(5,0) unsigned not null comment '?H?????R?[?h'
527
  , Dummy decimal(1,0) not null comment '?_?~?[????'
528
  , EntryDate datetime not null comment '?o?^???t'
529
  , UpdateDate datetime not null comment '?X?V???t'
530
  , constraint componenttotypemaster_PKC primary key (ComponentCode,TypeCode)
531
) comment '?\???H??????A?}?X?^' ;
532

    
533
create index ComponentToTypeMaster_Index1
534
  on componenttotypemaster(ComponentCode);
535

    
536
create index ComponentToTypeMaster_Index2
537
  on componenttotypemaster(TypeCode);
538

    
539
-- ?H???????o??f?[?^
540
--* BackupToTempTable
541
drop table if exists constrledgerexpenses cascade;
542

    
543
--* RestoreFromTempTable
544
create table constrledgerexpenses (
545
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
546
  , SeqNo decimal(5,0) not null comment '?}??'
547
  , NameCode decimal(5,0) unsigned not null comment '?o??R?[?h'
548
  , ExpensesRaito decimal(4,2) not null comment '?o??'
549
  , ExpensesValue decimal(10,0) not null comment '?o????z'
550
  , EntryDate datetime not null comment '?o?^???t'
551
  , UpdateDate datetime not null comment '?X?V???t'
552
  , constraint constrledgerexpenses_PKC primary key (ConstructionCode,SeqNo,NameCode)
553
) comment '?H???????o??f?[?^' ;
554

    
555
create index ConstrLedgerExpenses_Index1
556
  on constrledgerexpenses(ConstructionCode);
557

    
558
create index ConstrLedgerExpenses_Index2
559
  on constrledgerexpenses(SeqNo);
560

    
561
create index ConstrLedgerExpenses_Index3
562
  on constrledgerexpenses(NameCode);
563

    
564
-- ?H????{???
565
--* BackupToTempTable
566
drop table if exists constructionbaseinfo cascade;
567

    
568
--* RestoreFromTempTable
569
create table constructionbaseinfo (
570
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
571
  , TyingFlg decimal(1,0) not null comment '?R?t?f?[?^?t???O'
572
  , JoinFlg decimal(1,0) not null comment '?????_??H???t???O'
573
  , ConstructionYear smallint(5) unsigned not null comment '?H???N?x'
574
  , ConstructionPeriod smallint(5) unsigned not null comment '?H??????'
575
  , RequestedDate date comment '??????'
576
  , EstimatesSubmitDeadline date comment '?????o????'
577
  , EstimatesSubmittedDate date comment '?????o??'
578
  , ProvisionalOrderDate date comment '?????'
579
  , OrderDate date comment '???'
580
  , OrderStartingDate date comment '?J?n?\???'
581
  , OrderCompletionDate date comment '?????\???'
582
  , PreparationStartDate date comment '?{?H?????J?n??'
583
  , ConstructionStartingDate date comment '?{?H?J?n??'
584
  , ConstructionCompletionDate date comment '?{?H??????'
585
  , NonOrderDate date comment '????'
586
  , OrdersDecisionPrice decimal(12,0) not null comment '??????????z'
587
  , OrdersDecisionPriceInTax decimal(12,0) not null comment '??????????z'
588
  , SalesDepCode decimal(5,0) unsigned not null comment '?c??S????????R?[?h'
589
  , SalesPersonCode decimal(8,0) unsigned not null comment '?c??S????R?[?h'
590
  , SalesSubDepCode decimal(5,0) unsigned not null comment '?c????S????????R?[?h'
591
  , SalesSubPersonCode decimal(8,0) unsigned not null comment '?c????S????R?[?h'
592
  , ConstrDepCode decimal(5,0) unsigned not null comment '?H???S????????R?[?h'
593
  , ConstructionPersonCode decimal(8,0) not null comment '?H???S????R?[?h'
594
  , ConstrSubDepCode decimal(5,0) unsigned not null comment '?H?????S????????R?[?h'
595
  , ConstrSubPersonCode decimal(8,0) not null comment '?H?????S????R?[?h'
596
  , ConstrInstrDepCode decimal(5,0) unsigned not null comment '?H???w?????????R?[?h'
597
  , ConstructionInstructor decimal(8,0) not null comment '?H???w?????R?[?h'
598
  , TransferConstruction decimal(8,0) not null comment '?H??????R?[?h'
599
  , TransferConstructionDate date comment '?H??????'
600
  , OrderersDivision decimal(5,0) not null comment '????????R?[?h'
601
  , OrderersCode decimal(5,0) unsigned not null comment '??????R?[?h'
602
  , EstimatesExpirationDate date comment '????L??????'
603
  , ConstructionPeriodStart date comment '?_??H???J?n??'
604
  , ConstructionPeriodEnd date comment '?_??H??????'
605
  , ConstructionPeriodStart2 date comment '?_??H???J?n?i???????j'
606
  , ConstructionPeriodEnd2 date comment '?_??H???????i???????j'
607
  , StartDate date comment '?H???J?n??'
608
  , EndDate date comment '?H???I????'
609
  , PurchaseOrderMailingDate date comment '???????X????'
610
  , PurchaseOrderReturnDate date comment '???????????'
611
  , PurchaseOrderReturnCheckDate date comment '??????????m?F??'
612
  , ConsumptionTaxFlg decimal(1,0) not null comment '?????t???O'
613
  , PrimeContractorFlg decimal(1,0) not null comment '?????t???O'
614
  , SalesCostFlg decimal(1,0) not null comment '?c??o?????t???O'
615
  , ConstructionStatusFlg decimal(2,0) not null comment '?H?????t???O'
616
  , ConstructionType decimal(5,0) not null comment '?H?????R?[?h'
617
  , EstimateType decimal(1,0) not null comment '??????'
618
  , BillingStartDate date not null comment '?????????J?n??'
619
  , BillingDate date not null comment '??????'
620
  , BillingSplitFlg decimal(1,0) not null comment '??????t???O'
621
  , BillingSendDate date comment '???????X??/??n????'
622
  , LedgerComplateDate date not null comment '?H????????????????t'
623
  , InspectPlanningDate date not null comment '?????\???'
624
  , InspectExecuteDate date not null comment '???????s??'
625
  , RevCompleteDate date not null comment '??????????????'
626
  , EntryDate datetime not null comment '?o?^???t'
627
  , UpdateDate datetime not null comment '?X?V???t'
628
  , constraint constructionbaseinfo_PKC primary key (ConstructionCode)
629
) comment '?H????{???' ;
630

    
631
create index BaseInfo_Index1
632
  on constructionbaseinfo(ConstructionStatusFlg);
633

    
634
create index BaseInfo_Index2
635
  on constructionbaseinfo(EstimateType);
636

    
637
create index BaseInfo_Index3
638
  on constructionbaseinfo(SalesPersonCode);
639

    
640
create index BaseInfo_Index4
641
  on constructionbaseinfo(ConstructionPersonCode);
642

    
643
create index BaseInfo_Index5
644
  on constructionbaseinfo(ConstructionInstructor);
645

    
646
create index BaseInfo_Index6
647
  on constructionbaseinfo(ConstructionPeriod);
648

    
649
-- ?H????{????
650
--* BackupToTempTable
651
drop table if exists constructionbaseinfodetail cascade;
652

    
653
--* RestoreFromTempTable
654
create table constructionbaseinfodetail (
655
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
656
  , DetailNo decimal(3,0) not null comment '??????'
657
  , DetailString varchar(300) comment '??????e'
658
  , EntryDate datetime not null comment '?o?^???t'
659
  , UpdateDate datetime not null comment '?X?V???t'
660
  , constraint constructionbaseinfodetail_PKC primary key (ConstructionCode,DetailNo)
661
) comment '?H????{????' ;
662

    
663
create index BaseInfoDetail_Idx1
664
  on constructionbaseinfodetail(ConstructionCode);
665

    
666
create index BaseInfoDetail_Idx2
667
  on constructionbaseinfodetail(DetailNo);
668

    
669
-- ?H???{?H?\?Z?f?[?^
670
--* BackupToTempTable
671
drop table if exists constructionbudget cascade;
672

    
673
--* RestoreFromTempTable
674
create table constructionbudget (
675
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
676
  , CreatorCode decimal(8,0) not null comment '????R?[?h'
677
  , CreatorName varchar(60) comment '?????'
678
  , CreatorCosts decimal(11,0) not null comment '??????^'
679
  , AssistantCode decimal(8,0) not null comment '???S????R?[?h'
680
  , AssistantName varchar(60) comment '???S?????'
681
  , AssistantCosts decimal(11,0) not null comment '???S??????^'
682
  , InstructorCode decimal(8,0) not null comment '?H???w?????R?[?h'
683
  , InstructorName varchar(60) comment '?H???w??????'
684
  , InstructorCosts decimal(11,0) not null comment '?H???w???????^'
685
  , CreateDate date not null comment '????'
686
  , ConstructionTimes decimal(5,2) not null comment '?H???i?P??E???j'
687
  , ConstructionStart date not null comment '?_??H???J?n'
688
  , ConstructionEnd date not null comment '?_??H??????'
689
  , InstructorTimes decimal(5,2) not null comment '?w???????????'
690
  , SalaryFlg decimal(1,0) not null comment '???^?U????'
691
  , SalaryDays decimal(4,0) not null comment '?U??????'
692
  , A_SalaryFlg decimal(1,0) not null comment '???S??????^?U????'
693
  , A_SalaryDays decimal(4,0) not null comment '???S????U??????'
694
  , I_SalaryFlg decimal(1,0) not null comment '?w???????^?U????'
695
  , I_SalaryDays decimal(4,0) not null comment '?w?????U??????'
696
  , OrdersDecisionPrice decimal(12,0) not null comment '??????????z'
697
  , EntryDate datetime not null comment '?o?^???t'
698
  , UpdateDate datetime not null comment '?X?V???t'
699
  , constraint constructionbudget_PKC primary key (ConstructionCode)
700
) comment '?H???{?H?\?Z?f?[?^' ;
701

    
702
-- ?H???{?H?\?Z?f?[?^????
703
--* BackupToTempTable
704
drop table if exists constructionbudgetdetail cascade;
705

    
706
--* RestoreFromTempTable
707
create table constructionbudgetdetail (
708
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
709
  , GroupCount decimal(2,0) unsigned not null comment '?O???[?v???'
710
  , LineCount decimal(3,0) unsigned not null comment '?s???'
711
  , ComponentCode decimal(5,0) unsigned not null comment '?\???L?['
712
  , ItemCode decimal(5,0) unsigned not null comment '?H??L?['
713
  , FirstString varchar(120) comment '???????'
714
  , SecondString varchar(120) comment '?H?????e'
715
  , CompanyType decimal(1,0) not null comment '??????R?[?h?^?C?v'
716
  , CompanyCode decimal(8,0) not null comment '??????R?[?h'
717
  , CompanyName varchar(120) comment '?????????'
718
  , EstimatePrice decimal(12,0) not null comment '??Z????????z'
719
  , NegotiationPrice decimal(12,0) not null comment '??Z????????z'
720
  , OrderDesiredAmount decimal(12,0) not null comment '??????]???z'
721
  , ExecutionAmount decimal(12,0) not null comment '???s???z'
722
  , AmountConfigRate decimal(5,2) not null comment '???z?\????'
723
  , NegotiateFlg decimal(1,0) not null comment '?????????t???O'
724
  , EntryDate datetime not null comment '?o?^???t'
725
  , UpdateDate datetime not null comment '?X?V???t'
726
  , constraint constructionbudgetdetail_PKC primary key (ConstructionCode,GroupCount,LineCount)
727
) comment '?H???{?H?\?Z?f?[?^????' ;
728

    
729
-- ?H??}?X?^
730
--* BackupToTempTable
731
drop table if exists constructionitemmaster cascade;
732

    
733
--* RestoreFromTempTable
734
create table constructionitemmaster (
735
  ItemCode decimal(5,0) unsigned not null comment '?H??L?['
736
  , DisplayOrder decimal(5,0) unsigned not null comment '?\????'
737
  , ItemName varchar(120) not null comment '?H????'
738
  , SubItemsFlg decimal(1,0) comment '???????t???O'
739
  , MyExpensesFlg decimal(1,0) not null comment '????o??t???O'
740
  , DeleteFlg decimal(1,0) not null comment '???t???O'
741
  , EntryDate datetime not null comment '?o?^???t'
742
  , UpdateDate datetime not null comment '?X?V???t'
743
  , constraint constructionitemmaster_PKC primary key (ItemCode)
744
) comment '?H??}?X?^' ;
745

    
746
-- ?H???????f?[?^
747
--* BackupToTempTable
748
drop table if exists constructionledger cascade;
749

    
750
--* RestoreFromTempTable
751
create table constructionledger (
752
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
753
  , ConstructionPeriod decimal(4,0) unsigned not null comment '?????'
754
  , CreatorCode decimal(8,0) comment '????R?[?h'
755
  , CreatorName varchar(60) comment '?????'
756
  , CreateDate date not null comment '????'
757
  , ConstructionTimes decimal(5,2) not null comment '?H???i?P??E???j'
758
  , ConstructionStart date not null comment '?_??H???J?n'
759
  , ConstructionEnd date not null comment '?_??H??????'
760
  , OrdersDecisionPrice decimal(14,0) not null comment '??????????z'
761
  , CompanyExpenses decimal(10,0) not null comment '???o???v'
762
  , DepartmentExpenses decimal(10,0) not null comment '?????o???v'
763
  , SalesExpenses decimal(10,0) not null comment '?c??o???v'
764
  , TotalPayment decimal(10,0) not null comment '???x???z'
765
  , GrossProfit decimal(10,0) not null comment '?e??'
766
  , Allowance decimal(10,0) not null comment '???^'
767
  , NetProfit decimal(10,0) not null comment '?????v'
768
  , ComplateFlg decimal(1,0) not null comment '????????t???O'
769
  , IntegrationFlg decimal(1,0) not null comment '????z??Z?t???O'
770
  , EntryDate datetime not null comment '?o?^???t'
771
  , UpdateDate datetime not null comment '?X?V???t'
772
  , constraint constructionledger_PKC primary key (ConstructionCode)
773
) comment '?H???????f?[?^' ;
774

    
775
create index constructionledger_Index1
776
  on constructionledger(ConstructionStart);
777

    
778
create index constructionledger_Index2
779
  on constructionledger(ConstructionEnd);
780

    
781
-- ?H??????????f?[?^
782
--* BackupToTempTable
783
drop table if exists constructionledgerdetail cascade;
784

    
785
--* RestoreFromTempTable
786
create table constructionledgerdetail (
787
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
788
  , GroupCount decimal(2,0) unsigned not null comment '?O???[?v???'
789
  , LineCount decimal(4,0) unsigned not null comment '?s???'
790
  , ComponentCode decimal(5,0) unsigned not null comment '?\???L?['
791
  , ItemCode decimal(5,0) unsigned not null comment '?H??L?['
792
  , FirstString varchar(120) comment '???????'
793
  , SecondString varchar(120) comment '?H?????e'
794
  , CompanyType decimal(1,0) not null comment '??????R?[?h?^?C?v'
795
  , CompanyCode decimal(8,0) not null comment '??????R?[?h'
796
  , CompanyName varchar(120) comment '?????????'
797
  , EstimatePrice decimal(12,0) not null comment '?\?Z?i????j???z'
798
  , ExecutionAmount decimal(12,0) not null comment '???s???z'
799
  , AmountConfigRate decimal(5,2) not null comment '???z?\????'
800
  , PaymentBurden decimal(12,0) not null comment '?x????U?z'
801
  , FixDataFlg decimal(1,0) not null comment '???f?[?^?t???O'
802
  , IndependentFlg decimal(1,0) not null comment '????f?[?^?t???O'
803
  , FluctuationFlg decimal(1,0) not null comment '?????f?[?^?t???O'
804
  , SalaryFlg decimal(1,0) not null comment '???^?U????'
805
  , SalaryDays decimal(4,0) not null comment '???^?U??????'
806
  , OperatingFlg decimal(1,0) not null comment '?S?????t???O'
807
  , SourceCode decimal(10,0) unsigned not null comment '???H?????'
808
  , JoinTitleFlg decimal(1,0) not null comment '?H??????^?C?g??'
809
  , SalaryOnRegist decimal(12,0) not null comment '?o?^?????z???^'
810
  , PurchaseOrderFlg decimal(2,0) not null comment '?????????s?t???O'
811
  , DetailCount decimal(4,0) unsigned not null comment '??????'
812
  , EntryDate datetime not null comment '?o?^???t'
813
  , UpdateDate datetime not null comment '?X?V???t'
814
  , constraint constructionledgerdetail_PKC primary key (ConstructionCode,GroupCount,LineCount)
815
) comment '?H??????????f?[?^' ;
816

    
817
create index LedgerDetail_Index01
818
  on constructionledgerdetail(ConstructionCode);
819

    
820
create index LedgerDetail_Index02
821
  on constructionledgerdetail(GroupCount);
822

    
823
create index LedgerDetail_Index03
824
  on constructionledgerdetail(LineCount);
825

    
826
create index LedgerDetail_Index04
827
  on constructionledgerdetail(SourceCode);
828

    
829
create index LedgerDetail_Index05
830
  on constructionledgerdetail(DetailCount);
831

    
832
create index LedgerDetail_Index06
833
  on constructionledgerdetail(SalaryFlg);
834

    
835
create index LedgerDetail_Index07
836
  on constructionledgerdetail(CompanyCode);
837

    
838
-- ?H?????????s?f?[?^
839
--* BackupToTempTable
840
drop table if exists constructionledgerexcute cascade;
841

    
842
--* RestoreFromTempTable
843
create table constructionledgerexcute (
844
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
845
  , GroupCount decimal(2,0) unsigned not null comment '?O???[?v???'
846
  , LineCount decimal(4,0) unsigned not null comment '?s???'
847
  , ColumnCount decimal(3,0) not null comment '????'
848
  , PaymentAmount decimal(12,0) not null comment '?x?????z'
849
  , TargetMonth date not null comment '???N??'
850
  , EntryDate datetime not null comment '?o?^???t'
851
  , UpdateDate datetime not null comment '?X?V???t'
852
  , constraint constructionledgerexcute_PKC primary key (ConstructionCode,GroupCount,LineCount,ColumnCount)
853
) comment '?H?????????s?f?[?^' ;
854

    
855
create index LedgerExcute_Index1
856
  on constructionledgerexcute(ConstructionCode,TargetMonth,GroupCount,LineCount);
857

    
858
-- ?H???????N???
859
--* BackupToTempTable
860
drop table if exists constructionlink cascade;
861

    
862
--* RestoreFromTempTable
863
create table constructionlink (
864
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
865
  , FluctuationCode decimal(10,0) not null comment '?q?H?????'
866
  , LinkType decimal(1,0) not null comment '?????N???'
867
  , EntryDate datetime not null comment '?o?^???t'
868
  , UpdateDate datetime not null comment '?X?V???t'
869
  , constraint constructionlink_PKC primary key (ConstructionCode,FluctuationCode)
870
) comment '?H???????N???' ;
871

    
872
create index ConstructionLink_Index1
873
  on constructionlink(ConstructionCode);
874

    
875
create index ConstructionLink_Index2
876
  on constructionlink(FluctuationCode);
877

    
878
create index ConstructionLink_Index3
879
  on constructionlink(LinkType);
880

    
881
-- ?H????????
882
--* BackupToTempTable
883
drop table if exists constructionmaterialinfo cascade;
884

    
885
--* RestoreFromTempTable
886
create table constructionmaterialinfo (
887
  CONSTRUCTIONCODE int(10) unsigned default 0 not null comment '?H?????'
888
  , MATERIALITEMCODE smallint(5) unsigned default 0 not null comment '????i??R?[?h'
889
  , PROCESSDATE datetime default '0000-00-00 00:00:00' not null comment '?????N????'
890
  , RENTCOUNT smallint(5) unsigned comment '??o??'
891
  , REPAYCOUNT smallint(5) unsigned comment '??p??'
892
  , JUNKCOUNT smallint(5) unsigned comment '?j????'
893
  , COMPLETEFLG tinyint(3) unsigned comment '?????t???O'
894
  , ENTRYDATE datetime comment '?o?^???t'
895
  , UPDATEDATE datetime comment '?X?V???t'
896
  , constraint constructionmaterialinfo_PKC primary key (CONSTRUCTIONCODE,MATERIALITEMCODE,PROCESSDATE)
897
) comment '?H????????' ;
898

    
899
-- ????i?????t?f?[?^
900
--* BackupToTempTable
901
drop table if exists constructionprogressdate cascade;
902

    
903
--* RestoreFromTempTable
904
create table constructionprogressdate (
905
  ConstructionCode decimal(10,0) not null comment '?H?????'
906
  , ConstructionStatusFlg decimal(2,0) not null comment '???H?????'
907
  , PreviousStatusFlg decimal(2,0) comment '??X?O???'
908
  , ChangeDate datetime not null comment '?????t'
909
  , ChangePersonCode decimal(8,0) not null comment '???S????'
910
  , EntryDate datetime not null comment '?o?^???t'
911
  , UpdateDate datetime not null comment '?X?V???t'
912
  , constraint constructionprogressdate_PKC primary key (ConstructionCode,ChangeDate)
913
) comment '????i?????t?f?[?^' ;
914

    
915
create index ConstrProg_Index1
916
  on constructionprogressdate(ConstructionCode);
917

    
918
create index ConstrProg_Index2
919
  on constructionprogressdate(ConstructionStatusFlg);
920

    
921
create index ConstrProg_Index3
922
  on constructionprogressdate(ChangeDate);
923

    
924
-- ???}?X?^
925
--* BackupToTempTable
926
drop table if exists constructionspecmaster cascade;
927

    
928
--* RestoreFromTempTable
929
create table constructionspecmaster (
930
  ItemCode decimal(5,0) unsigned not null comment '?H??L?['
931
  , SpecCode decimal(5,0) unsigned not null comment '???L?['
932
  , DisplayOrder decimal(5,0) unsigned not null comment '?\????'
933
  , ItemName varchar(120) comment '??????'
934
  , SpecName varchar(120) comment '??????'
935
  , UnitName varchar(30) comment '?P?????'
936
  , UnitPrice decimal(9,2) not null comment '?P??'
937
  , DeleteFlg decimal(1,0) not null comment '???t???O'
938
  , EntryDate datetime not null comment '?o?^???t'
939
  , UpdateDate datetime not null comment '?X?V???t'
940
  , constraint constructionspecmaster_PKC primary key (ItemCode,SpecCode)
941
) comment '???}?X?^' ;
942

    
943
create index ConstructionSpecMaster_Index1
944
  on constructionspecmaster(DisplayOrder);
945

    
946
-- ???P???}?X?^
947
--* BackupToTempTable
948
drop table if exists constructionspecunitprice cascade;
949

    
950
--* RestoreFromTempTable
951
create table constructionspecunitprice (
952
  ComponentCode decimal(5,0) unsigned not null comment '?\???L?['
953
  , ItemCode decimal(5,0) unsigned not null comment '?H??L?['
954
  , SpecCode decimal(5,0) unsigned not null comment '???L?['
955
  , ConstructionTypeCode mediumint(8) unsigned not null comment '?H?????R?[?h'
956
  , UnitPrice decimal(9,2) not null comment '?P??'
957
  , EntryDate datetime not null comment '?o?^???t'
958
  , UpdateDate datetime not null comment '?X?V???t'
959
  , constraint constructionspecunitprice_PKC primary key (ComponentCode,ItemCode,SpecCode,ConstructionTypeCode)
960
) comment '???P???}?X?^' ;
961

    
962
-- ?H?????}?X?^
963
--* BackupToTempTable
964
drop table if exists constructiontypemaster cascade;
965

    
966
--* RestoreFromTempTable
967
create table constructiontypemaster (
968
  TypeCode decimal(5,0) unsigned not null comment '?H?????R?[?h'
969
  , DisplayOrder decimal(5,0) unsigned not null comment '?\????'
970
  , NameString varchar(100) not null comment '????'
971
  , PublicFlg decimal(1,0) not null comment '?????t???O'
972
  , RepairFlg decimal(1,0) not null comment '?V?z?E???C?t???O'
973
  , SecRank decimal(1,0) not null comment '?????????N'
974
  , ExpensesLink decimal(1,0) not null comment '?o??g?p??'
975
  , DeleteFlg decimal(1,0) not null comment '???t???O'
976
  , EntryDate datetime not null comment '?o?^???t'
977
  , UpdateDate datetime not null comment '?X?V???t'
978
  , constraint constructiontypemaster_PKC primary key (TypeCode)
979
) comment '?H?????}?X?^' ;
980

    
981
-- ?????o?[?f?[?^
982
--* BackupToTempTable
983
drop table if exists costdataofdepartment cascade;
984

    
985
--* RestoreFromTempTable
986
create table costdataofdepartment (
987
  DepartmentCode decimal(5,0) unsigned not null comment '?????R?[?h'
988
  , ConstrYear smallint(5) unsigned not null comment '?H???????E?N??'
989
  , SeqNo decimal(5,0) unsigned not null comment '?f?[?^???'
990
  , CostDate date not null comment '?????t'
991
  , DepartmentName varchar(100) not null comment '??????'
992
  , SuppliersCode decimal(8,0) unsigned not null comment '?o?[??R?[?h'
993
  , SuppliersName varchar(120) comment '?o?[??'
994
  , PaymentContent varchar(100) comment '?o?[???e'
995
  , SendReceiveFlg decimal(1,0) not null comment '?o?[?t???O'
996
  , EntryPrice decimal(12,0) not null comment '???z?i????j'
997
  , EntryTax decimal(12,0) not null comment '???z?i????j'
998
  , Coment varchar(100) comment '???l'
999
  , EntryDate datetime not null comment '?o?^???t'
1000
  , UpdateDate datetime not null comment '?X?V???t'
1001
  , constraint costdataofdepartment_PKC primary key (DepartmentCode,ConstrYear,SeqNo)
1002
) comment '?????o?[?f?[?^' ;
1003

    
1004
-- ?S??????o??f?[?^
1005
--* BackupToTempTable
1006
drop table if exists costdataofperson cascade;
1007

    
1008
--* RestoreFromTempTable
1009
create table costdataofperson (
1010
  PersonCode decimal(8,0) unsigned not null comment '?S????R?[?h'
1011
  , ActionDate date not null comment '?????t'
1012
  , DataType decimal(1,0) not null comment '?f?[?^??'
1013
  , DataAddCount decimal(5,0) unsigned not null comment '?f?[?^??????'
1014
  , TargetMonth varchar(7) not null comment '???N??'
1015
  , ConstructionCode decimal(10,0) unsigned comment '?H???R?[?h'
1016
  , SuppliersCode decimal(5,0) unsigned not null comment '?x????R?[?h'
1017
  , SuppliersName varchar(120) comment '?x??????'
1018
  , PaymentContent varchar(60) comment '?x?????e'
1019
  , PaymentType decimal(1,0) not null comment '?x?????@?t???O'
1020
  , EntryPrice decimal(12,0) not null comment '???z?i????j'
1021
  , EntryPriceInTax decimal(12,0) not null comment '???z?i????j'
1022
  , SlipNumber varchar(12) comment '?`?[???'
1023
  , ComplateFlg decimal(1,0) not null comment '???????t???O'
1024
  , ApprovalFlg decimal(1,0) not null comment '???F?t???O'
1025
  , EntryDate datetime not null comment '?o?^???t'
1026
  , UpdateDate datetime not null comment '?X?V???t'
1027
  , constraint costdataofperson_PKC primary key (PersonCode,ActionDate,DataType,DataAddCount)
1028
) comment '?S??????o??f?[?^' ;
1029

    
1030
create index CostDataOfPerson_Index1
1031
  on costdataofperson(TargetMonth);
1032

    
1033
create index CostDataOfPerson_Index2
1034
  on costdataofperson(ConstructionCode);
1035

    
1036
-- ??????o?^?\???f?[?^
1037
--* BackupToTempTable
1038
drop table if exists costomerregist cascade;
1039

    
1040
--* RestoreFromTempTable
1041
create table costomerregist (
1042
  CreatePersonCode decimal(8,0) unsigned not null comment '?\??????'
1043
  , CreateDate date not null comment '????'
1044
  , SeqNo decimal(2,0) not null comment '?L?[?A??'
1045
  , DataMode decimal(1,0) not null comment '?f?[?^??'
1046
  , SourceCotegory decimal(5,0) unsigned not null comment '???????'
1047
  , SourceCode decimal(5,0) unsigned not null comment '??????R?[?h'
1048
  , PetitionPeriod decimal(4,0) unsigned not null comment '?????'
1049
  , OrderFlg decimal(1,0) not null comment '?@?l?c??E??l?t???O'
1050
  , CorporateStatusName varchar(100) comment '?@?l?i????'
1051
  , CorporateStatusPoint decimal(1,0) comment '?@?l?i?????u'
1052
  , OrderersName1 varchar(60) not null comment '???????1'
1053
  , OrderersName2 varchar(60) comment '????????Q'
1054
  , DepartmentName varchar(60) comment '??????'
1055
  , PersonName varchar(60) comment '?S?????'
1056
  , ZipCode varchar(8) comment '?X????'
1057
  , Address1 varchar(60) comment '?Z???P'
1058
  , Address2 varchar(60) comment '?Z??2'
1059
  , Address3 varchar(60) comment '?Z??3'
1060
  , PhoneNumber varchar(13) comment '?d?b???'
1061
  , FaxNumber varchar(13) comment 'FAX???'
1062
  , MailAddress varchar(257) comment '???[???A?h???X'
1063
  , Note varchar(300) comment '???l'
1064
  , OrderCotegory decimal(5,0) unsigned not null comment '???????'
1065
  , OrderDate date not null comment '?\????'
1066
  , OrderNo decimal(2,0) unsigned not null comment '?\????t???'
1067
  , CreateDepartmentCode decimal(5,0) unsigned not null comment '?\???????R?[?h'
1068
  , CreateDepartmentName varchar(60) comment '?\????????'
1069
  , EntryDate datetime not null comment '?o?^???t'
1070
  , UpdateDate datetime not null comment '?X?V???t'
1071
  , constraint costomerregist_PKC primary key (CreatePersonCode,CreateDate,SeqNo)
1072
) comment '??????o?^?\???f?[?^' ;
1073

    
1074
create index CostomerRegist_Index1
1075
  on costomerregist(PetitionPeriod);
1076

    
1077
create index CostomerRegist_Index2
1078
  on costomerregist(CreatePersonCode);
1079

    
1080
create index CostomerRegist_Index3
1081
  on costomerregist(CreateDepartmentCode);
1082

    
1083
-- ????f?[?^
1084
--* BackupToTempTable
1085
drop table if exists dailydataconstruction cascade;
1086

    
1087
--* RestoreFromTempTable
1088
create table dailydataconstruction (
1089
  PersonCode decimal(8,0) unsigned not null comment '?S????R?[?h'
1090
  , DailyDataDate date not null comment '???????'
1091
  , ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
1092
  , Weather varchar(60) comment '?V?C'
1093
  , EntryDate datetime not null comment '?o?^???t'
1094
  , UpdateDate datetime not null comment '?X?V???t'
1095
  , constraint dailydataconstruction_PKC primary key (PersonCode,DailyDataDate,ConstructionCode)
1096
) comment '????f?[?^' ;
1097

    
1098
create index DailyDataConstruction_Index1
1099
  on dailydataconstruction(PersonCode);
1100

    
1101
create index DailyDataConstruction_Index2
1102
  on dailydataconstruction(DailyDataDate);
1103

    
1104
create index DailyDataConstruction_Index3
1105
  on dailydataconstruction(ConstructionCode);
1106

    
1107
-- ????f?[?^ (????)
1108
--* BackupToTempTable
1109
drop table if exists dailydatadetail cascade;
1110

    
1111
--* RestoreFromTempTable
1112
create table dailydatadetail (
1113
  PersonCode decimal(8,0) unsigned not null comment '?S????R?[?h'
1114
  , DailyDataDate date not null comment '???????'
1115
  , ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
1116
  , SeqNo decimal(3,0) unsigned not null comment '????s???'
1117
  , JobCategoryCode decimal(5,0) not null comment '?E??L?['
1118
  , CompanyCode decimal(8,0) not null comment '??????R?[?h'
1119
  , TodayHeadCount decimal(4,1) not null comment '?????l????'
1120
  , TotalHeadCount decimal(5,1) not null comment '??v?l????'
1121
  , TodayWork varchar(100) comment '?????????e'
1122
  , NextdayWork varchar(100) comment '?????????e'
1123
  , NextdayHeadCount decimal(4,1) not null comment '?????l????'
1124
  , EntryDate datetime not null comment '?o?^???t'
1125
  , UpdateDate datetime not null comment '?X?V???t'
1126
  , constraint dailydatadetail_PKC primary key (PersonCode,DailyDataDate,ConstructionCode,SeqNo)
1127
) comment '????f?[?^ (????)' ;
1128

    
1129
create index DailyDataDetail_Index
1130
  on dailydatadetail(PersonCode,DailyDataDate,ConstructionCode);
1131

    
1132
-- ????f?[?^ (??????)
1133
--* BackupToTempTable
1134
drop table if exists dailydatafield cascade;
1135

    
1136
--* RestoreFromTempTable
1137
create table dailydatafield (
1138
  PersonCode decimal(8,0) unsigned not null comment '????R?[?h'
1139
  , DailyDataDate date not null comment '???????'
1140
  , ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
1141
  , SeqNo decimal(3,0) unsigned not null comment '????s???'
1142
  , PatrolTime datetime not null comment '?????'
1143
  , ContentsText varchar(200) comment '???e'
1144
  , EntryDate datetime not null comment '?o?^???t'
1145
  , UpdateDate datetime not null comment '?X?V???t'
1146
  , constraint dailydatafield_PKC primary key (PersonCode,DailyDataDate,ConstructionCode,SeqNo)
1147
) comment '????f?[?^ (??????)' ;
1148

    
1149
create index DailyDataField_Index
1150
  on dailydatafield(PersonCode,DailyDataDate,ConstructionCode);
1151

    
1152
-- ????f?[?^ (????)
1153
--* BackupToTempTable
1154
drop table if exists dailydatamaterials cascade;
1155

    
1156
--* RestoreFromTempTable
1157
create table dailydatamaterials (
1158
  PersonCode decimal(8,0) unsigned not null comment '????R?[?h'
1159
  , DailyDataDate date not null comment '???????'
1160
  , ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
1161
  , SeqNo decimal(3,0) unsigned not null comment '????s???'
1162
  , Materials varchar(100) comment '?????'
1163
  , Quantity varchar(100) comment '????'
1164
  , Production varchar(100) comment '??????'
1165
  , Delivery varchar(100) comment '?[?????'
1166
  , QualityControl varchar(100) comment '?i?????????'
1167
  , EntryDate datetime not null comment '?o?^???t'
1168
  , UpdateDate datetime not null comment '?X?V???t'
1169
  , constraint dailydatamaterials_PKC primary key (PersonCode,DailyDataDate,ConstructionCode,SeqNo)
1170
) comment '????f?[?^ (????)' ;
1171

    
1172
create index DailyDataMaterials_Index
1173
  on dailydatamaterials(PersonCode,DailyDataDate,ConstructionCode);
1174

    
1175
-- ????f?[?^ (??????w??)
1176
--* BackupToTempTable
1177
drop table if exists dailydatasubcontractors cascade;
1178

    
1179
--* RestoreFromTempTable
1180
create table dailydatasubcontractors (
1181
  PersonCode decimal(8,0) unsigned not null comment '????R?[?h'
1182
  , DailyDataDate date not null comment '???????'
1183
  , ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
1184
  , SeqNo decimal(3,0) unsigned not null comment '????s???'
1185
  , Attendee varchar(100) comment '?o???'
1186
  , ContentsText varchar(200) comment '???e'
1187
  , EntryDate datetime not null comment '?o?^???t'
1188
  , UpdateDate datetime not null comment '?X?V???t'
1189
  , constraint dailydatasubcontractors_PKC primary key (PersonCode,DailyDataDate,ConstructionCode,SeqNo)
1190
) comment '????f?[?^ (??????w??)' ;
1191

    
1192
create index DailyDataSubcontractors_Index
1193
  on dailydatasubcontractors(PersonCode,DailyDataDate,ConstructionCode);
1194

    
1195
-- ????f?[?^ (???)
1196
--* BackupToTempTable
1197
drop table if exists dailydatavehicles cascade;
1198

    
1199
--* RestoreFromTempTable
1200
create table dailydatavehicles (
1201
  PersonCode decimal(8,0) unsigned not null comment '????R?[?h'
1202
  , DailyDataDate date not null comment '???????'
1203
  , ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
1204
  , SeqNo decimal(3,0) unsigned not null comment '????s???'
1205
  , Model varchar(100) comment '?@??'
1206
  , Performance varchar(100) comment '???\'
1207
  , Owner varchar(100) comment '???L???'
1208
  , Driver varchar(100) comment '?????^?]??'
1209
  , StartWorkingTime datetime not null comment '??????J?n'
1210
  , EndWorkingTime datetime not null comment '??????I??'
1211
  , EntryDate datetime not null comment '?o?^???t'
1212
  , UpdateDate datetime not null comment '?X?V???t'
1213
  , constraint dailydatavehicles_PKC primary key (PersonCode,DailyDataDate,ConstructionCode,SeqNo)
1214
) comment '????f?[?^ (???)' ;
1215

1216
create index DailyDataVehicles_Index
1217
  on dailydatavehicles(PersonCode,DailyDataDate,ConstructionCode);
1218

1219
-- ???}?X?^
1220
--* BackupToTempTable
1221
drop table if exists daymaster cascade;
1222

1223
--* RestoreFromTempTable
1224
create table daymaster (
1225
  days smallint(6) not null comment '??'
1226
  , constraint daymaster_PKC primary key (days)
1227
) comment '???}?X?^' ;
1228

1229
-- ?????}?X?^
1230
--* BackupToTempTable
1231
drop table if exists deadlinemaster cascade;
1232

1233
--* RestoreFromTempTable
1234
create table deadlinemaster (
1235
  LABOURKIND decimal(1,0) default '0' not null comment '??????'
1236
  , DEADLINE decimal(2,0) comment '????'
1237
  , PAYDAY decimal(2,0) comment '?x????'
1238
  , NOTE varchar(120) comment '???l'
1239
  , DELETEFLG decimal(1,0) comment '???t???O'
1240
  , ENTRYDATE datetime comment '?o?^???t'
1241
  , UPDATEDATE datetime comment '?X?V???t'
1242
  , constraint deadlinemaster_PKC primary key (LABOURKIND)
1243
) comment '?????}?X?^' ;
1244

1245
-- ?????o???}?X?^
1246
--* BackupToTempTable
1247
drop table if exists departmentexpensesmaster cascade;
1248

1249
--* RestoreFromTempTable
1250
create table departmentexpensesmaster (
1251
  DepartmentCode decimal(5,0) unsigned not null comment '?????R?[?h'
1252
  , ExpensesPeriod smallint(6) not null comment '?????'
1253
  , NameCode decimal(5,0) unsigned not null comment '?o??R?[?h'
1254
  , NameString varchar(100) not null comment '????'
1255
  , DisplayOrder decimal(5,0) unsigned not null comment '?\????'
1256
  , ExpensesRaito decimal(4,2) not null comment '?o??'
1257
  , DeleteFlg decimal(1,0) not null comment '???t???O'
1258
  , EntryDate datetime not null comment '?o?^???t'
1259
  , UpdateDate datetime not null comment '?X?V???t'
1260
  , constraint departmentexpensesmaster_PKC primary key (DepartmentCode,ExpensesPeriod,NameCode)
1261
) comment '?????o???}?X?^' ;
1262

1263
-- ?????}?X?^
1264
--* BackupToTempTable
1265
drop table if exists departmentmaster cascade;
1266

1267
--* RestoreFromTempTable
1268
create table departmentmaster (
1269
  DepartmentCode decimal(5,0) unsigned not null comment '?????R?[?h'
1270
  , DisplayOrder decimal(5,0) unsigned not null comment '?\????'
1271
  , DepartmentString varchar(100) not null comment '??????'
1272
  , ActionScheduleFlg decimal(1,0) not null comment '?s???\??\???t???O'
1273
  , StaffAssignFlg decimal(1,0) not null comment '?l???z?u?\???t???O'
1274
  , StartDate datetime not null comment '?J?n???t'
1275
  , CompDate datetime not null comment '?I?????t'
1276
  , DeleteFlg decimal(1,0) not null comment '???t???O'
1277
  , EntryDate datetime not null comment '?o?^???t'
1278
  , UpdateDate datetime not null comment '?X?V???t'
1279
  , constraint departmentmaster_PKC primary key (DepartmentCode)
1280
) comment '?????}?X?^' ;
1281

1282
create index DepartmentMaster_index1
1283
  on departmentmaster(DisplayOrder);
1284

1285
-- ?????m?F???F?f?[?^
1286
--* BackupToTempTable
1287
drop table if exists depositapprovalinfo cascade;
1288

1289
--* RestoreFromTempTable
1290
create table depositapprovalinfo (
1291
  ORDERERSDIVISION decimal(5,0) not null comment '???????'
1292
  , ORDERERSCODE decimal(5,0) not null comment '??????R?[?h'
1293
  , TARGETDATE decimal(6,0) not null comment '???N??'
1294
  , SEQNO decimal(3,0) not null comment '?A??'
1295
  , LINECOUNT decimal(3,0) not null comment '?s???'
1296
  , APPROVALNO decimal(3,0) not null comment '???F????'
1297
  , APPROVALPERSON decimal(8,0) comment '???F??R?[?h'
1298
  , APPROVALPERSONNAME varchar(20) comment '???F???'
1299
  , APPROVALAUTHORITY decimal(1,0) comment '???F??????'
1300
  , APPROVALDATE date comment '???F???t'
1301
  , ENTRYDATE datetime comment '?o?^???t'
1302
  , UPDATEDATE datetime comment '?X?V???t'
1303
  , constraint depositapprovalinfo_PKC primary key (ORDERERSDIVISION,ORDERERSCODE,TARGETDATE,SEQNO,LINECOUNT,APPROVALNO)
1304
) comment '?????m?F???F?f?[?^' ;
1305

1306
-- ?????f?[?^
1307
--* BackupToTempTable
1308
drop table if exists depositdata cascade;
1309

1310
--* RestoreFromTempTable
1311
create table depositdata (
1312
  ORDERERSDIVISION decimal(5,0) not null comment '???????'
1313
  , ORDERERSCODE decimal(5,0) not null comment '??????R?[?h'
1314
  , TARGETDATE decimal(6,0) not null comment '???N??'
1315
  , SEQNO decimal(3,0) not null comment '?A??'
1316
  , BUSINESSPERIOD decimal(4,0) comment '?c???'
1317
  , DEPOSITDATE date comment '??????'
1318
  , DEPOSITAMOUNT decimal(12,0) comment '???????z'
1319
  , DEPOSITAMOUNTCASH decimal(10,0) comment '???????z?i?????j'
1320
  , DEPOSITAMOUNTBILL decimal(10,0) comment '???????z?i??`?j'
1321
  , DEPOSITPERSONCODE decimal(8,0) not null comment '?????S????R?[?h'
1322
  , NOTE varchar(120) comment '???l'
1323
  , ENTRYDATE datetime comment '?o?^???t'
1324
  , UPDATEDATE datetime comment '?X?V???t'
1325
  , constraint depositdata_PKC primary key (ORDERERSDIVISION,ORDERERSCODE,TARGETDATE,SEQNO)
1326
) comment '?????f?[?^' ;
1327

1328
-- ????????f?[?^
1329
--* BackupToTempTable
1330
drop table if exists depositdatadetail cascade;
1331

1332
--* RestoreFromTempTable
1333
create table depositdatadetail (
1334
  ORDERERSDIVISION decimal(5,0) not null comment '???????'
1335
  , ORDERERSCODE decimal(5,0) not null comment '??????R?[?h'
1336
  , TARGETDATE decimal(6,0) not null comment '???N??'
1337
  , REQUESTNO decimal(10,0) not null comment '????No'
1338
  , ORDERNO decimal(2,0) comment '??t???'
1339
  , DEPOSITAMOUNT decimal(10,0) comment '???????z?i??????j'
1340
  , TAXAMOUNT decimal(10,0) DEFAULT NULL COMMENT '?????'
1341
  , DISCOUNTAMOUNT decimal(10,0) comment '?l???????z'
1342
  , CNSTRPRICE decimal(10,0) comment '?????'
1343
  , FEES decimal(10,0) comment '????'
1344
  , OTHERADJUSTMENTS decimal(10,0) comment '?????'
1345
  , DIFFERENCEAMOUNT decimal(10,0) comment '????'
1346
  , CONFIRMATIONPERSONCODE decimal(8,0) comment '?m?F?S????R?[?h'
1347
  , CONFIRMATIONDATE date comment '?S????m?F???t'
1348
  , CONFIRMATIONENDFLG decimal(1,0) comment '?m?F?????t???O'
1349
  , NOTE varchar(120) comment '???l'
1350
  , ENTRYDATE datetime comment '?o?^???t'
1351
  , UPDATEDATE datetime comment '?X?V???t'
1352
  , constraint depositdatadetail_PKC primary key (ORDERERSDIVISION,ORDERERSCODE,TARGETDATE,REQUESTNO)
1353
) comment '????????f?[?^' ;
1354

1355
-- ???}?X?^
1356
--* BackupToTempTable
1357
drop table if exists divisionmaster cascade;
1358

1359
--* RestoreFromTempTable
1360
create table divisionmaster (
1361
  DivisionCode decimal(5,0) unsigned not null comment '???R?[?h'
1362
  , NameCode decimal(5,0) unsigned not null comment '????R?[?h'
1363
  , DisplayOrder decimal(5,0) unsigned not null comment '?\????'
1364
  , NameString varchar(100) not null comment '????'
1365
  , DeleteFlg decimal(1,0) not null comment '???t???O'
1366
  , EntryDate datetime not null comment '?o?^???t'
1367
  , UpdateDate datetime not null comment '?X?V???t'
1368
  , constraint divisionmaster_PKC primary key (DivisionCode,NameCode)
1369
) comment '???}?X?^' ;
1370

1371
-- ??Z?\?Z???f?[?^
1372
--* BackupToTempTable
1373
drop table if exists estimatebudget cascade;
1374

1375
--* RestoreFromTempTable
1376
create table estimatebudget (
1377
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
1378
  , ConstructionTime decimal(5,2) unsigned not null comment '?H??'
1379
  , IntegratedCode decimal(8,0) not null comment '??Z??'
1380
  , DataCreateDate datetime not null comment '?f?[?^??????'
1381
  , RetValue1 decimal(12,0) not null comment '?\???i'
1382
  , RetValue2 decimal(12,0) not null comment '????H????'
1383
  , RetValue3 decimal(12,0) not null comment '????????????'
1384
  , RetValue4 decimal(12,0) not null comment '????????????'
1385
  , RetPercent decimal(5,2) not null comment '???????'
1386
  , EntryDate datetime not null comment '?o?^???t'
1387
  , UpdateDate datetime not null comment '?X?V???t'
1388
  , constraint estimatebudget_PKC primary key (ConstructionCode)
1389
) comment '??Z?\?Z???f?[?^' ;
1390

1391
-- ??Z?\?Z????f?[?^????
1392
--* BackupToTempTable
1393
drop table if exists estimatebudgetdetail cascade;
1394

1395
--* RestoreFromTempTable
1396
create table estimatebudgetdetail (
1397
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
1398
  , GroupCount decimal(2,0) unsigned not null comment '?O???[?v???'
1399
  , LineCount decimal(3,0) unsigned not null comment '?s???'
1400
  , ComponentCode decimal(5,0) unsigned not null comment '?\???L?['
1401
  , ItemCode decimal(5,0) unsigned comment '?H??L?['
1402
  , CompanyCode decimal(8,0) not null comment '??????R?[?h'
1403
  , FirstString varchar(120) comment '???????'
1404
  , SecondString varchar(120) comment '?H????E???????'
1405
  , Content varchar(120) comment '???e'
1406
  , EstimatePrice decimal(12,0) not null comment '????????z'
1407
  , NegotiationPrice decimal(12,0) not null comment '????????z'
1408
  , Notes varchar(120) comment '???????'
1409
  , EntryDate datetime not null comment '?o?^???t'
1410
  , UpdateDate datetime not null comment '?X?V???t'
1411
  , constraint estimatebudgetdetail_PKC primary key (ConstructionCode,GroupCount,LineCount)
1412
) comment '??Z?\?Z????f?[?^????' ;
1413

1414
-- ??Z????f?[?^
1415
--* BackupToTempTable
1416
drop table if exists estimatedata cascade;
1417

1418
--* RestoreFromTempTable
1419
create table estimatedata (
1420
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
1421
  , LineCount decimal(3,0) unsigned not null comment '?s???'
1422
  , ComponentCode decimal(5,0) unsigned not null comment '?\???L?['
1423
  , FixedItemCode varchar(1) comment '?????L?['
1424
  , ItemName varchar(120) comment '??????'
1425
  , SpecName varchar(120) comment '???^?i???E?`??E???@'
1426
  , PriceValue decimal(14,0) not null comment '???z'
1427
  , note varchar(60) comment '???l'
1428
  , MyExpensesFlg decimal(1,0) not null comment '????o??t???O'
1429
  , InputFlg decimal(1,0) not null comment '????t???O'
1430
  , EntryDate datetime not null comment '?o?^???t'
1431
  , UpdateDate datetime not null comment '?X?V???t'
1432
  , constraint estimatedata_PKC primary key (ConstructionCode,LineCount)
1433
) comment '??Z????f?[?^' ;
1434

1435
create index EstimateData_Index1
1436
  on estimatedata(ConstructionCode,FixedItemCode);
1437

1438
-- ??Z????y?[?W?f?[?^
1439
--* BackupToTempTable
1440
drop table if exists estimatedatabody cascade;
1441

1442
--* RestoreFromTempTable
1443
create table estimatedatabody (
1444
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
1445
  , PageCount decimal(4,0) unsigned not null comment '?y?[?W???'
1446
  , Category decimal(1,0) not null comment '?y?[?W??'
1447
  , UnionComponentCode decimal(5,0) unsigned not null comment '?????\???L?['
1448
  , ComponentCode decimal(5,0) unsigned not null comment '?\???L?['
1449
  , ItemCode decimal(5,0) unsigned not null comment '?H??L?['
1450
  , SelectComponent decimal(5,0) unsigned not null comment '?I???\???L?['
1451
  , PageTitle varchar(120) not null comment '?y?[?W?\????'
1452
  , DetailLineCount decimal(3,0) unsigned not null comment '????s???'
1453
  , EntryDate datetime not null comment '?o?^???t'
1454
  , UpdateDate datetime not null comment '?X?V???t'
1455
  , constraint estimatedatabody_PKC primary key (ConstructionCode,PageCount)
1456
) comment '??Z????y?[?W?f?[?^' ;
1457

1458
create index EstimateDataBody_Index1
1459
  on estimatedatabody(ConstructionCode,ComponentCode,ItemCode);
1460

1461
-- ??Z????f?[?^????
1462
--* BackupToTempTable
1463
drop table if exists estimatedatadetail cascade;
1464

1465
--* RestoreFromTempTable
1466
create table estimatedatadetail (
1467
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
1468
  , PageCount decimal(4,0) unsigned not null comment '?y?[?W???'
1469
  , LineCount decimal(3,0) unsigned not null comment '?s???'
1470
  , DataType decimal(1,0) not null comment '?f?[?^???'
1471
  , ComponentCode decimal(5,0) unsigned not null comment '?\???L?['
1472
  , ItemCode decimal(5,0) unsigned not null comment '?H??L?['
1473
  , SpecCode decimal(5,0) unsigned not null comment '???L?['
1474
  , ItemName varchar(120) comment '??????'
1475
  , SpecName varchar(120) comment '???^?i???E?`??E???@'
1476
  , Unitcount decimal(8,2) not null comment '????'
1477
  , UnitName varchar(30) comment '?P?????'
1478
  , UnitPrice decimal(9,2) not null comment '?P??'
1479
  , LineTotal decimal(12,0) not null comment '???z'
1480
  , note varchar(60) comment '???l'
1481
  , CompanyCode decimal(8,0) not null comment '??????R?[?h'
1482
  , MyExpensesFlg decimal(1,0) not null comment '????o??t???O'
1483
  , InputFlg decimal(1,0) comment '????t???O'
1484
  , EntryDate datetime not null comment '?o?^???t'
1485
  , UpdateDate datetime not null comment '?X?V???t'
1486
  , constraint estimatedatadetail_PKC primary key (ConstructionCode,PageCount,LineCount)
1487
) comment '??Z????f?[?^????' ;
1488

1489
create index EstimateDataDetail_Index1
1490
  on estimatedatadetail(ConstructionCode,PageCount);
1491

1492
-- ?o???}?X?^
1493
--* BackupToTempTable
1494
drop table if exists expensesmaster cascade;
1495

1496
--* RestoreFromTempTable
1497
create table expensesmaster (
1498
  DivisionCode smallint(6) not null comment '?H?????R?[?h'
1499
  , NameCode smallint(6) not null comment '?o????R?[?h'
1500
  , DisplayOrder smallint(6) not null comment '?\????'
1501
  , ExpensesRatio decimal(4,2) not null comment '?o??'
1502
  , DeleteFlg decimal(1,0) not null comment '???t???O'
1503
  , EntryDate datetime not null comment '?o?^???t'
1504
  , UpdateDate datetime not null comment '?X?V???t'
1505
  , constraint expensesmaster_PKC primary key (DivisionCode,NameCode)
1506
) comment '?o???}?X?^' ;
1507

1508
-- ???x???}?X?^
1509
--* BackupToTempTable
1510
drop table if exists holidaycalendermaster cascade;
1511

1512
--* RestoreFromTempTable
1513
create table holidaycalendermaster (
1514
  Holiday date not null comment '?x??'
1515
  , BusinessYear smallint(5) unsigned not null comment '?c??N?x'
1516
  , TargetMonth tinyint(3) unsigned not null comment '?Y????'
1517
  , TargetDay tinyint(3) unsigned not null comment '?Y????'
1518
  , constraint holidaycalendermaster_PKC primary key (Holiday)
1519
) comment '???x???}?X?^' ;
1520

1521
create index HolidayCalender_Index1
1522
  on holidaycalendermaster(BusinessYear);
1523

1524
create index HolidayCalenderMaster_Index2
1525
  on holidaycalendermaster(TargetMonth);
1526

1527
create index HolidayCalenderMaster_Index3
1528
  on holidaycalendermaster(TargetDay);
1529

1530
-- ?????????????
1531
--* BackupToTempTable
1532
drop table if exists inputsearchlogdata cascade;
1533

1534
--* RestoreFromTempTable
1535
create table inputsearchlogdata (
1536
  ConstructionCode decimal(10,0) not null comment '?H???R?[?h'
1537
  , UsedProcessNo decimal(4,0) not null comment '?g?p?@?\???'
1538
  , DisplayOrder decimal(4,0) unsigned not null comment '?\????'
1539
  , DataType decimal(1,0) not null comment '?f?[?^???'
1540
  , InputCode decimal(10,0) comment '????R?[?h'
1541
  , constraint inputsearchlogdata_PKC primary key (ConstructionCode,UsedProcessNo,DisplayOrder)
1542
) comment '?????????????' ;
1543

1544
create index InputSearchLogData_Index1
1545
  on inputsearchlogdata(ConstructionCode,UsedProcessNo,InputCode);
1546

1547
-- ???????f?[?^
1548
--* BackupToTempTable
1549
drop table if exists invoicedata cascade;
1550

1551
--* RestoreFromTempTable
1552
create table invoicedata (
1553
  INVOICENO decimal(9,0) not null comment '??????No'
1554
  , ORDERERSDIVISION decimal(5,0) not null comment '???????'
1555
  , ORDERERSCODE decimal(5,0) not null comment '??????R?[?h'
1556
  , REQUESTMONTH decimal(6,0) not null comment '??????'
1557
  , SEQNO decimal(2,0) not null comment '?A??'
1558
  , CRETATEDATE date not null comment '????'
1559
  , REQUESTDATE date not null comment '??????'
1560
  , REQUESTNAME varchar(120) comment '??????'
1561
  , TOTALAMOUNT decimal(10,0) comment '???????v???z'
1562
  , TAXAMOUNT decimal(10,0) comment '???????z'
1563
  , COMMENT1 varchar(60) comment '?R?????g1'
1564
  , COMMENT2 varchar(60) comment '?R?????g2'
1565
  , COMMENT3 varchar(60) not null comment '?R?????g3'
1566
  , COMMENT4 varchar(60) not null comment '?R?????g4'
1567
  , COMMENT5 varchar(60) not null comment '?R?????g5'
1568
  , COMPLETEFLG decimal(1,0) default '0' not null comment '?????t???O'
1569
  , ENTRYDATE datetime not null comment '?o?^?N????'
1570
  , UPDATEDATE datetime not null comment '?X?V?N????'
1571
  , constraint invoicedata_PKC primary key (INVOICENO)
1572
) comment '???????f?[?^' ;
1573

1574
alter table invoicedata add unique ORDERERSDIVISION (ORDERERSDIVISION,ORDERERSCODE,REQUESTMONTH,SEQNO) ;
1575

1576
-- ??????
1577
--* BackupToTempTable
1578
drop table if exists materialinfo cascade;
1579

1580
--* RestoreFromTempTable
1581
create table materialinfo (
1582
  MATERIALITEMCODE smallint(5) unsigned default 0 not null comment '????i??R?[?h'
1583
  , MATERIALCOUNT smallint(5) unsigned comment '?????'
1584
  , RENTCOUNT smallint(5) unsigned comment '??o??\??'
1585
  , DELETEFLG smallint(5) unsigned comment '???t???O'
1586
  , ENTRYDATE datetime comment '?o?^???t'
1587
  , UPDATEDATE datetime comment '?X?V???t'
1588
  , constraint materialinfo_PKC primary key (MATERIALITEMCODE)
1589
) comment '??????' ;
1590

1591
-- ????i??}?X?^
1592
--* BackupToTempTable
1593
drop table if exists materialitemmaster cascade;
1594

1595
--* RestoreFromTempTable
1596
create table materialitemmaster (
1597
  MATERIALITEMCODE smallint(5) unsigned default 0 not null comment '????i??R?[?h'
1598
  , MATERIALKINDCODE smallint(5) unsigned comment '??????R?[?h'
1599
  , MATERIALITEMNAME varchar(40) comment '????i?????'
1600
  , DISPLAYORDER smallint(5) unsigned comment '?\????'
1601
  , DELETEFLG tinyint(3) unsigned comment '???t???O'
1602
  , ENTRYDATE datetime comment '?o?^???t'
1603
  , UPDATEDATE datetime comment '?X?V???t'
1604
  , VERSIONNO decimal(8,0) default '0' not null comment '?o?[?W???????'
1605
  , constraint materialitemmaster_PKC primary key (MATERIALITEMCODE)
1606
) comment '????i??}?X?^' ;
1607

1608
-- ??????}?X?^
1609
--* BackupToTempTable
1610
drop table if exists materialkindmaster cascade;
1611

1612
--* RestoreFromTempTable
1613
create table materialkindmaster (
1614
  MATERIALKINDCODE smallint(5) unsigned default 0 not null comment '??????R?[?h'
1615
  , MATERIALKINDNAME varchar(40) comment '?????????'
1616
  , DISPLAYORDER smallint(5) unsigned comment '?\????'
1617
  , DELETEFLG tinyint(3) unsigned comment '???t???O'
1618
  , ENTRYDATE datetime comment '?o?^???t'
1619
  , UPDATEDATE datetime comment '?X?V???t'
1620
  , constraint materialkindmaster_PKC primary key (MATERIALKINDCODE)
1621
) comment '??????}?X?^' ;
1622

1623
-- ??????????
1624
--* BackupToTempTable
1625
drop table if exists materialrecordinfo cascade;
1626

1627
--* RestoreFromTempTable
1628
create table materialrecordinfo (
1629
  MATERIALITEMCODE smallint(5) unsigned default 0 not null comment '????i??R?[?h'
1630
  , PROCESSDATE date default '0000-00-00' not null comment '?????N????'
1631
  , SEQNO smallint(5) unsigned default 0 not null comment '?A??'
1632
  , RECKIND tinyint(3) unsigned comment '???R?[?h??'
1633
  , CONSTRUCTIONCODE int(10) unsigned comment '?H?????'
1634
  , PERSONCODE int(10) unsigned comment '?S????R?[?h'
1635
  , MATERIALCOUNT smallint(5) unsigned comment '?????'
1636
  , REPAYPLANDATE date comment '??p?\??N????'
1637
  , COMMENTTEXT varchar(80) comment '?R?????g'
1638
  , ENTRYDATE datetime comment '?o?^???t'
1639
  , UPDATEDATE datetime comment '?X?V???t'
1640
  , constraint materialrecordinfo_PKC primary key (MATERIALITEMCODE,PROCESSDATE,SEQNO)
1641
) comment '??????????' ;
1642

1643
-- ?f??????b?Z?[?W
1644
--* BackupToTempTable
1645
drop table if exists messageboarddata cascade;
1646

1647
--* RestoreFromTempTable
1648
create table messageboarddata (
1649
  RecordNumber decimal(6,0) unsigned not null comment '???R?[?h???'
1650
  , BranchNumber decimal(3,0) unsigned not null comment '???R?[?h?}??'
1651
  , FromCode decimal(8,0) unsigned not null comment '???????R?[?h'
1652
  , FromName varchar(60) not null comment '???????'
1653
  , MessageTitile varchar(100) comment '?`???^?C?g??'
1654
  , MessageContent varchar(1333) not null comment '?`?????e'
1655
  , LinkType decimal(2,0) not null comment '?????N????^?C?v'
1656
  , LinkMessage varchar(200) comment '?????N??????'
1657
  , LinkCode varchar(30) comment '?????N?L?['
1658
  , WritingDate datetime not null comment '?????????'
1659
  , PersonCode decimal(8,0) not null comment '??????S????R?[?h'
1660
  , ShareFlag decimal(2,0) not null comment '???????t???O'
1661
  , MessageColor varchar(8) comment '?????F'
1662
  , BackColor varchar(8) comment '?o?b?N?J???['
1663
  , MessageFlag decimal(1,0) not null comment '???b?Z?[?W?t???O'
1664
  , EntryDate datetime not null comment '?o?^???t'
1665
  , UpdateDate datetime not null comment '?X?V???t'
1666
  , constraint messageboarddata_PKC primary key (RecordNumber,BranchNumber)
1667
) comment '?f??????b?Z?[?W' ;
1668

1669
create index MessageBoardData_Index1
1670
  on messageboarddata(WritingDate);
1671

1672
create index MessageBoardData_Index2
1673
  on messageboarddata(MessageFlag);
1674

1675
-- ?f???????e?[?u??
1676
--* BackupToTempTable
1677
drop table if exists messageboardterget cascade;
1678

1679
--* RestoreFromTempTable
1680
create table messageboardterget (
1681
  RecordNumber decimal(6,0) unsigned not null comment '???R?[?h???'
1682
  , BranchNumber decimal(3,0) unsigned not null comment '???R?[?h?}??'
1683
  , SeqNum decimal(3,0) unsigned not null comment '????'
1684
  , ToCode decimal(8,0) not null comment '????R?[?h'
1685
  , ToName varchar(60) not null comment '????'
1686
  , EntryDate datetime not null comment '?o?^???t'
1687
  , UpdateDate datetime not null comment '?X?V???t'
1688
  , constraint messageboardterget_PKC primary key (RecordNumber,BranchNumber,SeqNum)
1689
) comment '?f???????e?[?u??' ;
1690

1691
create index MessageBoardTerget_Index1
1692
  on messageboardterget(RecordNumber,BranchNumber);
1693

1694
-- ?f??????b?Z?[?W?{??????
1695
--* BackupToTempTable
1696
drop table if exists messagebrowsinghistory cascade;
1697

1698
--* RestoreFromTempTable
1699
create table messagebrowsinghistory (
1700
  RecordNumber decimal(6,0) unsigned not null comment '???R?[?h???'
1701
  , BranchNumber decimal(3,0) unsigned not null comment '???R?[?h?}??'
1702
  , SeqNum decimal(3,0) unsigned not null comment '????'
1703
  , BrowsingCode decimal(8,0) not null comment '?{????R?[?h'
1704
  , BrowsingDate datetime not null comment '?{?????t'
1705
  , EntryDate datetime not null comment '?o?^???t'
1706
  , UpdateDate datetime not null comment '?X?V???t'
1707
  , constraint messagebrowsinghistory_PKC primary key (RecordNumber,BranchNumber,SeqNum)
1708
) comment '?f??????b?Z?[?W?{??????' ;
1709

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

1714
--* RestoreFromTempTable
1715
create table monthmaster (
1716
  month smallint(6) not null comment '??'
1717
  , constraint monthmaster_PKC primary key (month)
1718
) comment '???}?X?^' ;
1719

1720
-- ??????}?X?^
1721
--* BackupToTempTable
1722
drop table if exists orderersmaster cascade;
1723

1724
--* RestoreFromTempTable
1725
create table orderersmaster (
1726
  OrderCotegory decimal(5,0) unsigned not null comment '???????'
1727
  , OrderersCode decimal(5,0) unsigned not null comment '??????R?[?h'
1728
  , DisplayOrder decimal(5,0) unsigned not null comment '?\????'
1729
  , OrderFlg decimal(1,0) not null comment '?@?l?c??E??l?t???O'
1730
  , CorporateStatusName varchar(100) comment '?@?l?i????'
1731
  , CorporateStatusPoint decimal(1,0) comment '?@?l?i?????u'
1732
  , OrderersName1 varchar(60) not null comment '???????1'
1733
  , OrderersName2 varchar(60) comment '????????Q'
1734
  , DepartmentName varchar(60) comment '??????'
1735
  , ChargePersonName varchar(60) comment '?S?????'
1736
  , ZipCode varchar(8) comment '?X????'
1737
  , Address1 varchar(60) comment '?Z???P'
1738
  , Address2 varchar(60) comment '?Z??2'
1739
  , Address3 varchar(60) comment '?Z??3'
1740
  , PhoneNumber varchar(13) comment '?d?b???'
1741
  , FaxNumber varchar(13) comment 'FAX???'
1742
  , MailAddress varchar(257) comment '???[???A?h???X'
1743
  , Note varchar(300) comment '???l'
1744
  , DeleteFlg decimal(1,0) not null comment '???t???O'
1745
  , EntryDate datetime not null comment '?o?^???t'
1746
  , UpdateDate datetime not null comment '?X?V???t'
1747
  , constraint orderersmaster_PKC primary key (OrderCotegory,OrderersCode)
1748
) comment '??????}?X?^' ;
1749

1750
-- ????z?f?[?^
1751
--* BackupToTempTable
1752
drop table if exists orderspricedata cascade;
1753

1754
--* RestoreFromTempTable
1755
create table orderspricedata (
1756
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
1757
  , ChangeNo decimal(3,0) unsigned not null comment '??X???'
1758
  , ChangeDate date not null comment '??X??'
1759
  , ChangePersonCode decimal(8,0) unsigned not null comment '??X??R?[?h'
1760
  , ChangePersonName varchar(60) comment '??X???'
1761
  , BeforeValue decimal(14,0) not null comment '??X?O???????z'
1762
  , BeforeValueInTax decimal(14,0) not null comment '??X?O???????z'
1763
  , AfterValue decimal(14,0) not null comment '??X????????z'
1764
  , AfterValueInTax decimal(14,0) not null comment '??X????????z'
1765
  , ChangeComment varchar(200) comment '??X???R'
1766
  , EntryDate datetime not null comment '?o?^???t'
1767
  , UpdateDate datetime not null comment '?X?V???t'
1768
  , constraint orderspricedata_PKC primary key (ConstructionCode,ChangeNo)
1769
) comment '????z?f?[?^' ;
1770

1771
-- ?x?????F???f?[?^
1772
--* BackupToTempTable
1773
drop table if exists paymentapprovalinfo cascade;
1774

1775
--* RestoreFromTempTable
1776
create table paymentapprovalinfo (
1777
  COMPANYCODE decimal(8,0) default '0' not null comment '??????R?[?h'
1778
  , TARGETDATE decimal(6,0) default '0' not null comment '???N??'
1779
  , SEQNO decimal(3,0) default '0' not null comment '?A??'
1780
  , LINECOUNT decimal(3,0) default '0' not null comment '?s???'
1781
  , APPROVALNO decimal(3,0) default '0' not null comment '???F????'
1782
  , APPROVALPERSON decimal(8,0) comment '???F??R?[?h'
1783
  , APPROVALPERSONNAME varchar(20) comment '???F???'
1784
  , APPROVALAUTHORITY decimal(1,0) comment '???F??????'
1785
  , APPROVALDATE date comment '???F???t'
1786
  , ENTRYDATE datetime comment '?o?^???t'
1787
  , UPDATEDATE datetime comment '?X?V???t'
1788
  , constraint paymentapprovalinfo_PKC primary key (COMPANYCODE,TARGETDATE,SEQNO,LINECOUNT,APPROVALNO)
1789
) comment '?x?????F???f?[?^' ;
1790

1791
-- ?x??????f?[?^
1792
--* BackupToTempTable
1793
drop table if exists paymentdatadetail cascade;
1794

1795
--* RestoreFromTempTable
1796
create table paymentdatadetail (
1797
  COMPANYCODE decimal(8,0) default '0' not null comment '??????R?[?h'
1798
  , TARGETDATE decimal(6,0) default '0' not null comment '???N??'
1799
  , SEQNO decimal(3,0) default '0' not null comment '?A??'
1800
  , LINECOUNT decimal(3,0) default '0' not null comment '?s???'
1801
  , BILLPRICE decimal(10,0) comment '???????z'
1802
  , DISCOUNTPRICE decimal(10,0) comment '?l???????z'
1803
  , OFFSETPRICE decimal(10,0) comment '???E???z'
1804
  , NEXTCOPRICE decimal(10,0) comment '????J?z'
1805
  , HIGHWPRICE decimal(10,0) comment '??????'
1806
  , HARDWPRICE decimal(10,0) comment '??????'
1807
  , INDSWASTETAX decimal(10,0) comment '?Y?p??'
1808
  , CNSTRPRICE decimal(10,0) comment '?????'
1809
  , CNSTRPRICEEXIST decimal(1,0) comment '??????L??'
1810
  , APPROVALPERSONCODE decimal(8,0) comment '???F?S????R?[?h'
1811
  , APPROVALDATE date comment '?S??????F???t'
1812
  , APPROVALENDFLG decimal(1,0) comment '???F?????t???O'
1813
  , ENTRYDATE datetime comment '?o?^???t'
1814
  , UPDATEDATE datetime comment '?X?V???t'
1815
  , constraint paymentdatadetail_PKC primary key (COMPANYCODE,TARGETDATE,SEQNO,LINECOUNT)
1816
) comment '?x??????f?[?^' ;
1817

1818
create index PayDataDetail_Index1
1819
  on paymentdatadetail(TARGETDATE);
1820

1821
create index PayDataDetail_Index2
1822
  on paymentdatadetail(APPROVALPERSONCODE);
1823

1824
-- ?H??????????f?[?^
1825
--* BackupToTempTable
1826
drop table if exists periodavoidance cascade;
1827

1828
--* RestoreFromTempTable
1829
create table periodavoidance (
1830
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
1831
  , ConstructionStatusFlg decimal(2,0) not null comment '?H?????t???O'
1832
  , FieldNo decimal(2,0) not null comment '?`?F?b?N???t?B?[???h???'
1833
  , EntryDate datetime not null comment '?o?^???t'
1834
  , UpdateDate datetime not null comment '?X?V???t'
1835
  , constraint periodavoidance_PKC primary key (ConstructionCode,ConstructionStatusFlg,FieldNo)
1836
) comment '?H??????????f?[?^' ;
1837

1838
create index PeriodAvoidance_Index1
1839
  on periodavoidance(ConstructionCode);
1840

1841
create index PeriodAvoidance_Index2
1842
  on periodavoidance(ConstructionStatusFlg);
1843

1844
create index PeriodAvoidance_Index3
1845
  on periodavoidance(FieldNo);
1846

1847
-- ?S??????F?f?[?^
1848
--* BackupToTempTable
1849
drop table if exists personapproval cascade;
1850

1851
--* RestoreFromTempTable
1852
create table personapproval (
1853
  PersonCode decimal(8,0) unsigned not null comment '?S????R?[?h'
1854
  , ApprovalCode decimal(3,0) unsigned not null comment '???F?@?\???'
1855
  , OrderDate date not null comment '??t??'
1856
  , OrderNo decimal(2,0) unsigned not null comment '??t???'
1857
  , SeqNo decimal(2,0) not null comment '?}??'
1858
  , PersonCodeApproval decimal(8,0) unsigned not null comment '?\???E???F??R?[?h'
1859
  , PetitionApprovalDate datetime not null comment '?\???E???F???t'
1860
  , ApprovalLimitDates datetime not null comment '???F??]??'
1861
  , ApprovalStatus decimal(1,0) not null comment '???F???'
1862
  , InputComment varchar(300) comment '?R?????g'
1863
  , EntryDate datetime not null comment '?o?^???t'
1864
  , UpdateDate datetime not null comment '?X?V???t'
1865
  , constraint personapproval_PKC primary key (PersonCode,ApprovalCode,OrderDate,OrderNo,SeqNo)
1866
) comment '?S??????F?f?[?^' ;
1867

1868
-- ?S??????F?R?????g?f?[?^
1869
--* BackupToTempTable
1870
drop table if exists personapprovalcomment cascade;
1871

1872
--* RestoreFromTempTable
1873
create table personapprovalcomment (
1874
  PersonCode decimal(8,0) unsigned not null comment '?S????R?[?h'
1875
  , ApprovalCode decimal(3,0) unsigned not null comment '???F?@?\???'
1876
  , OrderDate date not null comment '??t??'
1877
  , OrderNo decimal(2,0) unsigned not null comment '??t???'
1878
  , CommentNo decimal(2,0) not null comment '?R?????g???'
1879
  , ParentNo decimal(2,0) not null comment '?e?R?????g???'
1880
  , ApproValComment varchar(300) comment '?w???E?A???R?????g'
1881
  , EntryDate datetime not null comment '?o?^???t'
1882
  , UpdateDate datetime not null comment '?X?V???t'
1883
  , constraint personapprovalcomment_PKC primary key (PersonCode,ApprovalCode,OrderDate,OrderNo,CommentNo)
1884
) comment '?S??????F?R?????g?f?[?^' ;
1885

1886
-- ?S??????????}?X?^
1887
--* BackupToTempTable
1888
drop table if exists persondepartmentmaster cascade;
1889

1890
--* RestoreFromTempTable
1891
create table persondepartmentmaster (
1892
  PersonCode decimal(8,0) unsigned not null comment '?S????R?[?h'
1893
  , DepartmentCode decimal(5,0) unsigned not null comment '?????R?[?h'
1894
  , AffiliationFlg decimal(1,0) not null comment '?????t???O'
1895
  , EntryDate datetime not null comment '?o?^???t'
1896
  , UpdateDate datetime not null comment '?X?V???t'
1897
  , constraint persondepartmentmaster_PKC primary key (PersonCode,DepartmentCode)
1898
) comment '?S??????????}?X?^' ;
1899

1900
create index PersonDepartmentMaster_Index1
1901
  on persondepartmentmaster(PersonCode);
1902

1903
create index PersonDepartmentMaster_Index2
1904
  on persondepartmentmaster(DepartmentCode);
1905

1906
-- ?S????}?X?^
1907
--* BackupToTempTable
1908
drop table if exists personinchargemaster cascade;
1909

1910
--* RestoreFromTempTable
1911
create table personinchargemaster (
1912
  PersonCode decimal(8,0) unsigned not null comment '?S????R?[?h'
1913
  , DisplayOrder decimal(8,0) unsigned not null comment '?\????'
1914
  , PersonName varchar(60) not null comment '?S?????'
1915
  , StartDate date not null comment '?g?p?J?n?N????'
1916
  , EndDate date comment '?g?p?I???N????'
1917
  , PassWord varchar(16) comment '?p?X???[?h'
1918
  , SecurityManagement decimal(1,0) not null comment '?@????'
1919
  , SecCode decimal(2,0) unsigned not null comment '???????'
1920
  , MsgBackColor varchar(8) comment '???b?Z?[?W?w?i?F'
1921
  , DisplayString varchar(20) comment '?\???E???????'
1922
  , DepartmentCode decimal(5,0) unsigned comment '?????R?[?h'
1923
  , MonthlySalary decimal(11,0) not null comment '???????z'
1924
  , YearSalary decimal(12,0) not null comment '?N????z'
1925
  , Qualification varchar(120) comment '???i?????'
1926
  , SealPrintName varchar(5) comment '???\????'
1927
  , EmployeeClassFlg decimal(1,0) not null comment '?????'
1928
  , LedgerFlg decimal(1,0) not null comment '???v?Z???t???O'
1929
  , CommutingDistance decimal(5,2) not null comment '??????'
1930
  , CommuteCosts decimal(5,0) not null comment '??????'
1931
  , DeleteFlg decimal(1,0) not null comment '???t???O'
1932
  , EntryDate datetime not null comment '?o?^???t'
1933
  , UpdateDate datetime not null comment '?X?V???t'
1934
  , constraint personinchargemaster_PKC primary key (PersonCode)
1935
) comment '?S????}?X?^' ;
1936

1937
create index PersonInChargeMaster_Index1
1938
  on personinchargemaster(StartDate);
1939

1940
create index PersonInChargeMaster_Index2
1941
  on personinchargemaster(DepartmentCode);
1942

1943
-- ?S??????^?}?X?^
1944
--* BackupToTempTable
1945
drop table if exists personsalarymaster cascade;
1946

1947
--* RestoreFromTempTable
1948
create table personsalarymaster (
1949
  PersonCode decimal(8,0) unsigned not null comment '?S????R?[?h'
1950
  , StartDate date not null comment '?g?p?J?n?N????'
1951
  , MonthlySalary decimal(11,0) not null comment '???????z'
1952
  , YearSalary decimal(12,0) not null comment '?N????z'
1953
  , EntryDate datetime not null comment '?o?^???t'
1954
  , UpdateDate datetime not null comment '?X?V???t'
1955
  , constraint personsalarymaster_PKC primary key (PersonCode,StartDate)
1956
) comment '?S??????^?}?X?^' ;
1957

1958
create index PersonSalaryMaster_Index1
1959
  on personsalarymaster(PersonCode);
1960

1961
create index PersonSalaryMaster_Index2
1962
  on personsalarymaster(StartDate);
1963

1964
create index PersonSalaryMaster_Index3
1965
  on personsalarymaster(MonthlySalary);
1966

1967
-- ?w???????f?[?^
1968
--* BackupToTempTable
1969
drop table if exists pointingoutcomment cascade;
1970

1971
--* RestoreFromTempTable
1972
create table pointingoutcomment (
1973
  ConstructionCode decimal(10,0) not null comment '?H???R?[?h'
1974
  , ProcessNo smallint(6) not null comment '????????i??????j'
1975
  , SeqNo smallint(6) not null comment '????'
1976
  , PageCount smallint(6) not null comment '?y?[?W???'
1977
  , PersonCode decimal(8,0) not null comment '?L????R?[?h'
1978
  , DrowColor varchar(8) comment '?`??F'
1979
  , CommentMessage varchar(1000) comment '???b?Z?[?W'
1980
  , StartPointX smallint(6) not null comment '?w?E?????u?w'
1981
  , StartPointY smallint(6) not null comment '?w?E?????u?x'
1982
  , CurrentPointX smallint(6) not null comment '??????u?w'
1983
  , CurrentPointY smallint(6) not null comment '??????u?x'
1984
  , CurrentWidth smallint(6) not null comment '?\???T?C?YWidth'
1985
  , CurrentHeight smallint(6) not null comment '?\???T?C?YHeigth'
1986
  , EntryDate datetime not null comment '?o?^???t'
1987
  , UpdateDate datetime not null comment '?X?V???t'
1988
  , constraint pointingoutcomment_PKC primary key (ConstructionCode,ProcessNo,SeqNo)
1989
) comment '?w???????f?[?^' ;
1990

1991
-- ?????????????c???^?f?[?^
1992
--* BackupToTempTable
1993
drop table if exists proceedingsdata cascade;
1994

1995
--* RestoreFromTempTable
1996
create table proceedingsdata (
1997
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
1998
  , ProceedingsDataDate date not null comment '?c???^????'
1999
  , StartMeetingTime decimal(4,0) unsigned not null comment '??c????J?n'
2000
  , EndMeetingTime decimal(4,0) unsigned not null comment '??c????I??'
2001
  , CreatorCode decimal(8,0) not null comment '????R?[?h'
2002
  , PalceFlag decimal(1,0) not null comment '???n?t???O'
2003
  , MeetingPalce varchar(120) comment '???????'
2004
  , EntryDate datetime not null comment '?o?^???t'
2005
  , UpdateDate datetime not null comment '?X?V???t'
2006
  , constraint proceedingsdata_PKC primary key (ConstructionCode,ProceedingsDataDate,StartMeetingTime)
2007
) comment '?????????????c???^?f?[?^' ;
2008

2009
-- ?????????????c???^?f?[?^?i?o???j
2010
--* BackupToTempTable
2011
drop table if exists proceedingsdataattend cascade;
2012

2013
--* RestoreFromTempTable
2014
create table proceedingsdataattend (
2015
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
2016
  , ProceedingsDataDate date not null comment '?c???^????'
2017
  , StartMeetingTime decimal(4,0) unsigned not null comment '??c????J?n'
2018
  , SeqNo decimal(3,0) unsigned not null comment '????s???'
2019
  , Department varchar(20) comment '?o??????'
2020
  , AttendName varchar(10) comment '?o??????'
2021
  , EntryDate datetime not null comment '?o?^???t'
2022
  , UpdateDate datetime not null comment '?X?V???t'
2023
  , constraint proceedingsdataattend_PKC primary key (ConstructionCode,ProceedingsDataDate,StartMeetingTime,SeqNo)
2024
) comment '?????????????c???^?f?[?^?i?o???j' ;
2025

2026
-- ?????????????c???^?f?[?^?i????j
2027
--* BackupToTempTable
2028
drop table if exists proceedingsdatadetail cascade;
2029

2030
--* RestoreFromTempTable
2031
create table proceedingsdatadetail (
2032
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
2033
  , ProceedingsDataDate date not null comment '?c???^????'
2034
  , StartMeetingTime decimal(4,0) unsigned not null comment '??c????J?n'
2035
  , SeqNo decimal(3,0) unsigned not null comment '????s???'
2036
  , TitleNo varchar(5) comment '?c????'
2037
  , Title varchar(20) comment '?c??'
2038
  , ContentsText varchar(50) comment '???e'
2039
  , EntryDate datetime not null comment '?o?^???t'
2040
  , UpdateDate datetime not null comment '?X?V???t'
2041
  , constraint proceedingsdatadetail_PKC primary key (ConstructionCode,ProceedingsDataDate,StartMeetingTime,SeqNo)
2042
) comment '?????????????c???^?f?[?^?i????j' ;
2043

2044
-- ???F?f?[?^
2045
--* BackupToTempTable
2046
drop table if exists processapproval cascade;
2047

2048
--* RestoreFromTempTable
2049
create table processapproval (
2050
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
2051
  , ApprovalCode decimal(3,0) unsigned not null comment '???F?@?\???'
2052
  , OrderNo decimal(2,0) unsigned not null comment '??t???'
2053
  , SeqNo decimal(2,0) not null comment '?}??'
2054
  , PersonCode decimal(8,0) unsigned not null comment '?\???E???F??R?[?h'
2055
  , PetitionApprovalDate datetime not null comment '?\???E???F???t'
2056
  , ApprovalLimitDates datetime not null comment '???F??]??'
2057
  , ApprovalStatus decimal(1,0) not null comment '???F???'
2058
  , InputComment varchar(300) comment '?R?????g'
2059
  , EntryDate datetime not null comment '?o?^???t'
2060
  , UpdateDate datetime not null comment '?X?V???t'
2061
  , constraint processapproval_PKC primary key (ConstructionCode,ApprovalCode,OrderNo,SeqNo)
2062
) comment '???F?f?[?^' ;
2063

2064
-- ???F?R?????g?f?[?^
2065
--* BackupToTempTable
2066
drop table if exists processapprovalcomment cascade;
2067

2068
--* RestoreFromTempTable
2069
create table processapprovalcomment (
2070
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
2071
  , ApprovalCode decimal(3,0) unsigned not null comment '???F?@?\???'
2072
  , OrderNo decimal(2,0) unsigned not null comment '??t???'
2073
  , CommentNo decimal(2,0) not null comment '?R?????g???'
2074
  , ParentNo decimal(2,0) not null comment '?e?R?????g???'
2075
  , ApproValComment varchar(300) comment '?w???E?A???R?????g'
2076
  , EntryDate datetime not null comment '?o?^???t'
2077
  , UpdateDate datetime not null comment '?X?V???t'
2078
  , constraint processapprovalcomment_PKC primary key (ConstructionCode,ApprovalCode,OrderNo,CommentNo)
2079
) comment '???F?R?????g?f?[?^' ;
2080

2081
-- ???F????f?[?^
2082
--* BackupToTempTable
2083
drop table if exists processapprovaldetail cascade;
2084

2085
--* RestoreFromTempTable
2086
create table processapprovaldetail (
2087
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
2088
  , ApprovalCode decimal(3,0) unsigned not null comment '???F?@?\???'
2089
  , OrderNo decimal(2,0) unsigned not null comment '??t???'
2090
  , SerialNo decimal(2,0) unsigned not null comment '?}??'
2091
  , LinkCode decimal(10,0) not null comment '?????N???'
2092
  , EntryDate datetime not null comment '?o?^???t'
2093
  , UpdateDate datetime not null comment '?X?V???t'
2094
  , constraint processapprovaldetail_PKC primary key (ConstructionCode,ApprovalCode,OrderNo,SerialNo)
2095
) comment '???F????f?[?^' ;
2096

2097
-- ?N?????}?X?^
2098
--* BackupToTempTable
2099
drop table if exists processexcutemaster cascade;
2100

2101
--* RestoreFromTempTable
2102
create table processexcutemaster (
2103
  SecCode decimal(2,0) unsigned not null comment '???????'
2104
  , ExecCode decimal(4,0) unsigned not null comment '?N?????????'
2105
  , EditFlg decimal(1,0) not null comment '??W?t???O'
2106
  , EntryDate datetime not null comment '?o?^???t'
2107
  , UpdateDate datetime not null comment '?X?V???t'
2108
  , constraint processexcutemaster_PKC primary key (SecCode,ExecCode)
2109
) comment '?N?????}?X?^' ;
2110

2111
create index ProcessExcuteMaster_Index1
2112
  on processexcutemaster(SecCode);
2113

2114
create index ProcessExcuteMaster_Index2
2115
  on processexcutemaster(ExecCode);
2116

2117
-- ???????f?[?^
2118
--* BackupToTempTable
2119
drop table if exists purchaseorder cascade;
2120

2121
--* RestoreFromTempTable
2122
create table purchaseorder (
2123
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
2124
  , SeqNo decimal(3,0) unsigned not null comment '???????}??'
2125
  , CompanyCode decimal(8,0) not null comment '??????R?[?h'
2126
  , CreateDate date comment '?????t'
2127
  , OrderPrice decimal(12,0) not null comment '???????z'
2128
  , LastRowStringDate date not null comment '??I?s?\?????t'
2129
  , OrderSheetType decimal(1,0) not null comment '???E?{???t???O'
2130
  , PaymentTerms decimal(1,0) not null comment '?x????????'
2131
  , CashRatio decimal(4,1) not null comment '?????????i???j'
2132
  , BillPeriod decimal(4,0) not null comment '??`????'
2133
  , PrePayments decimal(1,0) not null comment '?O????'
2134
  , PrePaymentsDays decimal(3,0) not null comment '?O????????'
2135
  , PrePaymentsPrice decimal(12,0) not null comment '?O???????z'
2136
  , PartialPayment decimal(1,0) not null comment '??????'
2137
  , PartialPaymentMounth decimal(2,0) unsigned not null comment '???????????'
2138
  , PartialPaymentDay1 decimal(2,0) unsigned not null comment '???????????'
2139
  , PartialPaymentDay2 decimal(2,0) unsigned not null comment '???????x????'
2140
  , PartialPaymentPrice decimal(12,0) not null comment '?????????z'
2141
  , CompletionPayment decimal(1,0) not null comment '???n??????x??'
2142
  , CompletionPaymentDays decimal(3,0) unsigned not null comment '???n??????x??????'
2143
  , CompletionPaymentPrice decimal(12,0) not null comment '???n??????x?????z'
2144
  , LeadEngineerCode decimal(8,0) comment '??C?Z?p??R?[?h'
2145
  , LeadEngineerName varchar(60) comment '??C?Z?p???'
2146
  , SafetyOfficerCode decimal(8,0) comment '???S?????R?[?h'
2147
  , SafetyOfficerName varchar(60) comment '???S??????'
2148
  , WorkersCount decimal(3,0) unsigned comment '??????'
2149
  , PrintoutDate date not null comment '????N????'
2150
  , EntryDate datetime not null comment '?o?^???t'
2151
  , UpdateDate datetime not null comment '?X?V???t'
2152
  , constraint purchaseorder_PKC primary key (ConstructionCode,SeqNo)
2153
) comment '???????f?[?^' ;
2154

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

2159
--* RestoreFromTempTable
2160
create table purchaseorderdate (
2161
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
2162
  , SeqNo decimal(3,0) unsigned not null comment '???????}??'
2163
  , CompanyCode decimal(8,0) not null comment '??????R?[?h'
2164
  , SendDate date not null comment '???????X????'
2165
  , ReturnDate date not null comment '???????????'
2166
  , ReturnCheckDate date not null comment '??????????m?F??'
2167
  , EntryDate datetime not null comment '?o?^???t'
2168
  , UpdateDate datetime not null comment '?X?V???t'
2169
  , constraint purchaseorderdate_PKC primary key (ConstructionCode,SeqNo)
2170
) comment '?????????t?f?[?^' ;
2171

2172
-- ??????????f?[?^
2173
--* BackupToTempTable
2174
drop table if exists purchaseorderdetail cascade;
2175

2176
--* RestoreFromTempTable
2177
create table purchaseorderdetail (
2178
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
2179
  , SeqNo decimal(3,0) unsigned not null comment '???????}??'
2180
  , GroupCount decimal(1,0) not null comment '?O???[?v???'
2181
  , LineCount decimal(3,0) unsigned not null comment '?s???'
2182
  , ComponentCode decimal(5,0) unsigned not null comment '?\???L?['
2183
  , ItemCode decimal(5,0) unsigned not null comment '?H??L?['
2184
  , FirstString varchar(120) comment '?H??E?i??'
2185
  , SecondString varchar(120) comment '???e????'
2186
  , UnitCount decimal(8,2) not null comment '????'
2187
  , UnitName varchar(30) comment '?P??'
2188
  , UnitPrice decimal(10,0) not null comment '?P??'
2189
  , OrdersLinePrice decimal(12,0) comment '???z'
2190
  , SourceCode decimal(10,0) unsigned not null comment '???H?????'
2191
  , SourceDetailCnt decimal(4,0) unsigned not null comment '????????'
2192
  , DataTypeFlag decimal(1,0) unsigned not null comment '?f?[?^?^?C?v?t???O'
2193
  , StatutoryWelfareRate decimal(4,2) not null comment '?@???????'
2194
  , EntryDate datetime not null comment '?o?^???t'
2195
  , UpdateDate datetime not null comment '?X?V???t'
2196
  , constraint purchaseorderdetail_PKC primary key (ConstructionCode,SeqNo,GroupCount,LineCount)
2197
) comment '??????????f?[?^' ;
2198

2199
create index POrderDetail_Index1
2200
  on purchaseorderdetail(SourceCode);
2201

2202
-- ???R?[?h??????
2203
--* BackupToTempTable
2204
drop table if exists recordkey cascade;
2205

2206
--* RestoreFromTempTable
2207
create table recordkey (
2208
  KeyNo decimal(2,0) unsigned not null comment '?L?[?R?[?h'
2209
  , RecordNumber decimal(6,0) unsigned not null comment '???R?[?h???'
2210
  , EntryDate datetime not null comment '?o?^???t'
2211
  , UpdateDate datetime not null comment '?X?V???t'
2212
  , constraint recordkey_PKC primary key (KeyNo,RecordNumber)
2213
) comment '???R?[?h??????' ;
2214

2215
-- ?????????f?[?^
2216
--* BackupToTempTable
2217
drop table if exists reminvoicedata cascade;
2218

2219
--* RestoreFromTempTable
2220
create table reminvoicedata (
2221
  InvoiceNo decimal(9,0) not null comment '??????No'
2222
  , RemPerson decimal(8,0) not null comment '???S????R?[?h'
2223
  , RemDate date not null comment '?????t'
2224
  , RemComment varchar(300) comment '?????R'
2225
  , EntryDate datetime not null comment '?o?^?N????'
2226
  , UpdateDate datetime not null comment '?X?V?N????'
2227
  , constraint reminvoicedata_PKC primary key (InvoiceNo)
2228
) comment '?????????f?[?^' ;
2229

2230
-- ????????????f?[?^
2231
--* BackupToTempTable
2232
drop table if exists reminvoicedatadetail cascade;
2233

2234
--* RestoreFromTempTable
2235
create table reminvoicedatadetail (
2236
  InvoiceNo decimal(9,0) not null comment '??????No'
2237
  , SeqNo smallint(5) unsigned not null comment '?A??'
2238
  , RequestNo decimal(9,0) not null comment '????No'
2239
  , EntryDate datetime not null comment '?o?^?N????'
2240
  , UpdateDate datetime not null comment '?X?V?N????'
2241
  , constraint reminvoicedatadetail_PKC primary key (InvoiceNo,SeqNo)
2242
) comment '????????????f?[?^' ;
2243

2244
-- ?????f?[?^
2245
--* BackupToTempTable
2246
drop table if exists requestdata cascade;
2247

2248
--* RestoreFromTempTable
2249
create table requestdata (
2250
  REQUESTNO decimal(9,0) not null comment '????No'
2251
  , MAINCONSTRUCTIONCODE decimal(10,0) not null comment '?{?H?????'
2252
  , CONSTRUCTIONNAME varchar(120) not null comment '?H??????'
2253
  , CONTRACTAMOUNT decimal(10,0) not null comment '???????z'
2254
  , PAIDAMOUNT decimal(10,0) not null comment '????????z'
2255
  , REQUESTAMOUNT0 decimal(10,0) not null comment '???????z?O'
2256
  , REQUESTAMOUNT1 decimal(10,0) not null comment '???????z?P'
2257
  , REQUESTAMOUNT2 decimal(10,0) comment '???????z?Q'
2258
  , REQUESTAMOUNT3 decimal(10,0) comment '???????z?R'
2259
  , REQUESTAMOUNT4 decimal(10,0) comment '???????z?S'
2260
  , REQUESTAMOUNT5 decimal(10,0) comment '???????z?T'
2261
  , REQUESTAMOUNT6 decimal(10,0) comment '???????z?U'
2262
  , UNCLAIMEDAMOUNT decimal(10,0) not null comment '?????c???z'
2263
  , UNPAIDAMOUNT decimal(10,0) not null comment '?????????z'
2264
  , TAXAMOUNT decimal(10,0) not null comment '?????'
2265
  , NOTE varchar(120) not null comment '???l'
2266
  , ENTRYDATE datetime not null comment '?o?^?N????'
2267
  , UPDATEDATE datetime not null comment '?X?V?N????'
2268
  , constraint requestdata_PKC primary key (REQUESTNO,MAINCONSTRUCTIONCODE)
2269
) comment '?????f?[?^' ;
2270

2271
-- ?????f?[?^????
2272
--* BackupToTempTable
2273
drop table if exists requestdatadetail cascade;
2274

2275
--* RestoreFromTempTable
2276
create table requestdatadetail (
2277
  REQUESTNO decimal(9,0) not null comment '????No'
2278
  , MAINCONSTRUCTIONCODE decimal(10,0) not null comment '?{?H?????'
2279
  , CONSTRUCTIONCODE decimal(10,0) not null comment '?H?????'
2280
  , CONSTRUCTIONKIND decimal(1,0) not null comment '?H????'
2281
  , REQUESTAMOUNT decimal(10,0) not null comment '???????z'
2282
  , TAXAMOUNT decimal(10,0) not null comment '?????'
2283
  , ENTRYDATE datetime not null comment '?o?^?N????'
2284
  , UPDATEDATE datetime not null comment '?X?V?N????'
2285
  , constraint requestdatadetail_PKC primary key (REQUESTNO,MAINCONSTRUCTIONCODE,CONSTRUCTIONCODE,CONSTRUCTIONKIND)
2286
) comment '?????f?[?^????' ;
2287

2288
-- ?????w?b?_
2289
--* BackupToTempTable
2290
drop table if exists requesthead cascade;
2291

2292
--* RestoreFromTempTable
2293
create table requesthead (
2294
  REQUESTNO decimal(9,0) not null comment '????No'
2295
  , REQCONSTRUCTIONCODE decimal(10,0) not null comment '?????H?????'
2296
  , ORDERNO decimal(2,0) not null comment '??t???'
2297
  , REQUESTMONTH decimal(6,0) not null comment '??????'
2298
  , ORDERERSDIVISION decimal(5,0) not null comment '???????'
2299
  , ORDERERSCODE decimal(5,0) not null comment '??????R?[?h'
2300
  , ORDERERSNAME varchar(120) not null comment '???????'
2301
  , REQCONSTRUCTIONNAME varchar(120) not null comment '?????H??????'
2302
  , REQUESTTOTALAMOUNT decimal(10,0) not null comment '???????z???v'
2303
  , REQUESTAMOUNT decimal(10,0) not null comment '???????z'
2304
  , TAXAMOUNT decimal(10,0) not null comment '?????'
2305
  , UNPAIDAMOUNT decimal(10,0) comment '??????'
2306
  , NOTE varchar(120) comment '???l'
2307
  , ASSIGNEDFLG decimal(1,0) comment '??????t???O'
2308
  , INVOICENO decimal(9,0) not null comment '??????No'
2309
  , ENTRYDATE datetime not null comment '?o?^?N????'
2310
  , UPDATEDATE datetime not null comment '?X?V?N????'
2311
  , constraint requesthead_PKC primary key (REQUESTNO)
2312
) comment '?????w?b?_' ;
2313

2314
alter table requesthead add unique REQCONSTRUCTIONCODE (REQCONSTRUCTIONCODE,ORDERNO) ;
2315

2316
-- ?????????t?f?[?^
2317
--* BackupToTempTable
2318
drop table if exists requestorderdate cascade;
2319

2320
--* RestoreFromTempTable
2321
create table requestorderdate (
2322
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
2323
  , InvoiceNo decimal(9,0) not null comment '??????No'
2324
  , SendDate date not null comment '???????????X????'
2325
  , EntryDate datetime not null comment '?o?^???t'
2326
  , UpdateDate datetime not null comment '?X?V???t'
2327
  , constraint requestorderdate_PKC primary key (ConstructionCode,InvoiceNo)
2328
) comment '?????????t?f?[?^' ;
2329

2330
-- ????O???t?f?[?^
2331
--* BackupToTempTable
2332
drop table if exists salesgraphdata cascade;
2333

2334
--* RestoreFromTempTable
2335
create table salesgraphdata (
2336
  GraphDataCode decimal(8,0) not null comment '?O???t?f?[?^?R?[?h'
2337
  , ConstructionPeriod decimal(4,0) unsigned not null comment '?????'
2338
  , SalesDataDays date not null comment '????N??'
2339
  , DisplayOrder decimal(8,0) unsigned not null comment '?\????'
2340
  , DataName varchar(100) not null comment '?f?[?^?\??????'
2341
  , SalesAmount decimal(10,0) not null comment '????f?[?^'
2342
  , AdministrativeExpense decimal(10,0) not null comment '???E?????o??'
2343
  , GrossProfit decimal(10,0) not null comment '?e???v'
2344
  , NetIncome decimal(10,0) not null comment '?????v(???v)'
2345
  , EntryDate datetime not null comment '?o?^???t'
2346
  , UpdateDate datetime not null comment '?X?V???t'
2347
  , constraint salesgraphdata_PKC primary key (GraphDataCode,ConstructionPeriod,SalesDataDays)
2348
) comment '????O???t?f?[?^' ;
2349

2350
create index SalesGraphData_Idx1
2351
  on salesgraphdata(DisplayOrder);
2352

2353
create index SalesGraphData_idx2
2354
  on salesgraphdata(ConstructionPeriod);
2355

2356
-- ?????}?X?^
2357
--* BackupToTempTable
2358
drop table if exists securitymaster cascade;
2359

2360
--* RestoreFromTempTable
2361
create table securitymaster (
2362
  SecCode decimal(2,0) unsigned not null comment '???????'
2363
  , DisplayOrder decimal(2,0) not null comment '?\????'
2364
  , SecName varchar(60) not null comment '????????'
2365
  , SecRank decimal(1,0) not null comment '?????????N'
2366
  , SecRange decimal(1,0) not null comment '???????'
2367
  , GeneralAffairs decimal(1,0) not null comment '????????t???O'
2368
  , SelectBackColor varchar(8) not null comment '?I??w?i?F'
2369
  , EntryDate datetime not null comment '?o?^???t'
2370
  , UpdateDate datetime not null comment '?X?V???t'
2371
  , constraint securitymaster_PKC primary key (SecCode)
2372
) comment '?????}?X?^' ;
2373

2374
create index SecurityMaster_Index1
2375
  on securitymaster(DisplayOrder);
2376

2377
create index SecurityMaster_Index2
2378
  on securitymaster(SecRank);
2379

2380
create index SecurityMaster_Index3
2381
  on securitymaster(SecRange);
2382

2383
-- ???S?p?g???[???f?[?^
2384
--* BackupToTempTable
2385
drop table if exists sfpdata cascade;
2386

2387
--* RestoreFromTempTable
2388
create table sfpdata (
2389
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
2390
  , DataCount decimal(2,0) unsigned not null comment '?p?g???[????'
2391
  , RequestDate datetime not null comment '?p?g???[???v??????'
2392
  , PersonCode decimal(8,0) unsigned not null comment '?\????R?[?h'
2393
  , StringValue varchar(300) comment '?R?????g'
2394
  , OrderNo decimal(2,0) unsigned not null comment '?\????t???'
2395
  , EntryDate datetime not null comment '?o?^???t'
2396
  , UpdateDate datetime not null comment '?X?V???t'
2397
  , constraint sfpdata_PKC primary key (ConstructionCode,DataCount)
2398
) comment '???S?p?g???[???f?[?^' ;
2399

2400
create index SFPData_Index1
2401
  on sfpdata(RequestDate);
2402

2403
-- ???S?p?g???[??????f?[?^
2404
--* BackupToTempTable
2405
drop table if exists sfpdatadetail cascade;
2406

2407
--* RestoreFromTempTable
2408
create table sfpdatadetail (
2409
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
2410
  , DataCount decimal(2,0) unsigned not null comment '?p?g???[????'
2411
  , SeqNo decimal(2,0) unsigned not null comment '?f?[?^?}??'
2412
  , CompanyCode decimal(8,0) unsigned not null comment '??????R?[?h'
2413
  , EntryDate datetime not null comment '?o?^???t'
2414
  , UpdateDate datetime not null comment '?X?V???t'
2415
  , constraint sfpdatadetail_PKC primary key (ConstructionCode,DataCount,SeqNo)
2416
) comment '???S?p?g???[??????f?[?^' ;
2417

2418
-- ??????{?H?H??o?^?\???f?[?^
2419
--* BackupToTempTable
2420
drop table if exists subconstrjobitemregist cascade;
2421

2422
--* RestoreFromTempTable
2423
create table subconstrjobitemregist (
2424
  PersonCode decimal(8,0) unsigned not null comment '?\??????'
2425
  , CreateDate date not null comment '????'
2426
  , SeqNo decimal(2,0) unsigned not null comment '?\???A??'
2427
  , DisplayOrder decimal(8,0) unsigned not null comment '?\????'
2428
  , ItemCode decimal(5,0) unsigned not null comment '?H??L?['
2429
  , EntryDate datetime not null comment '?o?^???t'
2430
  , UpdateDate datetime not null comment '?X?V???t'
2431
  , constraint subconstrjobitemregist_PKC primary key (PersonCode,CreateDate,SeqNo,DisplayOrder)
2432
) comment '??????{?H?H??o?^?\???f?[?^' ;
2433

2434
-- ??????E?????N?o?^?\???f?[?^
2435
--* BackupToTempTable
2436
drop table if exists subconstrjoblinkregist cascade;
2437

2438
--* RestoreFromTempTable
2439
create table subconstrjoblinkregist (
2440
  PersonCode decimal(8,0) unsigned not null comment '?\??????'
2441
  , CreateDate date not null comment '????'
2442
  , SeqNo decimal(2,0) unsigned not null comment '?\???A??'
2443
  , DisplayOrder decimal(8,0) unsigned not null comment '?\????'
2444
  , JobCategoryCode decimal(5,0) not null comment '?E??L?['
2445
  , EntryDate datetime not null comment '?o?^???t'
2446
  , UpdateDate datetime not null comment '?X?V???t'
2447
  , constraint subconstrjoblinkregist_PKC primary key (PersonCode,CreateDate,SeqNo,DisplayOrder)
2448
) comment '??????E?????N?o?^?\???f?[?^' ;
2449

2450
-- ??????o?^?\???f?[?^
2451
--* BackupToTempTable
2452
drop table if exists subconstrregist cascade;
2453

2454
--* RestoreFromTempTable
2455
create table subconstrregist (
2456
  PersonCode decimal(8,0) unsigned not null comment '?\??????'
2457
  , CreateDate date not null comment '????'
2458
  , SeqNo decimal(2,0) unsigned not null comment '?\???A??'
2459
  , DataMode decimal(1,0) comment '?f?[?^??'
2460
  , SourceCode decimal(8,0) not null comment '??????R?[?h'
2461
  , PetitionPeriod decimal(4,0) unsigned not null comment '?\???N?x'
2462
  , CorporateStatusName varchar(40) comment '?@?l?i????'
2463
  , CorporateStatusPoint decimal(1,0) not null comment '?@?l?i?????u'
2464
  , CompanyName varchar(100) not null comment '???????'
2465
  , CEOPositionName varchar(60) comment '??\???E??'
2466
  , CEOName varchar(60) comment '??\?????'
2467
  , ContactPersonName varchar(60) comment '?S???????'
2468
  , ZipCode varchar(8) comment '?X????'
2469
  , Address1 varchar(60) comment '?Z???P'
2470
  , Address2 varchar(60) comment '?Z??2'
2471
  , Address3 varchar(60) comment '?Z??3'
2472
  , CellPhoneNumber varchar(13) comment '?g??d?b???'
2473
  , MailAddress varchar(257) comment '???[???A?h???X'
2474
  , PhoneNumber varchar(13) comment '?d?b???'
2475
  , FaxNumber varchar(13) comment 'FAX???'
2476
  , JapaneseSyllabary varchar(2) comment '50?????'
2477
  , StartDate date not null comment '????J?n?N????'
2478
  , Note varchar(300) comment '???l'
2479
  , labourKind decimal(1,0) not null comment '?x???????E????'
2480
  , OrderDate date comment '?\????'
2481
  , OrderNo decimal(2,0) unsigned not null comment '?\????t???'
2482
  , EntryDate datetime not null comment '?o?^???t'
2483
  , UpdateDate datetime not null comment '?X?V???t'
2484
  , constraint subconstrregist_PKC primary key (PersonCode,CreateDate,SeqNo)
2485
) comment '??????o?^?\???f?[?^' ;
2486

2487
-- ??????H??}?X?^
2488
--* BackupToTempTable
2489
drop table if exists subcontractoritemmaster cascade;
2490

2491
--* RestoreFromTempTable
2492
create table subcontractoritemmaster (
2493
  ItemCode decimal(5,0) unsigned not null comment '?H??L?['
2494
  , DisplayOrder decimal(5,0) unsigned not null comment '?\????'
2495
  , ItemName varchar(120) not null comment '?H????'
2496
  , DeleteFlg decimal(1,0) not null comment '???t???O'
2497
  , EntryDate datetime not null comment '?o?^???t'
2498
  , UpdateDate datetime not null comment '?X?V???t'
2499
  , constraint subcontractoritemmaster_PKC primary key (ItemCode)
2500
) comment '??????H??}?X?^' ;
2501

2502
-- ??????E??}?X?^
2503
--* BackupToTempTable
2504
drop table if exists subcontractorjobcategory cascade;
2505

2506
--* RestoreFromTempTable
2507
create table subcontractorjobcategory (
2508
  JobCategoryCode decimal(5,0) not null comment '?E??L?['
2509
  , DisplayOrder decimal(5,0) unsigned not null comment '?\????'
2510
  , JobCategoryName varchar(120) not null comment '?E????'
2511
  , DeleteFlg decimal(1,0) not null comment '???t???O'
2512
  , EntryDate datetime not null comment '?o?^???t'
2513
  , UpdateDate datetime not null comment '?X?V???t'
2514
  , constraint subcontractorjobcategory_PKC primary key (JobCategoryCode)
2515
) comment '??????E??}?X?^' ;
2516

2517
-- ??????{?H?H??f?[?^
2518
--* BackupToTempTable
2519
drop table if exists subcontractorjobitem cascade;
2520

2521
--* RestoreFromTempTable
2522
create table subcontractorjobitem (
2523
  CompanyCode decimal(8,0) not null comment '??????R?[?h'
2524
  , ItemCode decimal(5,0) unsigned not null comment '?H??L?['
2525
  , DisplayOrder decimal(5,0) unsigned not null comment '?\????'
2526
  , EntryDate datetime not null comment '?o?^???t'
2527
  , UpdateDate datetime not null comment '?X?V???t'
2528
  , constraint subcontractorjobitem_PKC primary key (CompanyCode,ItemCode)
2529
) comment '??????{?H?H??f?[?^' ;
2530

2531
create index SubContractorJobItem_Index1
2532
  on subcontractorjobitem(CompanyCode);
2533

2534
create index SubContractorJobItem_Index2
2535
  on subcontractorjobitem(ItemCode);
2536

2537
-- ??????E?????N?}?X?^
2538
--* BackupToTempTable
2539
drop table if exists subcontractorjoblink cascade;
2540

2541
--* RestoreFromTempTable
2542
create table subcontractorjoblink (
2543
  CompanyCode decimal(8,0) not null comment '??????R?[?h'
2544
  , JobCategoryCode decimal(5,0) not null comment '?E??L?['
2545
  , DisplayOrder decimal(5,0) unsigned not null comment '?\????'
2546
  , EntryDate datetime not null comment '?o?^???t'
2547
  , UpdateDate datetime not null comment '?X?V???t'
2548
  , constraint subcontractorjoblink_PKC primary key (CompanyCode,JobCategoryCode)
2549
) comment '??????E?????N?}?X?^' ;
2550

2551
create index SubContractorJobLink_Index1
2552
  on subcontractorjoblink(CompanyCode);
2553

2554
create index SubContractorJobLink_Index2
2555
  on subcontractorjoblink(JobCategoryCode);
2556

2557
-- ??????}?X?^
2558
--* BackupToTempTable
2559
drop table if exists subcontractormaster cascade;
2560

2561
--* RestoreFromTempTable
2562
create table subcontractormaster (
2563
  CompanyCode decimal(8,0) not null comment '??????R?[?h'
2564
  , DisplayOrder decimal(8,0) unsigned not null comment '?\????'
2565
  , CorporateStatusName varchar(40) comment '?@?l?i????'
2566
  , CorporateStatusPoint decimal(1,0) not null comment '?@?l?i?????u'
2567
  , CompanyName varchar(100) not null comment '???????'
2568
  , CEOPositionName varchar(60) comment '??\???E??'
2569
  , CEOName varchar(60) comment '??\?????'
2570
  , ContactPersonName varchar(60) comment '?S???????'
2571
  , ZipCode varchar(8) comment '?X????'
2572
  , Address1 varchar(60) comment '?Z???P'
2573
  , Address2 varchar(60) comment '?Z??2'
2574
  , Address3 varchar(60) comment '?Z??3'
2575
  , CellPhoneNumber varchar(13) comment '?g??d?b???'
2576
  , MailAddress varchar(257) comment '???[???A?h???X'
2577
  , PhoneNumber varchar(13) comment '?d?b???'
2578
  , FaxNumber varchar(13) comment 'FAX???'
2579
  , JapaneseSyllabary varchar(2) comment '50?????'
2580
  , StartDate date not null comment '????J?n?N????'
2581
  , Note varchar(300) comment '???l'
2582
  , labourKind decimal(1,0) not null comment '?x???????E????'
2583
  , DeleteFlg decimal(1,0) default '0' not null comment '???t???O'
2584
  , EntryDate datetime not null comment '?o?^???t'
2585
  , UpdateDate datetime not null comment '?X?V???t'
2586
  , constraint subcontractormaster_PKC primary key (CompanyCode)
2587
) comment '??????}?X?^' ;
2588

2589
create index SubContractorMaster_Index1
2590
  on subcontractormaster(JapaneseSyllabary);
2591

2592
-- ?d????}?X?^
2593
--* BackupToTempTable
2594
drop table if exists suppliersmaster cascade;
2595

2596
--* RestoreFromTempTable
2597
create table suppliersmaster (
2598
  SuppliersCode decimal(5,0) unsigned not null comment '?d????R?[?h'
2599
  , DisplayOrder decimal(5,0) unsigned not null comment '?\????'
2600
  , SuppliersName1 varchar(60) not null comment '?d????1'
2601
  , SuppliersName2 varchar(60) comment '?d?????Q'
2602
  , ZipCode varchar(8) comment '?X????'
2603
  , Address1 varchar(60) comment '?Z???P'
2604
  , Address2 varchar(60) comment '?Z??2'
2605
  , Address3 varchar(60) comment '?Z??3'
2606
  , PhoneNumber varchar(13) comment '?d?b???'
2607
  , FaxNumber varchar(13) comment 'FAX???'
2608
  , Note varchar(300) comment '???l'
2609
  , DeleteFlg decimal(1,0) not null comment '???t???O'
2610
  , EntryDate datetime not null comment '?o?^???t'
2611
  , UpdateDate datetime not null comment '?X?V???t'
2612
  , constraint suppliersmaster_PKC primary key (SuppliersCode)
2613
) comment '?d????}?X?^' ;
2614

2615
-- ?V?X?e???N???m?F?f?[?^
2616
--* BackupToTempTable
2617
drop table if exists systemexecute cascade;
2618

2619
--* RestoreFromTempTable
2620
create table systemexecute (
2621
  PrimaryCode tinyint(4) not null comment '?L?[????'
2622
  , TargetDate date not null comment '?N?????t'
2623
  , SystemVersion int(11) not null comment '?{??E????o?[?W????'
2624
  , UpDateCopyVersion int(11) not null comment '?R?s?[?o?[?W????'
2625
  , EntryDate datetime not null comment '?o?^???t'
2626
  , UpdateDate datetime not null comment '?X?V???t'
2627
  , constraint systemexecute_PKC primary key (PrimaryCode)
2628
) comment '?V?X?e???N???m?F?f?[?^' ;
2629

2630
-- ????}?X?^
2631
--* BackupToTempTable
2632
drop table if exists systemmaster cascade;
2633

2634
--* RestoreFromTempTable
2635
create table systemmaster (
2636
  SystemCode decimal(3,0) unsigned not null comment '???R?[?h'
2637
  , CompanyName1 varchar(60) not null comment '?????P'
2638
  , CompanyName2 varchar(60) comment '?????Q'
2639
  , CEOName varchar(60) not null comment '??\?????'
2640
  , CEOPositionName varchar(60) comment '??\???E??'
2641
  , ZipCode varchar(8) not null comment '?X????'
2642
  , Address1 varchar(60) not null comment '?Z???P'
2643
  , Address2 varchar(60) comment '?Z??2'
2644
  , Address3 varchar(60) comment '?Z??3'
2645
  , PhoneNumber varchar(13) not null comment '?d?b???'
2646
  , FaxNumber varchar(13) comment 'FAX???'
2647
  , HomePageURL varchar(120) comment '?z?[???y?[?WURL'
2648
  , ConsumptionTax decimal(4,2) not null comment '?????'
2649
  , CooperationRate decimal(4,2) not null comment '???????'
2650
  , StatutoryWelfareRate decimal(4,2) not null comment '?@???????'
2651
  , FuelPrice decimal(5,2) not null comment '?R???L???P??'
2652
  , AreaDistance decimal(5,2) not null comment '????u????????'
2653
  , ExcelSavePath varchar(120) comment 'Excel????p?X'
2654
  , BusinessPeriod smallint(6) not null comment '????c?????'
2655
  , ConstrYear smallint(6) not null comment '????H???N?x'
2656
  , BusinessBeginDate datetime not null comment '?c????????'
2657
  , ConstrBeginDate datetime not null comment '?H???N?x?????'
2658
  , BusinessCompDate datetime not null comment '?c?????????'
2659
  , ConstrCompDate datetime not null comment '?H???N?x??????'
2660
  , ConstructionNoBase decimal(1,0) not null comment '?H????????l'
2661
  , SloganString1 varchar(100) comment '?W??1'
2662
  , SloganString2 varchar(100) comment '?W??2'
2663
  , SloganString3 varchar(100) comment '?W??3'
2664
  , EntryDate datetime not null comment '?o?^???t'
2665
  , UpdateDate datetime not null comment '?X?V???t'
2666
  , constraint systemmaster_PKC primary key (SystemCode)
2667
) comment '????}?X?^' ;
2668

2669
-- ?????}?X?^
2670
--* BackupToTempTable
2671
drop table if exists termmaster cascade;
2672

2673
--* RestoreFromTempTable
2674
create table termmaster (
2675
  ConstructionStatusFlg decimal(2,0) not null comment '?H?????t???O'
2676
  , FieldNo decimal(2,0) not null comment '?`?F?b?N???t?B?[???h???'
2677
  , SeqNo decimal(2,0) not null comment '?}??'
2678
  , DisplayOrder decimal(2,0) not null comment '?\????'
2679
  , CheckSchdule decimal(1,0) not null comment '?`?F?b?N?^?C?~???O'
2680
  , TermDays decimal(3,0) not null comment '?o???'
2681
  , SendTitile varchar(100) comment '?^?C?g??'
2682
  , SendMessage varchar(100) comment '???b?Z?[?W'
2683
  , BackColor varchar(8) comment '?w?i?F'
2684
  , ForeColor varchar(8) comment '?????F'
2685
  , EntryDate datetime not null comment '?o?^???t'
2686
  , UpdateDate datetime not null comment '?X?V???t'
2687
  , constraint termmaster_PKC primary key (ConstructionStatusFlg,FieldNo,SeqNo)
2688
) comment '?????}?X?^' ;
2689

2690
create index TermMaster_Index1
2691
  on termmaster(DisplayOrder);
2692

2693
-- ?o?????f?[?^
2694
--* BackupToTempTable
2695
drop table if exists tranceportdailydata cascade;
2696

2697
--* RestoreFromTempTable
2698
create table tranceportdailydata (
2699
  PersonCode decimal(8,0) unsigned not null comment '????R?[?h'
2700
  , AttendanceDate date not null comment '???????'
2701
  , StartDistance decimal(7,1) not null comment '?????o???L????'
2702
  , ComplateDistance decimal(7,1) not null comment '?????I???L????'
2703
  , TotalDistance decimal(6,1) not null comment '???????v?L????'
2704
  , OfficeGoFlg decimal(1,0) not null comment '???????o??t???O'
2705
  , OfficeOutFlg decimal(1,0) not null comment '???????A??t???O'
2706
  , TrancePayGoFlg decimal(1,0) not null comment '?L?????o??t???O'
2707
  , TrancePayOutFlg decimal(1,0) not null comment '?L?????A??t???O'
2708
  , WareHouseFlg decimal(1,0) not null comment '????u??t???O'
2709
  , EntryDate datetime not null comment '?o?^???t'
2710
  , UpdateDate datetime not null comment '?X?V???t'
2711
  , constraint tranceportdailydata_PKC primary key (PersonCode,AttendanceDate)
2712
) comment '?o?????f?[?^' ;
2713

2714
create index TranceportDailyData_Index1
2715
  on tranceportdailydata(AttendanceDate);
2716

2717
-- ?H?????o???}?X?^
2718
--* BackupToTempTable
2719
drop table if exists typeexpensesmaster cascade;
2720

2721
--* RestoreFromTempTable
2722
create table typeexpensesmaster (
2723
  TypeCode decimal(5,0) unsigned not null comment '?H?????R?[?h'
2724
  , ExpensesPeriod smallint(6) not null comment '?????'
2725
  , NameCode decimal(5,0) unsigned not null comment '?o????R?[?h'
2726
  , ExpensesRaito decimal(4,2) not null comment '?o??'
2727
  , DeleteFlg decimal(1,0) not null comment '???t???O'
2728
  , EntryDate datetime not null comment '?o?^???t'
2729
  , UpdateDate datetime not null comment '?X?V???t'
2730
  , constraint typeexpensesmaster_PKC primary key (TypeCode,ExpensesPeriod,NameCode)
2731
) comment '?H?????o???}?X?^' ;
2732

2733
-- ?P??}?X?^
2734
--* BackupToTempTable
2735
drop table if exists unitmaster cascade;
2736

2737
--* RestoreFromTempTable
2738
create table unitmaster (
2739
  UnitKey decimal(5,0) unsigned not null comment '?P??L?['
2740
  , DisplayOrder decimal(5,0) unsigned not null comment '?\????'
2741
  , UnitName varchar(30) not null comment '?P?????'
2742
  , EntryDate datetime not null comment '?o?^???t'
2743
  , UpdateDate datetime not null comment '?X?V???t'
2744
  , constraint unitmaster_PKC primary key (UnitKey)
2745
) comment '?P??}?X?^' ;
2746

2747
create index UnitMaster_Index1
2748
  on unitmaster(DisplayOrder);
2749

2750
-- ????}?X?^
2751
--* BackupToTempTable
2752
drop table if exists vehiclemaster cascade;
2753

2754
--* RestoreFromTempTable
2755
create table vehiclemaster (
2756
  VehicleCode decimal(5,0) unsigned not null comment '????R?[?h'
2757
  , DisplayOrder decimal(5,0) unsigned not null comment '?\????'
2758
  , VehicleName varchar(100) not null comment '???????'
2759
  , RegistrationNumber varchar(30) comment '?o?^???'
2760
  , IdentificationNumber varchar(30) comment '?????'
2761
  , ModelCode varchar(30) comment '?^??'
2762
  , DepartmentCode decimal(5,0) unsigned not null comment '???????'
2763
  , VehicleScheduleFlg decimal(1,0) not null comment '????\??\???t???O'
2764
  , PurchaseDate date comment '?w????'
2765
  , PurchaseName varchar(30) comment '?w????'
2766
  , PurchaseContactPersons varchar(30) comment '?w????S????'
2767
  , PurchasePhone varchar(13) comment '?w????d?b???'
2768
  , LeaseDate date comment '???[?X?J?n??'
2769
  , LeaseDestination varchar(30) comment '???[?X??'
2770
  , LeaseContactPersons varchar(30) comment '???[?X??S????'
2771
  , LeasePhone varchar(13) comment '???[?X??d?b???'
2772
  , InsuranceCompany varchar(30) comment '?C???????'
2773
  , InsuranceContactPersons varchar(30) comment '?C???????S????'
2774
  , InsurancePhone varchar(13) comment '?C???????d?b???'
2775
  , Note varchar(300) comment '???l'
2776
  , EntryDate datetime comment '?o?^???t'
2777
  , UpdateDate datetime comment '?X?V???t'
2778
  , constraint vehiclemaster_PKC primary key (VehicleCode)
2779
) comment '????}?X?^' ;
2780

2781
-- ????L?^?f?[?^
2782
--* BackupToTempTable
2783
drop table if exists vehiclerecorddata cascade;
2784

2785
--* RestoreFromTempTable
2786
create table vehiclerecorddata (
2787
  VehicleCode decimal(5,0) unsigned not null comment '????R?[?h'
2788
  , DivisionCode decimal(2,0) unsigned not null comment '?f?[?^??'
2789
  , SeqNo decimal(2,0) not null comment '?}??'
2790
  , RecordDate date comment '???n??'
2791
  , Mileage mediumint(9) comment '???s????'
2792
  , Content varchar(100) comment '???e'
2793
  , PaymentCost decimal(10,0) comment '??p'
2794
  , EntryDate datetime not null comment '?o?^???t'
2795
  , UpdateDate datetime not null comment '?X?V???t'
2796
  , constraint vehiclerecorddata_PKC primary key (VehicleCode,DivisionCode,SeqNo)
2797
) comment '????L?^?f?[?^' ;
2798

2799
-- ????\??f?[?^
2800
--* BackupToTempTable
2801
drop table if exists vehiclescheduledata cascade;
2802

2803
--* RestoreFromTempTable
2804
create table vehiclescheduledata (
2805
  TargetDate date not null comment '????'
2806
  , VehicleCode decimal(5,0) unsigned not null comment '????R?[?h'
2807
  , MorningAfternoon decimal(1,0) not null comment '??O?E???'
2808
  , PersonCode decimal(8,0) unsigned not null comment '?S????R?[?h'
2809
  , TargetYear year(4) not null comment '?Y???N'
2810
  , TargetMonth tinyint(3) unsigned not null comment '?Y????'
2811
  , TargetDay year(4) not null comment '?Y????'
2812
  , EntryDate datetime not null comment '?o?^???t'
2813
  , UpdateDate datetime not null comment '?X?V???t'
2814
  , constraint vehiclescheduledata_PKC primary key (TargetDate,VehicleCode,MorningAfternoon)
2815
) comment '????\??f?[?^' ;
2816

2817
create index VehicleScheduleData_Index1
2818
  on vehiclescheduledata(TargetYear);
2819

2820
create index VehicleScheduleData_Index2
2821
  on vehiclescheduledata(TargetMonth);
2822

2823
create index VehicleScheduleData_Index3
2824
  on vehiclescheduledata(TargetDay);
2825

2826
-- ?N?}?X?^
2827
--* BackupToTempTable
2828
drop table if exists yearmaster cascade;
2829

2830
--* RestoreFromTempTable
2831
create table yearmaster (
2832
  years smallint(6) not null comment '?N'
2833
  , constraint yearmaster_PKC primary key (years)
2834
) comment '?N?}?X?^' ;
2835