プロジェクト

全般

プロフィール

リビジョン 338

堀内ほぼ7年前に追加

工事情報:営業副担当追加
部署マスタ:使用終了日付追加
工事詳細台帳データ・明細データ:インデックス追加

差分を表示:

branches/ddl/20180328_SQL.txt
1
-- ?????}?X?^
2
DROP TABLE IF EXISTS departmentmaster_OLD;
3
CREATE TABLE departmentmaster_OLD As Select * from departmentmaster;
4

  
5
drop table if exists departmentmaster cascade;
6

  
7
create table departmentmaster (
8
  DepartmentCode decimal(5,0) unsigned not null comment '?????R?[?h'
9
  , DisplayOrder decimal(5,0) unsigned not null comment '?\????'
10
  , DepartmentString varchar(100) not null comment '??????'
11
  , ActionScheduleFlg decimal(1,0) not null comment '?s???\??\???t???O'
12
  , StaffAssignFlg decimal(1,0) not null comment '?l???z?u?\???t???O'
13
  , StartDate datetime not null comment '?J?n???t'
14
  , CompDate datetime not null comment '?I?????t'
15
  , DeleteFlg decimal(1,0) not null comment '???t???O'
16
  , EntryDate datetime not null comment '?o?^???t'
17
  , UpdateDate datetime not null comment '?X?V???t'
18
  , constraint departmentmaster_PKC primary key (DepartmentCode)
19
) comment '?????}?X?^' ;
20

  
21
create index DepartmentMaster_index1
22
  on departmentmaster(DisplayOrder);
23

  
24
Insert INTO departmentmaster
25
SELECT
26
  DepartmentCode
27
  , DisplayOrder
28
  , DepartmentString
29
  , ActionScheduleFlg
30
  , StaffAssignFlg
31
  , NOW()
32
  , DATE('0001/01/01')
33
  , DeleteFlg
34
  , EntryDate
35
  , UpdateDate
36
From departmentmaster_OLD
37
;
38
commit;
branches/ddl/20180402_SQL.txt
1
create index constructionledger_Index1
2
  on constructionledger(ConstructionStart);
3

  
4
create index constructionledger_Index2
5
  on constructionledger(ConstructionEnd);
6

  
7
create index LedgerDetail_Index06
8
  on constructionledgerdetail(SalaryFlg);
9

  
10
create index LedgerDetail_Index07
11
  on constructionledgerdetail(CompanyCode);
