プロジェクト

全般

プロフィール

リビジョン 379

山内6年以上前に追加

差分を表示:

trunk/ddl/ProcessManagement.sql
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'
1340
  , DISCOUNTAMOUNT decimal(10,0) comment '?l???????z'
1341
  , CNSTRPRICE decimal(10,0) comment '?????'
1342
  , FEES decimal(10,0) comment '????'
1343
  , OTHERADJUSTMENTS decimal(10,0) comment '?????'
1344
  , DIFFERENCEAMOUNT decimal(10,0) comment '????'
1345
  , CONFIRMATIONPERSONCODE decimal(8,0) comment '?m?F?S????R?[?h'
1346
  , CONFIRMATIONDATE date comment '?S????m?F???t'
1347
  , CONFIRMATIONENDFLG decimal(1,0) comment '?m?F?????t???O'
1348
  , NOTE varchar(120) comment '???l'
1349
  , ENTRYDATE datetime comment '?o?^???t'
1350
  , UPDATEDATE datetime comment '?X?V???t'
1351
  , constraint depositdatadetail_PKC primary key (ORDERERSDIVISION,ORDERERSCODE,TARGETDATE,REQUESTNO)
1352
) comment '????????f?[?^' ;
1353

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  
1495
--* RestoreFromTempTable
1496
create table expensesmaster (
... 差分の行数が表示可能な上限を超えました。超過分は表示しません。

他の形式にエクスポート: Unified diff