プロジェクト

全般

プロフィール

リビジョン 325

堀内ほぼ7年前に追加

DDL作成ミス

差分を表示:

branches/ddl/ProcessManagement.sql
1 1
-- Project Name : noname
2
-- Date/Time    : 2018/03/01 9:30:55
2
-- Date/Time    : 2018/03/01 9:40:48
3 3
-- Author       : Horiuchi
4 4
-- RDBMS Type   : MySQL
5 5
-- Application  : A5:SQL Mk-2
6 6

  
7 7
-- ?S????s???\??f?[?^
8
drop table actionscheduledata cascade;
8
drop table if exists actionscheduledata cascade;
9 9

  
10 10
create table actionscheduledata (
11 11
  TargetDate date not null comment '????'
......
29 29
  on actionscheduledata(TargetDay);
30 30

  
31 31
-- ???F?o?H?}?X?^
32
drop table approvalmaster cascade;
32
drop table if exists approvalmaster cascade;
33 33

  
34 34
create table approvalmaster (
35 35
  ApprovalCode decimal(3,0) unsigned not null comment '???F?@?\???'
......
44 44
) comment '???F?o?H?}?X?^' ;
45 45

  
46 46
-- ?o?????f?[?^
47
drop table attendancedailydata cascade;
47
drop table if exists attendancedailydata cascade;
48 48

  
49 49
create table attendancedailydata (
50 50
  PersonCode decimal(8,0) unsigned not null comment '????R?[?h'
......
69 69
  on attendancedailydata(AttendanceDate);
70 70

  
71 71
-- ?o?????f?[?^
72
drop table attendancedata cascade;
72
drop table if exists attendancedata cascade;
73 73

  
74 74
create table attendancedata (
75 75
  PersonCode decimal(8,0) unsigned not null comment '????R?[?h'
......
85 85
) comment '?o?????f?[?^' ;
86 86

  
87 87
-- ??s?c????}?X?^
88
drop table bankbusinessdaymaster cascade;
88
drop table if exists bankbusinessdaymaster cascade;
89 89

  
90 90
create table bankbusinessdaymaster (
91 91
  YEARMONTH decimal(6,0) default '0' not null comment '?N??'
......
98 98
) comment '??s?c????}?X?^' ;
99 99

  
100 100
-- ???????f?[?^
101
drop table billingdata cascade;
101
drop table if exists billingdata cascade;
102 102

  
103 103
create table billingdata (
104 104
  COMPANYCODE decimal(8,0) default '0' not null comment '??????R?[?h'
......
111 111
) comment '???????f?[?^' ;
112 112

  
113 113
-- ??????????f?[?^
114
drop table billingdatadetail cascade;
114
drop table if exists billingdatadetail cascade;
115 115

  
116 116
create table billingdatadetail (
117 117
  COMPANYCODE decimal(8,0) default '0' not null comment '??????R?[?h'
......
133 133
) comment '??????????f?[?^' ;
134 134

  
135 135
-- ???????x???T?}???[?f?[?^
136
drop table billingpaymentsummary cascade;
136
drop table if exists billingpaymentsummary cascade;
137 137

  
138 138
create table billingpaymentsummary (
139 139
  COMPANYCODE decimal(8,0) default '0' not null comment '??????R?[?h'
......
155 155
) comment '???????x???T?}???[?f?[?^' ;
156 156

  
157 157
-- ?^?c?????????
158
drop table bizperiodhistory cascade;
158
drop table if exists bizperiodhistory cascade;
159 159

  
160 160
create table bizperiodhistory (
161 161
  PeriodYear smallint(6) not null comment '?c??????E?H???N?x'
......
168 168
) comment '?^?c?????????' ;
169 169

  
170 170
-- ?H???????f?[?^?y???p?z
171
drop table bk_constructionledger cascade;
171
drop table if exists bk_constructionledger cascade;
172 172

  
173 173
create table bk_constructionledger (
174 174
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
......
195 195
) comment '?H???????f?[?^?y???p?z' ;
196 196

  
197 197
-- ?H??????????f?[?^?y???p?z
198
drop table bk_constructionledgerdetail cascade;
198
drop table if exists bk_constructionledgerdetail cascade;
199 199

  
200 200
create table bk_constructionledgerdetail (
201 201
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
......
228 228
) comment '?H??????????f?[?^?y???p?z' ;
229 229

  
230 230
-- ?H?????????s?f?[?^?y???p?z
231
drop table bk_constructionledgerexcute cascade;
231
drop table if exists bk_constructionledgerexcute cascade;
232 232

  
233 233
create table bk_constructionledgerexcute (
234 234
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
......
243 243
) comment '?H?????????s?f?[?^?y???p?z' ;
244 244

  
245 245
-- ??Z????f?[?^?y???p?z
246
drop table bk_estimatedata cascade;
246
drop table if exists bk_estimatedata cascade;
247 247

  
248 248
create table bk_estimatedata (
249 249
  SaveDate datetime not null comment '?????t'
......
263 263
) comment '??Z????f?[?^?y???p?z' ;
264 264

  
265 265
-- ??Z????y?[?W?f?[?^?y???p?z
266
drop table bk_estimatedatabody cascade;
266
drop table if exists bk_estimatedatabody cascade;
267 267

  
268 268
create table bk_estimatedatabody (
269 269
  SaveDate datetime not null comment '?????t'
......
282 282
) comment '??Z????y?[?W?f?[?^?y???p?z' ;
283 283

  
284 284
-- ??Z????f?[?^????y???p?z
285
drop table bk_estimatedatadetail cascade;
285
drop table if exists bk_estimatedatadetail cascade;
286 286

  
287 287
create table bk_estimatedatadetail (
288 288
  SaveDate datetime not null comment '?????t'
......
309 309
) comment '??Z????f?[?^????y???p?z' ;
310 310

  
311 311
-- ?@?l?i?}?X?^
312
drop table businesstypemaster cascade;
312
drop table if exists businesstypemaster cascade;
313 313

  
314 314
create table businesstypemaster (
315 315
  BusinessTypeCode decimal(5,0) unsigned not null comment '?@?l?i?R?[?h'
......
324 324
  on businesstypemaster(DisplayOrder);
325 325

  
326 326
-- ????????}?X?^
327
drop table commoncostlarge cascade;
327
drop table if exists commoncostlarge cascade;
328 328

  
329 329
create table commoncostlarge (
330 330
  LargeCode decimal(5,0) unsigned not null comment '????L?['
......
338 338
) comment '????????}?X?^' ;
339 339

  
340 340
-- ?????H???A?}?X?^
341
drop table commoncostlinkms cascade;
341
drop table if exists commoncostlinkms cascade;
342 342

  
343 343
create table commoncostlinkms (
344 344
  LargeCode decimal(5,0) unsigned not null comment '????L?['
......
350 350
) comment '?????H???A?}?X?^' ;
351 351

  
352 352
-- ?????????}?X?^
353
drop table commoncostmiddle cascade;
353
drop table if exists commoncostmiddle cascade;
354 354

  
355 355
create table commoncostmiddle (
356 356
  LargeCode decimal(5,0) unsigned not null comment '????L?['
......
365 365
) comment '?????????}?X?^' ;
366 366

  
367 367
-- ?????????L?[?}?X?^
368
drop table commoncostmiddlesearchword cascade;
368
drop table if exists commoncostmiddlesearchword cascade;
369 369

  
370 370
create table commoncostmiddlesearchword (
371 371
  LargeCode decimal(5,0) unsigned not null comment '????L?['
......
378 378
) comment '?????????L?[?}?X?^' ;
379 379

  
380 380
-- ?\???H???A?}?X?^
381
drop table componentlinkmaster cascade;
381
drop table if exists componentlinkmaster cascade;
382 382

  
383 383
create table componentlinkmaster (
384 384
  ComponentCode decimal(5,0) unsigned not null comment '?\???L?['
......
396 396
  on componentlinkmaster(ItemCode);
397 397

  
398 398
-- ?\???}?X?^
399
drop table componentmaster cascade;
399
drop table if exists componentmaster cascade;
400 400

  
401 401
create table componentmaster (
402 402
  ComponentCode decimal(5,0) unsigned not null comment '?\???L?['
......
415 415
  on componentmaster(DisplayOrder);
416 416

  
417 417
-- ?\???H??????A?}?X?^
418
drop table componenttotypemaster cascade;
418
drop table if exists componenttotypemaster cascade;
419 419

  
420 420
create table componenttotypemaster (
421 421
  ComponentCode decimal(5,0) unsigned not null comment '?\???L?['
......
433 433
  on componenttotypemaster(TypeCode);
434 434

  
435 435
-- ?H????{???
436
drop table constructionbaseinfo cascade;
436
drop table if exists constructionbaseinfo cascade;
437 437

  
438 438
create table constructionbaseinfo (
439 439
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
......
510 510
  on constructionbaseinfo(ConstructionPeriod);
511 511

  
512 512
-- ?H????{????
513
drop table constructionbaseinfodetail cascade;
513
drop table if exists constructionbaseinfodetail cascade;
514 514

  
515 515
create table constructionbaseinfodetail (
516 516
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
......
528 528
  on constructionbaseinfodetail(DetailNo);
529 529

  
530 530
-- ?H???{?H?\?Z?f?[?^
531
drop table constructionbudget cascade;
531
drop table if exists constructionbudget cascade;
532 532

  
533 533
create table constructionbudget (
534 534
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
......
559 559
) comment '?H???{?H?\?Z?f?[?^' ;
560 560

  
561 561
-- ?H???{?H?\?Z?f?[?^????
562
drop table constructionbudgetdetail cascade;
562
drop table if exists constructionbudgetdetail cascade;
563 563

  
564 564
create table constructionbudgetdetail (
565 565
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
......
584 584
) comment '?H???{?H?\?Z?f?[?^????' ;
585 585

  
586 586
-- ?H??}?X?^
587
drop table constructionitemmaster cascade;
587
drop table if exists constructionitemmaster cascade;
588 588

  
589 589
create table constructionitemmaster (
590 590
  ItemCode decimal(5,0) unsigned not null comment '?H??L?['
......
599 599
) comment '?H??}?X?^' ;
600 600

  
601 601
-- ?H???????f?[?^
602
drop table constructionledger cascade;
602
drop table if exists constructionledger cascade;
603 603

  
604 604
create table constructionledger (
605 605
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
......
626 626
) comment '?H???????f?[?^' ;
627 627

  
628 628
-- ?H??????????f?[?^
629
drop table constructionledgerdetail cascade;
629
drop table if exists constructionledgerdetail cascade;
630 630

  
631 631
create table constructionledgerdetail (
632 632
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
......
675 675
  on constructionledgerdetail(DetailCount);
676 676

  
677 677
-- ?H?????????s?f?[?^
678
drop table constructionledgerexcute cascade;
678
drop table if exists constructionledgerexcute cascade;
679 679

  
680 680
create table constructionledgerexcute (
681 681
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
......
693 693
  on constructionledgerexcute(ConstructionCode,TargetMonth,GroupCount,LineCount);
694 694

  
695 695
-- ?H???????N???
696
drop table constructionlink cascade;
696
drop table if exists constructionlink cascade;
697 697

  
698 698
create table constructionlink (
699 699
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
......
714 714
  on constructionlink(LinkType);
715 715

  
716 716
-- ?H????????
717
drop table constructionmaterialinfo cascade;
717
drop table if exists constructionmaterialinfo cascade;
718 718

  
719 719
create table constructionmaterialinfo (
720 720
  CONSTRUCTIONCODE int(10) unsigned default 0 not null comment '?H?????'
......
730 730
) comment '?H????????' ;
731 731

  
732 732
-- ????i?????t?f?[?^
733
drop table constructionprogressdate cascade;
733
drop table if exists constructionprogressdate cascade;
734 734

  
735 735
create table constructionprogressdate (
736 736
  ConstructionCode decimal(10,0) not null comment '?H?????'
......
744 744
) comment '????i?????t?f?[?^' ;
745 745

  
746 746
-- ???}?X?^
747
drop table constructionspecmaster cascade;
747
drop table if exists constructionspecmaster cascade;
748 748

  
749 749
create table constructionspecmaster (
750 750
  ItemCode decimal(5,0) unsigned not null comment '?H??L?['
......
764 764
  on constructionspecmaster(DisplayOrder);
765 765

  
766 766
-- ???P???}?X?^
767
drop table constructionspecunitprice cascade;
767
drop table if exists constructionspecunitprice cascade;
768 768

  
769 769
create table constructionspecunitprice (
770 770
  ComponentCode decimal(5,0) unsigned not null comment '?\???L?['
......
778 778
) comment '???P???}?X?^' ;
779 779

  
780 780
-- ?H?????}?X?^
781
drop table constructiontypemaster cascade;
781
drop table if exists constructiontypemaster cascade;
782 782

  
783 783
create table constructiontypemaster (
784 784
  TypeCode decimal(5,0) unsigned not null comment '?H?????R?[?h'
......
794 794
) comment '?H?????}?X?^' ;
795 795

  
796 796
-- ?S??????o??f?[?^
797
drop table costdataofperson cascade;
797
drop table if exists costdataofperson cascade;
798 798

  
799 799
create table costdataofperson (
800 800
  PersonCode decimal(8,0) unsigned not null comment '?S????R?[?h'
......
824 824
  on costdataofperson(ConstructionCode);
825 825

  
826 826
-- ??????o?^?\???f?[?^
827
drop table costomerregist cascade;
827
drop table if exists costomerregist cascade;
828 828

  
829 829
create table costomerregist (
830 830
  PersonCode decimal(8,0) unsigned not null comment '?\??????'
......
861 861
  on costomerregist(PetitionPeriod);
862 862

  
863 863
-- ????f?[?^
864
drop table dailydataconstruction cascade;
864
drop table if exists dailydataconstruction cascade;
865 865

  
866 866
create table dailydataconstruction (
867 867
  PersonCode decimal(8,0) unsigned not null comment '?S????R?[?h'
......
883 883
  on dailydataconstruction(ConstructionCode);
884 884

  
885 885
-- ????f?[?^ (????)
886
drop table dailydatadetail cascade;
886
drop table if exists dailydatadetail cascade;
887 887

  
888 888
create table dailydatadetail (
889 889
  PersonCode decimal(8,0) unsigned not null comment '?S????R?[?h'
......
906 906
  on dailydatadetail(PersonCode,DailyDataDate,ConstructionCode);
907 907

  
908 908
-- ????f?[?^ (??????)
909
drop table dailydatafield cascade;
909
drop table if exists dailydatafield cascade;
910 910

  
911 911
create table dailydatafield (
912 912
  PersonCode decimal(8,0) unsigned not null comment '????R?[?h'
......
924 924
  on dailydatafield(PersonCode,DailyDataDate,ConstructionCode);
925 925

  
926 926
-- ????f?[?^ (????)
927
drop table dailydatamaterials cascade;
927
drop table if exists dailydatamaterials cascade;
928 928

  
929 929
create table dailydatamaterials (
930 930
  PersonCode decimal(8,0) unsigned not null comment '????R?[?h'
......
945 945
  on dailydatamaterials(PersonCode,DailyDataDate,ConstructionCode);
946 946

  
947 947
-- ????f?[?^ (??????w??)
948
drop table dailydatasubcontractors cascade;
948
drop table if exists dailydatasubcontractors cascade;
949 949

  
950 950
create table dailydatasubcontractors (
951 951
  PersonCode decimal(8,0) unsigned not null comment '????R?[?h'
......
963 963
  on dailydatasubcontractors(PersonCode,DailyDataDate,ConstructionCode);
964 964

  
965 965
-- ????f?[?^ (???)
966
drop table dailydatavehicles cascade;
966
drop table if exists dailydatavehicles cascade;
967 967

  
968 968
create table dailydatavehicles (
969 969
  PersonCode decimal(8,0) unsigned not null comment '????R?[?h'
......
985 985
  on dailydatavehicles(PersonCode,DailyDataDate,ConstructionCode);
986 986

  
987 987
-- ???}?X?^
988
drop table daymaster cascade;
988
drop table if exists daymaster cascade;
989 989

  
990 990
create table daymaster (
991 991
  days smallint(6) not null comment '??'
......
995 995
  on daymaster(days);
996 996

  
997 997
-- ?????}?X?^
998
drop table deadlinemaster cascade;
998
drop table if exists deadlinemaster cascade;
999 999

  
1000 1000
create table deadlinemaster (
1001 1001
  LABOURKIND decimal(1,0) default '0' not null comment '??????'
......
1009 1009
) comment '?????}?X?^' ;
1010 1010

  
1011 1011
-- ?????o???}?X?^
1012
drop table departmentexpensesmaster cascade;
1012
drop table if exists departmentexpensesmaster cascade;
1013 1013

  
1014 1014
create table departmentexpensesmaster (
1015 1015
  DepartmentCode decimal(5,0) unsigned not null comment '?????R?[?h'
......
1024 1024
) comment '?????o???}?X?^' ;
1025 1025

  
1026 1026
-- ?????}?X?^
1027
drop table departmentmaster cascade;
1027
drop table if exists departmentmaster cascade;
1028 1028

  
1029 1029
create table departmentmaster (
1030 1030
  DepartmentCode decimal(5,0) unsigned not null comment '?????R?[?h'
......
1042 1042
  on departmentmaster(DisplayOrder);
1043 1043

  
1044 1044
-- ?????m?F???F?f?[?^
1045
drop table depositapprovalinfo cascade;
1045
drop table if exists depositapprovalinfo cascade;
1046 1046

  
1047 1047
create table depositapprovalinfo (
1048 1048
  ORDERERSDIVISION decimal(5,0) not null comment '???????'
......
1061 1061
) comment '?????m?F???F?f?[?^' ;
1062 1062

  
1063 1063
-- ?????f?[?^
1064
drop table depositdata cascade;
1064
drop table if exists depositdata cascade;
1065 1065

  
1066 1066
create table depositdata (
1067 1067
  ORDERERSDIVISION decimal(5,0) not null comment '???????'
......
1081 1081
) comment '?????f?[?^' ;
1082 1082

  
1083 1083
-- ????????f?[?^
1084
drop table depositdatadetail cascade;
1084
drop table if exists depositdatadetail cascade;
1085 1085

  
1086 1086
create table depositdatadetail (
1087 1087
  ORDERERSDIVISION decimal(5,0) not null comment '???????'
......
1105 1105
) comment '????????f?[?^' ;
1106 1106

  
1107 1107
-- ???}?X?^
1108
drop table divisionmaster cascade;
1108
drop table if exists divisionmaster cascade;
1109 1109

  
1110 1110
create table divisionmaster (
1111 1111
  DivisionCode decimal(5,0) unsigned not null comment '???R?[?h'
......
1119 1119
) comment '???}?X?^' ;
1120 1120

  
1121 1121
-- ??Z?\?Z???f?[?^
1122
drop table estimatebudget cascade;
1122
drop table if exists estimatebudget cascade;
1123 1123

  
1124 1124
create table estimatebudget (
1125 1125
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
......
1137 1137
) comment '??Z?\?Z???f?[?^' ;
1138 1138

  
1139 1139
-- ??Z?\?Z????f?[?^????
1140
drop table estimatebudgetdetail cascade;
1140
drop table if exists estimatebudgetdetail cascade;
1141 1141

  
1142 1142
create table estimatebudgetdetail (
1143 1143
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
......
1158 1158
) comment '??Z?\?Z????f?[?^????' ;
1159 1159

  
1160 1160
-- ??Z????f?[?^
1161
drop table estimatedata cascade;
1161
drop table if exists estimatedata cascade;
1162 1162

  
1163 1163
create table estimatedata (
1164 1164
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
......
1180 1180
  on estimatedata(ConstructionCode,FixedItemCode);
1181 1181

  
1182 1182
-- ??Z????y?[?W?f?[?^
1183
drop table estimatedatabody cascade;
1183
drop table if exists estimatedatabody cascade;
1184 1184

  
1185 1185
create table estimatedatabody (
1186 1186
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
......
1201 1201
  on estimatedatabody(ConstructionCode,ComponentCode,ItemCode);
1202 1202

  
1203 1203
-- ??Z????f?[?^????
1204
drop table estimatedatadetail cascade;
1204
drop table if exists estimatedatadetail cascade;
1205 1205

  
1206 1206
create table estimatedatadetail (
1207 1207
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
......
1230 1230
  on estimatedatadetail(ConstructionCode,PageCount);
1231 1231

  
1232 1232
-- ?o???}?X?^
1233
drop table expensesmaster cascade;
1233
drop table if exists expensesmaster cascade;
1234 1234

  
1235 1235
create table expensesmaster (
1236 1236
  DivisionCode smallint(6) not null comment '?H?????R?[?h'
......
1244 1244
) comment '?o???}?X?^' ;
1245 1245

  
1246 1246
-- ???x???}?X?^
1247
drop table holidaycalendermaster cascade;
1247
drop table if exists holidaycalendermaster cascade;
1248 1248

  
1249 1249
create table holidaycalendermaster (
1250 1250
  Holiday date not null comment '?x??'
......
1264 1264
  on holidaycalendermaster(TargetDay);
1265 1265

  
1266 1266
-- ?????????????
1267
drop table inputsearchlogdata cascade;
1267
drop table if exists inputsearchlogdata cascade;
1268 1268

  
1269 1269
create table inputsearchlogdata (
1270 1270
  ConstructionCode decimal(10,0) not null comment '?H???R?[?h'
......
1279 1279
  on inputsearchlogdata(ConstructionCode,UsedProcessNo,InputCode);
1280 1280

  
1281 1281
-- ???????f?[?^
1282
drop table invoicedata cascade;
1282
drop table if exists invoicedata cascade;
1283 1283

  
1284 1284
create table invoicedata (
1285 1285
  INVOICENO decimal(9,0) not null comment '??????No'
......
1306 1306
alter table invoicedata add unique ORDERERSDIVISION (ORDERERSDIVISION,ORDERERSCODE,REQUESTMONTH,SEQNO) ;
1307 1307

  
1308 1308
-- ??????
1309
drop table materialinfo cascade;
1309
drop table if exists materialinfo cascade;
1310 1310

  
1311 1311
create table materialinfo (
1312 1312
  MATERIALITEMCODE smallint(5) unsigned default 0 not null comment '????i??R?[?h'
......
1319 1319
) comment '??????' ;
1320 1320

  
1321 1321
-- ????i??}?X?^
1322
drop table materialitemmaster cascade;
1322
drop table if exists materialitemmaster cascade;
1323 1323

  
1324 1324
create table materialitemmaster (
1325 1325
  MATERIALITEMCODE smallint(5) unsigned default 0 not null comment '????i??R?[?h'
......
1334 1334
) comment '????i??}?X?^' ;
1335 1335

  
1336 1336
-- ??????}?X?^
1337
drop table materialkindmaster cascade;
1337
drop table if exists materialkindmaster cascade;
1338 1338

  
1339 1339
create table materialkindmaster (
1340 1340
  MATERIALKINDCODE smallint(5) unsigned default 0 not null comment '??????R?[?h'
......
1347 1347
) comment '??????}?X?^' ;
1348 1348

  
1349 1349
-- ??????????
1350
drop table materialrecordinfo cascade;
1350
drop table if exists materialrecordinfo cascade;
1351 1351

  
1352 1352
create table materialrecordinfo (
1353 1353
  MATERIALITEMCODE smallint(5) unsigned default 0 not null comment '????i??R?[?h'
......
1365 1365
) comment '??????????' ;
1366 1366

  
1367 1367
-- ?f??????b?Z?[?W
1368
drop table messageboarddata cascade;
1368
drop table if exists messageboarddata cascade;
1369 1369

  
1370 1370
create table messageboarddata (
1371 1371
  RecordNumber decimal(6,0) unsigned not null comment '???R?[?h???'
......
1395 1395
  on messageboarddata(MessageFlag);
1396 1396

  
1397 1397
-- ?f???????e?[?u??
1398
drop table messageboardterget cascade;
1398
drop table if exists messageboardterget cascade;
1399 1399

  
1400 1400
create table messageboardterget (
1401 1401
  RecordNumber decimal(6,0) unsigned not null comment '???R?[?h???'
......
1412 1412
  on messageboardterget(RecordNumber,BranchNumber);
1413 1413

  
1414 1414
-- ?f??????b?Z?[?W?{??????
1415
drop table messagebrowsinghistory cascade;
1415
drop table if exists messagebrowsinghistory cascade;
1416 1416

  
1417 1417
create table messagebrowsinghistory (
1418 1418
  RecordNumber decimal(6,0) unsigned not null comment '???R?[?h???'
......
1426 1426
) comment '?f??????b?Z?[?W?{??????' ;
1427 1427

  
1428 1428
-- ???}?X?^
1429
drop table monthmaster cascade;
1429
drop table if exists monthmaster cascade;
1430 1430

  
1431 1431
create table monthmaster (
1432 1432
  month smallint(6) not null comment '??'
......
1436 1436
  on monthmaster(month);
1437 1437

  
1438 1438
-- ??????}?X?^
1439
drop table orderersmaster cascade;
1439
drop table if exists orderersmaster cascade;
1440 1440

  
1441 1441
create table orderersmaster (
1442 1442
  OrderCotegory decimal(5,0) unsigned not null comment '???????'
......
1464 1464
) comment '??????}?X?^' ;
1465 1465

  
1466 1466
-- ????z?f?[?^
1467
drop table orderspricedata cascade;
1467
drop table if exists orderspricedata cascade;
1468 1468

  
1469 1469
create table orderspricedata (
1470 1470
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
......
1483 1483
) comment '????z?f?[?^' ;
1484 1484

  
1485 1485
-- ?x?????F???f?[?^
1486
drop table paymentapprovalinfo cascade;
1486
drop table if exists paymentapprovalinfo cascade;
1487 1487

  
1488 1488
create table paymentapprovalinfo (
1489 1489
  COMPANYCODE decimal(8,0) default '0' not null comment '??????R?[?h'
......
1501 1501
) comment '?x?????F???f?[?^' ;
1502 1502

  
1503 1503
-- ?x??????f?[?^
1504
drop table paymentdatadetail cascade;
1504
drop table if exists paymentdatadetail cascade;
1505 1505

  
1506 1506
create table paymentdatadetail (
1507 1507
  COMPANYCODE decimal(8,0) default '0' not null comment '??????R?[?h'
......
1532 1532
  on paymentdatadetail(APPROVALPERSONCODE);
1533 1533

  
1534 1534
-- ?H??????????f?[?^
1535
drop table periodavoidance cascade;
1535
drop table if exists periodavoidance cascade;
1536 1536

  
1537 1537
create table periodavoidance (
1538 1538
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
......
1553 1553
  on periodavoidance(FieldNo);
1554 1554

  
1555 1555
-- ?S??????F?f?[?^
1556
drop table personapproval cascade;
1556
drop table if exists personapproval cascade;
1557 1557

  
1558 1558
create table personapproval (
1559 1559
  PersonCode decimal(8,0) unsigned not null comment '?S????R?[?h'
......
1572 1572
) comment '?S??????F?f?[?^' ;
1573 1573

  
1574 1574
-- ?S??????F?R?????g?f?[?^
1575
drop table personapprovalcomment cascade;
1575
drop table if exists personapprovalcomment cascade;
1576 1576

  
1577 1577
create table personapprovalcomment (
1578 1578
  PersonCode decimal(8,0) unsigned not null comment '?S????R?[?h'
......
1588 1588
) comment '?S??????F?R?????g?f?[?^' ;
1589 1589

  
1590 1590
-- ?S??????????}?X?^
1591
drop table persondepartmentmaster cascade;
1591
drop table if exists persondepartmentmaster cascade;
1592 1592

  
1593 1593
create table persondepartmentmaster (
1594 1594
  PersonCode decimal(8,0) unsigned not null comment '?S????R?[?h'
......
1606 1606
  on persondepartmentmaster(DepartmentCode);
1607 1607

  
1608 1608
-- ?S????}?X?^
1609
drop table personinchargemaster cascade;
1609
drop table if exists personinchargemaster cascade;
1610 1610

  
1611 1611
create table personinchargemaster (
1612 1612
  PersonCode decimal(8,0) unsigned not null comment '?S????R?[?h'
......
1641 1641
  on personinchargemaster(DepartmentCode);
1642 1642

  
1643 1643
-- ?S??????^?}?X?^
1644
drop table personsalarymaster cascade;
1644
drop table if exists personsalarymaster cascade;
1645 1645

  
1646 1646
create table personsalarymaster (
1647 1647
  PersonCode decimal(8,0) unsigned not null comment '?S????R?[?h'
......
1660 1660
  on personsalarymaster(StartDate);
1661 1661

  
1662 1662
-- ?w???????f?[?^
1663
drop table pointingoutcomment cascade;
1663
drop table if exists pointingoutcomment cascade;
1664 1664

  
1665 1665
create table pointingoutcomment (
1666 1666
  ConstructionCode decimal(10,0) not null comment '?H???R?[?h'
......
1682 1682
) comment '?w???????f?[?^' ;
1683 1683

  
1684 1684
-- ?????????????c???^?f?[?^
1685
drop table proceedingsdata cascade;
1685
drop table if exists proceedingsdata cascade;
1686 1686

  
1687 1687
create table proceedingsdata (
1688 1688
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
......
1698 1698
) comment '?????????????c???^?f?[?^' ;
1699 1699

  
1700 1700
-- ?????????????c???^?f?[?^?i?o???j
1701
drop table proceedingsdataattend cascade;
1701
drop table if exists proceedingsdataattend cascade;
1702 1702

  
1703 1703
create table proceedingsdataattend (
1704 1704
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
......
1713 1713
) comment '?????????????c???^?f?[?^?i?o???j' ;
1714 1714

  
1715 1715
-- ?????????????c???^?f?[?^?i????j
1716
drop table proceedingsdatadetail cascade;
1716
drop table if exists proceedingsdatadetail cascade;
1717 1717

  
1718 1718
create table proceedingsdatadetail (
1719 1719
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
......
1729 1729
) comment '?????????????c???^?f?[?^?i????j' ;
1730 1730

  
1731 1731
-- ???F?f?[?^
1732
drop table processapproval cascade;
1732
drop table if exists processapproval cascade;
1733 1733

  
1734 1734
create table processapproval (
1735 1735
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
......
1747 1747
) comment '???F?f?[?^' ;
1748 1748

  
1749 1749
-- ???F?R?????g?f?[?^
1750
drop table processapprovalcomment cascade;
1750
drop table if exists processapprovalcomment cascade;
1751 1751

  
1752 1752
create table processapprovalcomment (
1753 1753
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
......
1762 1762
) comment '???F?R?????g?f?[?^' ;
1763 1763

  
1764 1764
-- ???F????f?[?^
1765
drop table processapprovaldetail cascade;
1765
drop table if exists processapprovaldetail cascade;
1766 1766

  
1767 1767
create table processapprovaldetail (
1768 1768
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
......
1776 1776
) comment '???F????f?[?^' ;
1777 1777

  
1778 1778
-- ?N?????}?X?^
1779
drop table processexcutemaster cascade;
1779
drop table if exists processexcutemaster cascade;
1780 1780

  
1781 1781
create table processexcutemaster (
1782 1782
  SecCode decimal(2,0) unsigned not null comment '???????'
......
1794 1794
  on processexcutemaster(ExecCode);
1795 1795

  
1796 1796
-- ???????f?[?^
1797
drop table purchaseorder cascade;
1797
drop table if exists purchaseorder cascade;
1798 1798

  
1799 1799
create table purchaseorder (
1800 1800
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
......
1830 1830
) comment '???????f?[?^' ;
1831 1831

  
1832 1832
-- ?????????t?f?[?^
1833
drop table purchaseorderdate cascade;
1833
drop table if exists purchaseorderdate cascade;
1834 1834

  
1835 1835
create table purchaseorderdate (
1836 1836
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
......
1845 1845
) comment '?????????t?f?[?^' ;
1846 1846

  
1847 1847
-- ??????????f?[?^
1848
drop table purchaseorderdetail cascade;
1848
drop table if exists purchaseorderdetail cascade;
1849 1849

  
1850 1850
create table purchaseorderdetail (
1851 1851
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
......
1872 1872
  on purchaseorderdetail(SourceCode);
1873 1873

  
1874 1874
-- ?????f?[?^
1875
drop table requestdata cascade;
1875
drop table if exists requestdata cascade;
1876 1876

  
1877 1877
create table requestdata (
1878 1878
  REQUESTNO decimal(9,0) not null comment '????No'
......
1897 1897
) comment '?????f?[?^' ;
1898 1898

  
1899 1899
-- ?????f?[?^????
1900
drop table requestdatadetail cascade;
1900
drop table if exists requestdatadetail cascade;
1901 1901

  
1902 1902
create table requestdatadetail (
1903 1903
  REQUESTNO decimal(9,0) not null comment '????No'
......
1912 1912
) comment '?????f?[?^????' ;
1913 1913

  
1914 1914
-- ?????w?b?_
1915
drop table requesthead cascade;
1915
drop table if exists requesthead cascade;
1916 1916

  
1917 1917
create table requesthead (
1918 1918
  REQUESTNO decimal(9,0) not null comment '????No'
......
1938 1938
alter table requesthead add unique REQCONSTRUCTIONCODE (REQCONSTRUCTIONCODE,ORDERNO) ;
1939 1939

  
1940 1940
-- ?????????t?f?[?^
1941
drop table requestorderdate cascade;
1941
drop table if exists requestorderdate cascade;
1942 1942

  
1943 1943
create table requestorderdate (
1944 1944
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
......
1950 1950
) comment '?????????t?f?[?^' ;
1951 1951

  
1952 1952
-- ????O???t?f?[?^
1953
drop table salesgraphdata cascade;
1953
drop table if exists salesgraphdata cascade;
1954 1954

  
1955 1955
create table salesgraphdata (
1956 1956
  GraphDataCode decimal(8,0) not null comment '?O???t?f?[?^?R?[?h'
......
1974 1974
  on salesgraphdata(ConstructionPeriod);
1975 1975

  
1976 1976
-- ?????}?X?^
1977
drop table securitymaster cascade;
1977
drop table if exists securitymaster cascade;
1978 1978

  
1979 1979
create table securitymaster (
1980 1980
  SecCode decimal(2,0) unsigned not null comment '???????'
......
1999 1999
  on securitymaster(SecRange);
2000 2000

  
2001 2001
-- ???S?p?g???[???f?[?^
2002
drop table sfpdata cascade;
2002
drop table if exists sfpdata cascade;
2003 2003

  
2004 2004
create table sfpdata (
2005 2005
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
......
2017 2017
  on sfpdata(RequestDate);
2018 2018

  
2019 2019
-- ???S?p?g???[??????f?[?^
2020
drop table sfpdatadetail cascade;
2020
drop table if exists sfpdatadetail cascade;
2021 2021

  
2022 2022
create table sfpdatadetail (
2023 2023
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
......
2030 2030
) comment '???S?p?g???[??????f?[?^' ;
2031 2031

  
2032 2032
-- ??????{?H?H??o?^?\???f?[?^
2033
drop table subconstrjobitemregist cascade;
2033
drop table if exists subconstrjobitemregist cascade;
2034 2034

  
2035 2035
create table subconstrjobitemregist (
2036 2036
  PersonCode decimal(8,0) unsigned not null comment '?\??????'
......
2044 2044
) comment '??????{?H?H??o?^?\???f?[?^' ;
2045 2045

  
2046 2046
-- ??????E?????N?o?^?\???f?[?^
2047
drop table subconstrjoblinkregist cascade;
2047
drop table if exists subconstrjoblinkregist cascade;
2048 2048

  
2049 2049
create table subconstrjoblinkregist (
2050 2050
  PersonCode decimal(8,0) unsigned not null comment '?\??????'
......
2058 2058
) comment '??????E?????N?o?^?\???f?[?^' ;
2059 2059

  
2060 2060
-- ??????o?^?\???f?[?^
2061
drop table subconstrregist cascade;
2061
drop table if exists subconstrregist cascade;
2062 2062

  
2063 2063
create table subconstrregist (
2064 2064
  PersonCode decimal(8,0) unsigned not null comment '?\??????'
......
2093 2093
) comment '??????o?^?\???f?[?^' ;
2094 2094

  
2095 2095
-- ??????H??}?X?^
2096
drop table subcontractoritemmaster cascade;
2096
drop table if exists subcontractoritemmaster cascade;
2097 2097

  
2098 2098
create table subcontractoritemmaster (
2099 2099
  ItemCode decimal(5,0) unsigned not null comment '?H??L?['
......
2106 2106
) comment '??????H??}?X?^' ;
2107 2107

  
2108 2108
-- ??????E??}?X?^
2109
drop table subcontractorjobcategory cascade;
2109
drop table if exists subcontractorjobcategory cascade;
2110 2110

  
2111 2111
create table subcontractorjobcategory (
2112 2112
  JobCategoryCode decimal(5,0) not null comment '?E??L?['
......
2119 2119
) comment '??????E??}?X?^' ;
2120 2120

  
2121 2121
-- ??????{?H?H??f?[?^
2122
drop table subcontractorjobitem cascade;
2122
drop table if exists subcontractorjobitem cascade;
2123 2123

  
2124 2124
create table subcontractorjobitem (
2125 2125
  CompanyCode decimal(8,0) not null comment '??????R?[?h'
......
2137 2137
  on subcontractorjobitem(ItemCode);
2138 2138

  
2139 2139
-- ??????E?????N?}?X?^
2140
drop table subcontractorjoblink cascade;
2140
drop table if exists subcontractorjoblink cascade;
2141 2141

  
2142 2142
create table subcontractorjoblink (
2143 2143
  CompanyCode decimal(8,0) not null comment '??????R?[?h'
......
2155 2155
  on subcontractorjoblink(JobCategoryCode);
2156 2156

  
2157 2157
-- ??????}?X?^
2158
drop table subcontractormaster cascade;
2158
drop table if exists subcontractormaster cascade;
2159 2159

  
2160 2160
create table subcontractormaster (
2161 2161
  CompanyCode decimal(8,0) not null comment '??????R?[?h'
......
2188 2188
  on subcontractormaster(JapaneseSyllabary);
2189 2189

  
2190 2190
-- ?d????}?X?^
2191
drop table suppliersmaster cascade;
2191
drop table if exists suppliersmaster cascade;
2192 2192

  
2193 2193
create table suppliersmaster (
2194 2194
  SuppliersCode decimal(5,0) unsigned not null comment '?d????R?[?h'
......
2209 2209
) comment '?d????}?X?^' ;
2210 2210

  
2211 2211
-- ?V?X?e???N???m?F?f?[?^
2212
drop table systemexecute cascade;
2212
drop table if exists systemexecute cascade;
2213 2213

  
2214 2214
create table systemexecute (
2215 2215
  PrimaryCode tinyint(4) not null comment '?L?[????'
......
2222 2222
) comment '?V?X?e???N???m?F?f?[?^' ;
2223 2223

  
2224 2224
-- ????}?X?^
2225
drop table systemmaster cascade;
2225
drop table if exists systemmaster cascade;
2226 2226

  
2227 2227
create table systemmaster (
2228 2228
  SystemCode decimal(3,0) unsigned not null comment '???R?[?h'
......
2259 2259
) comment '????}?X?^' ;
2260 2260

  
2261 2261
-- ?????}?X?^
2262
drop table termmaster cascade;
2262
drop table if exists termmaster cascade;
2263 2263

  
2264 2264
create table termmaster (
2265 2265
  ConstructionStatusFlg decimal(2,0) not null comment '?H?????t???O'
......
2281 2281
  on termmaster(DisplayOrder);
2282 2282

  
2283 2283
-- ?o?????f?[?^
2284
drop table tranceportdailydata cascade;
2284
drop table if exists tranceportdailydata cascade;
2285 2285

  
2286 2286
create table tranceportdailydata (
2287 2287
  PersonCode decimal(8,0) unsigned not null comment '????R?[?h'
......
2303 2303
  on tranceportdailydata(AttendanceDate);
2304 2304

  
2305 2305
-- ?H?????o???}?X?^
2306
drop table typeexpensesmaster cascade;
2306
drop table if exists typeexpensesmaster cascade;
2307 2307

  
2308 2308
create table typeexpensesmaster (
2309 2309
  TypeCode decimal(5,0) unsigned not null comment '?H?????R?[?h'
......
2317 2317
) comment '?H?????o???}?X?^' ;
2318 2318

  
2319 2319
-- ?P??}?X?^
2320
drop table unitmaster cascade;
2320
drop table if exists unitmaster cascade;
2321 2321

  
2322 2322
create table unitmaster (
2323 2323
  UnitKey decimal(5,0) unsigned not null comment '?P??L?['
......
2332 2332
  on unitmaster(DisplayOrder);
2333 2333

  
2334 2334
-- ????}?X?^
2335
drop table vehiclemaster cascade;
2335
drop table if exists vehiclemaster cascade;
2336 2336

  
2337 2337
create table vehiclemaster (
2338 2338
  VehicleCode decimal(5,0) unsigned not null comment '????R?[?h'
......
2361 2361
) comment '????}?X?^' ;
2362 2362

  
2363 2363
-- ????L?^?f?[?^
2364
drop table vehiclerecorddata cascade;
2364
drop table if exists vehiclerecorddata cascade;
2365 2365

  
2366 2366
create table vehiclerecorddata (
2367 2367
  VehicleCode decimal(5,0) unsigned not null comment '????R?[?h'
......
2377 2377
) comment '????L?^?f?[?^' ;
2378 2378

  
2379 2379
-- ????\??f?[?^
2380
drop table vehiclescheduledata cascade;
2380
drop table if exists vehiclescheduledata cascade;
2381 2381

  
2382 2382
create table vehiclescheduledata (
2383 2383
  TargetDate date not null comment '????'
......
2402 2402
  on vehiclescheduledata(TargetDay);
2403 2403

  
2404 2404
-- ?N?}?X?^
2405
drop table yearmaster cascade;
2405
drop table if exists yearmaster cascade;
2406 2406

  
2407 2407
create table yearmaster (
2408 2408
  years smallint(6) not null comment '?N'

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