branches/ddl/20180405_SQL.txt
1
-- ?H????{???
2
DROP TABLE IF EXISTS constructionbaseinfo_OLD;
3
CREATE TABLE constructionbaseinfo_OLD As Select * from constructionbaseinfo;
4

  
5
drop table if exists constructionbaseinfo cascade;
6

  
7
create table constructionbaseinfo (
8
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
9
  , TyingFlg decimal(1,0) not null comment '?R?t?f?[?^?t???O'
10
  , JoinFlg decimal(1,0) not null comment '?????_??H???t???O'
11
  , ConstructionYear smallint(5) unsigned not null comment '?H???N?x'
12
  , ConstructionPeriod smallint(5) unsigned not null comment '?H??????'
13
  , RequestedDate date comment '??????'
14
  , EstimatesSubmitDeadline date comment '?????o????'
15
  , EstimatesSubmittedDate date comment '?????o??'
16
  , ProvisionalOrderDate date comment '?????'
17
  , OrderDate date comment '???'
18
  , OrderStartingDate date comment '?J?n?\???'
19
  , OrderCompletionDate date comment '?????\???'
20
  , PreparationStartDate date comment '?{?H?????J?n??'
21
  , ConstructionStartingDate date comment '?{?H?J?n??'
22
  , ConstructionCompletionDate date comment '?{?H??????'
23
  , NonOrderDate date comment '????'
24
  , OrdersDecisionPrice decimal(12,0) not null comment '??????????z'
25
  , OrdersDecisionPriceInTax decimal(12,0) not null comment '??????????z'
26
  , SalesDepCode decimal(5,0) unsigned not null comment '?c??S????????R?[?h'
27
  , SalesPersonCode decimal(8,0) unsigned not null comment '?c??S????R?[?h'
28
  , SalesSubDepCode decimal(5,0) unsigned not null comment '?c????S????????R?[?h'
29
  , SalesSubPersonCode decimal(8,0) unsigned not null comment '?c????S????R?[?h'
30
  , ConstrDepCode decimal(5,0) unsigned not null comment '?H???S????????R?[?h'
31
  , ConstructionPersonCode decimal(8,0) not null comment '?H???S????R?[?h'
32
  , ConstrSubDepCode decimal(5,0) unsigned not null comment '?H?????S????????R?[?h'
33
  , ConstrSubPersonCode decimal(8,0) not null comment '?H?????S????R?[?h'
34
  , ConstrInstrDepCode decimal(5,0) unsigned not null comment '?H???w?????????R?[?h'
35
  , ConstructionInstructor decimal(8,0) not null comment '?H???w?????R?[?h'
36
  , TransferConstruction decimal(8,0) not null comment '?H??????R?[?h'
37
  , TransferConstructionDate date comment '?H??????'
38
  , OrderersDivision decimal(5,0) not null comment '????????R?[?h'
39
  , OrderersCode decimal(5,0) unsigned not null comment '??????R?[?h'
40
  , EstimatesExpirationDate date comment '????L??????'
41
  , ConstructionPeriodStart date comment '?_??H???J?n??'
42
  , ConstructionPeriodEnd date comment '?_??H??????'
43
  , ConstructionPeriodStart2 date comment '?_??H???J?n?i???????j'
44
  , ConstructionPeriodEnd2 date comment '?_??H???????i???????j'
45
  , StartDate date comment '?H???J?n??'
46
  , EndDate date comment '?H???I????'
47
  , PurchaseOrderMailingDate date comment '???????X????'
48
  , PurchaseOrderReturnDate date comment '???????????'
49
  , PurchaseOrderReturnCheckDate date comment '??????????m?F??'
50
  , ConsumptionTaxFlg decimal(1,0) not null comment '?????t???O'
51
  , PrimeContractorFlg decimal(1,0) not null comment '?????t???O'
52
  , SalesCostFlg decimal(1,0) not null comment '?c??o?????t???O'
53
  , ConstructionStatusFlg decimal(2,0) not null comment '?H?????t???O'
54
  , ConstructionType decimal(5,0) not null comment '?H?????R?[?h'
55
  , EstimateType decimal(1,0) not null comment '??????'
56
  , BillingStartDate date not null comment '?????????J?n??'
57
  , BillingDate date not null comment '??????'
58
  , BillingSplitFlg decimal(1,0) not null comment '??????t???O'
59
  , BillingSendDate date comment '???????X??/??n????'
60
  , LedgerComplateDate date not null comment '?H????????????????t'
61
  , InspectPlanningDate date not null comment '?????\???'
62
  , InspectExecuteDate date not null comment '???????s??'
63
  , RevCompleteDate date not null comment '??????????????'
64
  , EntryDate datetime not null comment '?o?^???t'
65
  , UpdateDate datetime not null comment '?X?V???t'
66
  , constraint constructionbaseinfo_PKC primary key (ConstructionCode)
67
) comment '?H????{???' ;
68

  
69
create index BaseInfo_Index1
70
  on constructionbaseinfo(ConstructionStatusFlg);
71

  
72
create index BaseInfo_Index2
73
  on constructionbaseinfo(EstimateType);
74

  
75
create index BaseInfo_Index3
76
  on constructionbaseinfo(SalesPersonCode);
77

  
78
create index BaseInfo_Index4
79
  on constructionbaseinfo(ConstructionPersonCode);
80

  
81
create index BaseInfo_Index5
82
  on constructionbaseinfo(ConstructionInstructor);
83

  
84
create index BaseInfo_Index6
85
  on constructionbaseinfo(ConstructionPeriod);
86

  
87
Insert INTO constructionbaseinfo
88
Select 
89
  ConstructionCode
90
  , TyingFlg
91
  , JoinFlg
92
  , ConstructionYear
93
  , ConstructionPeriod
94
  , RequestedDate
95
  , EstimatesSubmitDeadline
96
  , EstimatesSubmittedDate
97
  , ProvisionalOrderDate
98
  , OrderDate
99
  , OrderStartingDate
100
  , OrderCompletionDate
101
  , PreparationStartDate
102
  , ConstructionStartingDate
103
  , ConstructionCompletionDate
104
  , NonOrderDate
105
  , OrdersDecisionPrice
106
  , OrdersDecisionPriceInTax
107
  , SalesDepCode
108
  , SalesPersonCode
109
  , 0
110
  , 0
111
  , ConstrDepCode
112
  , ConstructionPersonCode
113
  , ConstrSubDepCode
114
  , ConstrSubPersonCode
115
  , ConstrInstrDepCode
116
  , ConstructionInstructor
117
  , TransferConstruction
118
  , TransferConstructionDate
119
  , OrderersDivision
120
  , OrderersCode
121
  , EstimatesExpirationDate
122
  , ConstructionPeriodStart
123
  , ConstructionPeriodEnd
124
  , ConstructionPeriodStart2
125
  , ConstructionPeriodEnd2
126
  , StartDate
127
  , EndDate
128
  , PurchaseOrderMailingDate
129
  , PurchaseOrderReturnDate
130
  , PurchaseOrderReturnCheckDate
131
  , ConsumptionTaxFlg
132
  , PrimeContractorFlg
133
  , SalesCostFlg
134
  , ConstructionStatusFlg
135
  , ConstructionType
136
  , EstimateType
137
  , BillingStartDate
138
  , BillingDate
139
  , BillingSplitFlg
140
  , BillingSendDate
141
  , LedgerComplateDate
142
  , InspectPlanningDate
143
  , InspectExecuteDate
144
  , RevCompleteDate
145
  , EntryDate
146
  , UpdateDate
147
From constructionbaseinfo_OLD;
148

  
149
-- ?N?}?X?^
150
DROP TABLE IF EXISTS yearmaster_OLD;
151
CREATE TABLE yearmaster_OLD As Select * from yearmaster;
152

  
153
drop table if exists yearmaster cascade;
154

  
155
create table yearmaster (
156
  years smallint(6) not null comment '?N'
157
  , constraint yearmaster_PKC primary key (years)
158
) comment '?N?}?X?^' ;
159

  
160
Insert INTO yearmaster
161
Select * From yearmaster_OLD;
162

  
163

  
164
-- ???}?X?^
165
DROP TABLE IF EXISTS monthmaster_OLD;
166
CREATE TABLE monthmaster_OLD As Select * from monthmaster;
167

  
168
drop table if exists monthmaster cascade;
169

  
170
create table monthmaster (
171
  month smallint(6) not null comment '??'
172
  , constraint monthmaster_PKC primary key (month)
173
) comment '???}?X?^' ;
174

  
175
Insert INTO monthmaster
176
Select * From monthmaster_OLD;
177

  
178

  
179
-- ???}?X?^
180
DROP TABLE IF EXISTS daymaster_OLD;
181
CREATE TABLE daymaster_OLD As Select * from daymaster;
182

  
183
drop table if exists daymaster cascade;
184

  
185
create table daymaster (
186
  days smallint(6) not null comment '??'
187
  , constraint daymaster_PKC primary key (days)
188
) comment '???}?X?^' ;
189

  
190
Insert INTO daymaster
191
Select * From daymaster_OLD;
192

  
193
commit;
branches/ddl/ProcessManagement.sql
1 1
-- Project Name : noname
2
-- Date/Time    : 2018/03/28 9:13:42
2
-- Date/Time    : 2018/04/06 11:54:53
3 3
-- Author       : Horiuchi
4 4
-- RDBMS Type   : MySQL
5 5
-- Application  : A5:SQL Mk-2
......
486 486
  , OrdersDecisionPriceInTax decimal(12,0) not null comment '??????????z'
