プロジェクト

全般

プロフィール

リビジョン 353

堀内6年以上前に追加

工事担当変更履歴データ:変更
予算書集計コードマスタ:新規作成
工事種別マスタ:変更
残件一覧アップロード

差分を表示:

branches/ddl/20180507_SQL.txt
1
-- ?H???S????X?????f?[?^
2
drop table if exists constrchgcharge cascade;
3
drop table if exists ChgConstrCharge cascade;
4

  
5
create table ChgConstrCharge (
6
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
7
  , Division decimal(1,0) not null comment '????'
8
  , SeqNo smallint(5) unsigned not null comment '?A??'
9
  , DepartmentCode decimal(5,0) unsigned not null comment '?????R?[?h'
10
  , PersonCode decimal(8,0) not null comment '?S????R?[?h'
11
  , StartDate date comment '?S???J?n?N????'
12
  , CompDate date comment '?S???I???N????'
13
  , EntryDate datetime not null comment '?o?^???t'
14
  , UpdateDate datetime not null comment '?X?V???t'
15
  , constraint ChgConstrCharge_PKC primary key (ConstructionCode,Division,SeqNo)
16
) comment '?H???S????X?????f?[?^' ;
17

  
18
-- ?\?Z???W?v?R?[?h?}?X?^
19
drop table if exists BudgetSumCode cascade; 
20

  
21
CREATE TABLE BudgetSumCode( 
22
  BlockCode DECIMAL (2, 0) UNSIGNED NOT NULL COMMENT '?u???b?N???'
23
  , GroupCode DECIMAL (2, 0) UNSIGNED NOT NULL COMMENT '?O???[?v???'
24
  , ComponentCode DECIMAL (5, 0) UNSIGNED NOT NULL COMMENT '?\???L?['
25
  , ItemCode DECIMAL (5, 0) UNSIGNED NOT NULL COMMENT '?H??L?['
26
  , ElementsName VARCHAR (100) NOT NULL COMMENT '?v?f????'
27
  , EntryDate DATETIME NOT NULL COMMENT '?o?^???t'
28
  , UpdateDate DATETIME NOT NULL COMMENT '?X?V???t'
29
  , CONSTRAINT BudgetSumCode_PKC PRIMARY KEY (BlockCode, GroupCode, ComponentCode, ItemCode)
30
) COMMENT '?\?Z???W?v?R?[?h?}?X?^'; 
31

  
32
-- ?H?????}?X?^
33
DROP TABLE IF EXISTS constructiontypemaster_OLD; 
34
CREATE TABLE constructiontypemaster_OLD As 
35
Select
36
  * 
37
from
38
  constructiontypemaster; 
39

  
40
drop table if exists constructiontypemaster cascade;
41

  
42
create table constructiontypemaster (
43
  TypeCode decimal(5,0) unsigned not null comment '?H?????R?[?h'
44
  , DisplayOrder decimal(5,0) unsigned not null comment '?\????'
45
  , NameString varchar(100) not null comment '????'
46
  , PublicFlg decimal(1,0) not null comment '?????t???O'
47
  , RepairFlg decimal(1,0) not null comment '?V?z?E???C?t???O'
48
  , SecRank decimal(1,0) not null comment '?????????N'
49
  , ExpensesLink decimal(1,0) not null comment '?o??g?p??'
50
  , DeleteFlg decimal(1,0) not null comment '???t???O'
51
  , EntryDate datetime not null comment '?o?^???t'
52
  , UpdateDate datetime not null comment '?X?V???t'
53
  , constraint constructiontypemaster_PKC primary key (TypeCode)
54
) comment '?H?????}?X?^' ;
55

  
56
Insert 
57
INTO constructiontypemaster 
58
Select
59
  TypeCode
60
  , DisplayOrder
61
  , NameString
62
  , PublicFlg
63
  , 0
64
  , SecRank
65
  , ExpensesLink
66
  , DeleteFlg
67
  , EntryDate
68
  , NOW()
69
from
70
  constructiontypemaster_OLD; 