487 487
  , SalesDepCode decimal(5,0) unsigned not null comment '?c??S????????R?[?h'
488 488
  , SalesPersonCode decimal(8,0) unsigned not null comment '?c??S????R?[?h'
489
  , SalesSubDepCode decimal(5,0) unsigned not null comment '?c????S????????R?[?h'
490
  , SalesSubPersonCode decimal(8,0) unsigned not null comment '?c????S????R?[?h'
489 491
  , ConstrDepCode decimal(5,0) unsigned not null comment '?H???S????????R?[?h'
490 492
  , ConstructionPersonCode decimal(8,0) not null comment '?H???S????R?[?h'
491 493
  , ConstrSubDepCode decimal(5,0) unsigned not null comment '?H?????S????????R?[?h'
......
659 661
  , constraint constructionledger_PKC primary key (ConstructionCode)
660 662
) comment '?H???????f?[?^' ;
661 663

  
664
create index constructionledger_Index1
665
  on constructionledger(ConstructionStart);
666

  
667
create index constructionledger_Index2
668
  on constructionledger(ConstructionEnd);
669

  
662 670
-- ?H??????????f?[?^
663 671
drop table if exists constructionledgerdetail cascade;
664 672

  
......
708 716
create index LedgerDetail_Index05
709 717
  on constructionledgerdetail(DetailCount);
710 718

  
719
create index LedgerDetail_Index06
720
  on constructionledgerdetail(SalaryFlg);
721

  
722
create index LedgerDetail_Index07
723
  on constructionledgerdetail(CompanyCode);
724

  
711 725
-- ?H?????????s?f?[?^
712 726
drop table if exists constructionledgerexcute cascade;
713 727

  
......
1031 1045

  
1032 1046
create table daymaster (
1033 1047
  days smallint(6) not null comment '??'
1048
  , constraint daymaster_PKC primary key (days)
1034 1049
) comment '???}?X?^' ;
1035 1050

  
1036
create index day_Index1
1037
  on daymaster(days);
1038

  
1039 1051
-- ?????}?X?^
1040 1052
drop table if exists deadlinemaster cascade;
1041 1053

  
......
1074 1086
  , DepartmentString varchar(100) not null comment '??????'
1075 1087
  , ActionScheduleFlg decimal(1,0) not null comment '?s???\??\???t???O'
1076 1088
  , StaffAssignFlg decimal(1,0) not null comment '?l???z?u?\???t???O'
1089
  , StartDate datetime not null comment '?J?n???t'
1090
  , CompDate datetime not null comment '?I?????t'
1077 1091
  , DeleteFlg decimal(1,0) not null comment '???t???O'
1078 1092
  , EntryDate datetime not null comment '?o?^???t'
1079 1093
  , UpdateDate datetime not null comment '?X?V???t'
......
1472 1486

  
1473 1487
create table monthmaster (
1474 1488
  month smallint(6) not null comment '??'
1489
  , constraint monthmaster_PKC primary key (month)
1475 1490
) comment '???}?X?^' ;
1476 1491

  
1477
create index month_Index1
1478
  on monthmaster(month);
1479

  
1480 1492
-- ??????}?X?^
1481 1493
drop table if exists orderersmaster cascade;
1482 1494

  
......
2448 2460

  
2449 2461
create table yearmaster (
2450 2462
  years smallint(6) not null comment '?N'
2463
  , constraint yearmaster_PKC primary key (years)
2451 2464
) comment '?N?}?X?^' ;
2452

  
2453
create index year_Index1
2454
  on yearmaster(years);

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