branches/ddl/ProcessManagement.sql
1 1
-- Project Name : noname
2
-- Date/Time    : 2018/04/12 9:06:32
2
-- Date/Time    : 2018/05/25 8:19:35
3 3
-- Author       : Horiuchi
4 4
-- RDBMS Type   : MySQL
5 5
-- Application  : A5:SQL Mk-2
......
308 308
  , constraint bk_estimatedatadetail_PKC primary key (SaveDate,ConstructionCode,PageCount,LineCount)
309 309
) comment '??Z????f?[?^????y???p?z' ;
310 310

  
311
-- ?\?Z???W?v?R?[?h?}?X?^
312
drop table if exists budgetsumcode cascade;
313

  
314
create table budgetsumcode (
315
  BlockCode decimal(2,0) unsigned not null comment '?u???b?N???'
316
  , GroupCode decimal(2,0) unsigned not null comment '?O???[?v???'
317
  , ComponentCode decimal(5,0) unsigned not null comment '?\???L?['
318
  , ItemCode decimal(5,0) unsigned not null comment '?H??L?['
319
  , ElementsName varchar(100) not null comment '?v?f????'
320
  , EntryDate datetime not null comment '?o?^???t'
321
  , UpdateDate datetime not null comment '?X?V???t'
322
  , constraint budgetsumcode_PKC primary key (BlockCode,GroupCode,ComponentCode,ItemCode)
323
) comment '?\?Z???W?v?R?[?h?}?X?^' ;
324

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

  
......
337 351
  , constraint chgchargedep_PKC primary key (PersonCode,StartDate)
338 352
) comment '?S????????????f?[?^' ;
339 353

  
354
-- ?H???S????X?????f?[?^
355
drop table if exists chgconstrcharge cascade;
356

  
357
create table chgconstrcharge (
358
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
359
  , Division decimal(1,0) not null comment '????'
360
  , SeqNo smallint(5) unsigned not null comment '?A??'
361
  , DepartmentCode decimal(5,0) unsigned not null comment '?????R?[?h'
362
  , PersonCode decimal(8,0) not null comment '?S????R?[?h'
363
  , StartDate date comment '?S???J?n?N????'
364
  , CompDate date comment '?S???I???N????'
365
  , EntryDate datetime not null comment '?o?^???t'
366
  , UpdateDate datetime not null comment '?X?V???t'
367
  , constraint chgconstrcharge_PKC primary key (ConstructionCode,Division,SeqNo)
368
) comment '?H???S????X?????f?[?^' ;
369

  
340 370
-- ????????}?X?^
341 371
drop table if exists commoncostlarge cascade;
342 372

  
......
446 476
create index ComponentToTypeMaster_Index2
447 477
  on componenttotypemaster(TypeCode);
448 478

  
449
-- ?H???S???????f?[?^
450
drop table if exists constrchgcharge cascade;
451

  
452
create table constrchgcharge (
453
  ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
454
  , Division decimal(1,0) not null comment '????'
455
  , SeqNo smallint(5) unsigned not null comment '?A??'
456
  , DepartmentCode decimal(5,0) unsigned not null comment '?????R?[?h'
457
  , PersonCode decimal(8,0) not null comment '?S????R?[?h'
458
  , StartDate date comment '?S???J?n?N????'
459
  , CompDate date comment '?S???I???N????'
460
  , EntryDate datetime not null comment '?o?^???t'
461
  , UpdateDate datetime not null comment '?X?V???t'
462
  , constraint constrchgcharge_PKC primary key (ConstructionCode,Division,SeqNo)
463
) comment '?H???S???????f?[?^' ;
464

  
465 479
-- ?H???????o??f?[?^
466 480
drop table if exists constrledgerexpenses cascade;
467 481

  
......
864 878
  TypeCode decimal(5,0) unsigned not null comment '?H?????R?[?h'
865 879
  , DisplayOrder decimal(5,0) unsigned not null comment '?\????'
866 880
  , NameString varchar(100) not null comment '????'
867
  , PublicFlg decimal(1,0) not null comment '?H?????t???O'
881
  , PublicFlg decimal(1,0) not null comment '?????t???O'
882
  , RepairFlg decimal(1,0) not null comment '?V?z?E???C?t???O'
868 883
  , SecRank decimal(1,0) not null comment '?????????N'
869 884
  , ExpensesLink decimal(1,0) not null comment '?o??g?p??'
870 885
  , DeleteFlg decimal(1,0) not null comment '???t???O'

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