New tables:
PASSWORDS - holds history of passwords for parties ACCESS_CONTROLS - hold page, item / role information for authorization purposes. Modified tables: ENQUIRIES - meter size removed. Replaced by foreign key to METER_SIZE_CODES. COSTS - includes AICO_CODE and DESCRIPTION for use as cost details for Additional Items. General modifications: Yes/No columns modified to VARCHAR2(3) Modules: Added mip_security.pck. Supports Authentication and Authorization (update of the original POC version) Respository: Created new directory structure to hold persistent data. Currently includes Data/Seed for base table values and Data/Demo to populate various party and relationship tables. git-svn-id: http://locode01.ad.dom/svn/WEBMIP/trunk@2838 248e525c-4dfb-0310-94bc-949c084e9493
This commit is contained in:
23
Data/Demo/InstallDemoData.cmd
Normal file
23
Data/Demo/InstallDemoData.cmd
Normal file
@@ -0,0 +1,23 @@
|
||||
@echo off
|
||||
|
||||
if "%1"=="" goto :usage
|
||||
if "%1"=="sys" goto :usage
|
||||
if "%1"=="system" goto :usage
|
||||
|
||||
sqlplus %1 @delete_demo_data
|
||||
|
||||
sqlldr %1 control=prty
|
||||
|
||||
sqlldr %1 control=parl
|
||||
|
||||
sqlldr %1 control=prel
|
||||
|
||||
sqlplus %1 @create_passwords
|
||||
|
||||
goto :done
|
||||
|
||||
:usage
|
||||
|
||||
echo usage InstallDemoData user/password@database
|
||||
|
||||
:done
|
||||
22
Data/Demo/create_passwords.sql
Normal file
22
Data/Demo/create_passwords.sql
Normal file
@@ -0,0 +1,22 @@
|
||||
DECLARE
|
||||
l_hash dbms_obfuscation_toolkit.varchar2_checksum;
|
||||
BEGIN
|
||||
FOR l_pwd IN (SELECT id
|
||||
,upper(username) || '/' || upper(username) AS str
|
||||
FROM parties
|
||||
WHERE username IS NOT NULL) LOOP
|
||||
|
||||
l_hash := dbms_obfuscation_toolkit.md5(input_string => l_pwd.str);
|
||||
|
||||
INSERT INTO passwords
|
||||
(prty_id
|
||||
,password_hash
|
||||
,created_on)
|
||||
VALUES
|
||||
(l_pwd.id
|
||||
,l_hash
|
||||
,SYSDATE);
|
||||
END LOOP;
|
||||
END;
|
||||
/
|
||||
exit
|
||||
5
Data/Demo/delete_demo_data.sql
Normal file
5
Data/Demo/delete_demo_data.sql
Normal file
@@ -0,0 +1,5 @@
|
||||
delete from party_relationships;
|
||||
delete from party_roles;
|
||||
delete from passwords;
|
||||
delete from parties;
|
||||
exit
|
||||
38
Data/Demo/parl.ctl
Normal file
38
Data/Demo/parl.ctl
Normal file
@@ -0,0 +1,38 @@
|
||||
LOAD DATA
|
||||
INFILE *
|
||||
INTO TABLE party_roles
|
||||
REPLACE
|
||||
FIELDS TERMINATED BY '|'
|
||||
(
|
||||
prty_id
|
||||
,rt_code
|
||||
,id
|
||||
,start_date
|
||||
,end_date
|
||||
,description
|
||||
)
|
||||
BEGINDATA
|
||||
200|SUPP|2001|08-NOV-07|||
|
||||
201|SUPP|2011|08-NOV-07|||
|
||||
202|SUPP|2021|08-NOV-07|||
|
||||
203|SUPP|2031|08-NOV-07|||
|
||||
204|SUPP|2041|08-NOV-07|||
|
||||
205|SUPP|2051|08-NOV-07|||
|
||||
206|SUPP|2061|08-NOV-07|||
|
||||
207|SUPP|2071|08-NOV-07|||
|
||||
208|SUPP|2081|08-NOV-07|||
|
||||
400|MIPADMIN|4001|08-NOV-07|||
|
||||
400|CS|4002|08-NOV-07|||
|
||||
400|ICU|4003|08-NOV-07|||
|
||||
401|MIPADMIN|4011|08-NOV-07|||
|
||||
401|CS|4012|08-NOV-07|||
|
||||
401|ICU|4013|08-NOV-07|||
|
||||
402|MIPADMIN|4021|08-NOV-07|||
|
||||
403|MIPADMIN|4031|08-NOV-07|||
|
||||
404|AGENT|4041|08-NOV-07|||
|
||||
404|SUPPADMIN|4042|08-NOV-07|||
|
||||
405|AGENT|4051|08-NOV-07|||
|
||||
405|SUPPADMIN|4052|08-NOV-07|||
|
||||
406|AGENT|4061|08-NOV-07|||
|
||||
407|AGENT|4071|08-NOV-07|||
|
||||
408|AGENT|4081|08-NOV-07|||
|
||||
44
Data/Demo/prel.ctl
Normal file
44
Data/Demo/prel.ctl
Normal file
@@ -0,0 +1,44 @@
|
||||
LOAD DATA
|
||||
INFILE *
|
||||
INTO TABLE party_relationships
|
||||
REPLACE
|
||||
FIELDS TERMINATED BY '|'
|
||||
(
|
||||
from_parl_id
|
||||
,to_parl_id
|
||||
,from_parl_prty_id
|
||||
,to_parl_prty_id
|
||||
,from_parl_rt_code
|
||||
,to_parl_rt_code
|
||||
,start_date
|
||||
,from_prtp_rt_code
|
||||
,to_prtp_rt_code
|
||||
)
|
||||
BEGINDATA
|
||||
4041|2001|404|200|AGENT|SUPP|08-NOV-07|AGENT|SUPP
|
||||
4041|2011|404|201|AGENT|SUPP|08-NOV-07|AGENT|SUPP
|
||||
4041|2021|404|202|AGENT|SUPP|08-NOV-07|AGENT|SUPP
|
||||
4042|2001|404|200|SUPPADMIN|SUPP|08-NOV-07|SUPPADMIN|SUPP
|
||||
4042|2011|404|201|SUPPADMIN|SUPP|08-NOV-07|SUPPADMIN|SUPP
|
||||
4042|2021|404|202|SUPPADMIN|SUPP|08-NOV-07|SUPPADMIN|SUPP
|
||||
4042|2031|404|203|SUPPADMIN|SUPP|08-NOV-07|SUPPADMIN|SUPP
|
||||
4042|2041|404|204|SUPPADMIN|SUPP|08-NOV-07|SUPPADMIN|SUPP
|
||||
4042|2051|404|205|SUPPADMIN|SUPP|08-NOV-07|SUPPADMIN|SUPP
|
||||
4051|2001|405|200|AGENT|SUPP|08-NOV-07|AGENT|SUPP
|
||||
4051|2011|405|201|AGENT|SUPP|08-NOV-07|AGENT|SUPP
|
||||
4051|2021|405|202|AGENT|SUPP|08-NOV-07|AGENT|SUPP
|
||||
4052|2031|405|203|SUPPADMIN|SUPP|08-NOV-07|SUPPADMIN|SUPP
|
||||
4052|2041|405|204|SUPPADMIN|SUPP|08-NOV-07|SUPPADMIN|SUPP
|
||||
4052|2051|405|205|SUPPADMIN|SUPP|08-NOV-07|SUPPADMIN|SUPP
|
||||
4052|2061|405|206|SUPPADMIN|SUPP|08-NOV-07|SUPPADMIN|SUPP
|
||||
4052|2071|405|207|SUPPADMIN|SUPP|08-NOV-07|SUPPADMIN|SUPP
|
||||
4052|2081|405|208|SUPPADMIN|SUPP|08-NOV-07|SUPPADMIN|SUPP
|
||||
4061|2031|406|203|AGENT|SUPP|08-NOV-07|AGENT|SUPP
|
||||
4061|2041|406|204|AGENT|SUPP|08-NOV-07|AGENT|SUPP
|
||||
4061|2051|406|205|AGENT|SUPP|08-NOV-07|AGENT|SUPP
|
||||
4071|2031|407|203|AGENT|SUPP|08-NOV-07|AGENT|SUPP
|
||||
4071|2041|407|204|AGENT|SUPP|08-NOV-07|AGENT|SUPP
|
||||
4071|2051|407|205|AGENT|SUPP|08-NOV-07|AGENT|SUPP
|
||||
4081|2061|408|206|AGENT|SUPP|08-NOV-07|AGENT|SUPP
|
||||
4081|2071|408|207|AGENT|SUPP|08-NOV-07|AGENT|SUPP
|
||||
4081|2081|408|208|AGENT|SUPP|08-NOV-07|AGENT|SUPP
|
||||
59
Data/Demo/prty.ctl
Normal file
59
Data/Demo/prty.ctl
Normal file
@@ -0,0 +1,59 @@
|
||||
LOAD DATA
|
||||
INFILE *
|
||||
INTO TABLE parties
|
||||
REPLACE
|
||||
FIELDS TERMINATED BY '|'
|
||||
(
|
||||
manu_ref
|
||||
,created_by
|
||||
,shortcode
|
||||
,name
|
||||
,description
|
||||
,created_on
|
||||
,updated_on
|
||||
,updated_by
|
||||
,mktp_ref
|
||||
,lt_7b_contract_ref
|
||||
,gt_7b_contract_ref
|
||||
,adversarial_contract_ref
|
||||
,username
|
||||
,status
|
||||
,first_name
|
||||
,last_name
|
||||
,personal_title
|
||||
,comments
|
||||
,id
|
||||
,prty_type
|
||||
)
|
||||
BEGINDATA
|
||||
ACT|hardya||ACTARIS||08-NOV-07||||||||||||Manufactures meters|100|MANU
|
||||
DRE|hardya||DRESSER||08-NOV-07||||||||||||Manufactures meters|101|MANU
|
||||
QUI|hardya||QUINSHIELD||08-NOV-07||||||||||||Manufactures meters|102|MANU
|
||||
|hardya|NS1|Northern Supplies||08-NOV-07|||NSUPP|LT7 Contract|GT7 Contract|Adversarial Contract||||||Supplier of gas to the north of the UK|200|MKTP
|
||||
|hardya|NS2|Extreme Northern Supplies||08-NOV-07|||ENSUPP|LT7 Contract|GT7 Contract|Adversarial Contract||||||Supplier of gas to the extreme north of the UK|201|MKTP
|
||||
|hardya|WS1|Welsh Supplies||08-NOV-07|||WSUPP|LT7 Contract|GT7 Contract|Adversarial Contract||||||Supplier of gas to Wales|202|MKTP
|
||||
|hardya|WS2|Welsh Supplies||08-NOV-07|||W2SUPP|LT7 Contract|GT7 Contract|Adversarial Contract||||||Supplier of gas to Wales|203|MKTP
|
||||
|hardya|CE1|Central Gas Supplies||08-NOV-07|||CGSUPP|LT7 Contract|GT7 Contract|Adversarial Contract||||||Supplier of gas to the Central region|204|MKTP
|
||||
|hardya|CE2|Centre de Gas Supplies||08-NOV-07|||CDSUPP|LT7 Contract|GT7 Contract|Adversarial Contract||||||Supplier of gas to the Central region|205|MKTP
|
||||
|hardya|LON|London Supplies||08-NOV-07|||LONSUPP|LT7 Contract|GT7 Contract|Adversarial Contract||||||Supplier of gas to London|206|MKTP
|
||||
|hardya|KER|Kernow Supplies||08-NOV-07|||KERSUPP|LT7 Contract|GT7 Contract|Adversarial Contract||||||Supplier of gas to Cornwall|207|MKTP
|
||||
|hardya|BM|Bootiful Gas Supplies||08-NOV-07|||BGSUPP|LT7 Contract|GT7 Contract|Adversarial Contract||||||Supplier of gas to the East|208|MKTP
|
||||
|hardya||National Grid||08-NOV-07||||||||||||Internal organization|300|IO
|
||||
|hardya||National Grid Metering||08-NOV-07||||||||||||Internal organization|301|IO
|
||||
|hardya||Customer Services||08-NOV-07||||||||||||Internal organization|302|IO
|
||||
|hardya||Quotations||08-NOV-07||||||||||||Internal organization|303|IO
|
||||
|hardya||||08-NOV-07|||||||hardya|OPEN|Andrew|Hardy|Mr|User|400|PERS
|
||||
|hardya||||08-NOV-07|||||||priestj|OPEN|Jamie|Priest|Mr|User|401|PERS
|
||||
|hardya||||08-NOV-07|||||||kanagasabapathy|OPEN|Dharshani|Kanagasabapathy||User|402|PERS
|
||||
|hardya||||08-NOV-07|||||||mullend|OPEN|Matt|Mullen||User|403|PERS
|
||||
|hardya||||08-NOV-07|||||||agent1|OPEN|Fred|Smith||User|404|PERS
|
||||
|hardya||||08-NOV-07|||||||agent2|OPEN|Joe|Bloggs||User|405|PERS
|
||||
|hardya||||08-NOV-07|||||||agent3|OPEN|Peter|Piper||User|406|PERS
|
||||
|hardya||||08-NOV-07|||||||agent4|OPEN|Nigel|Normal||User|407|PERS
|
||||
|hardya||||08-NOV-07|||||||agent5|OPEN|Norah|Batty||User|408|PERS
|
||||
|hardya||||08-NOV-07|||||||cs1|OPEN|Henrietta|Helpful||User|409|PERS
|
||||
|hardya||||08-NOV-07|||||||cs2|OPEN|Tommy|Atkins||User|410|PERS
|
||||
|hardya||||08-NOV-07|||||||cs3|OPEN|Tracy|Beaker||User|411|PERS
|
||||
|hardya||||08-NOV-07|||||||ic1|OPEN|Gareth|Thomas||User|412|PERS
|
||||
|hardya||||08-NOV-07|||||||ic2|OPEN|Bhavesh|Singh||User|413|PERS
|
||||
|hardya||||08-NOV-07|||||||ic3|OPEN|Dave|Smith||User|414|PERS
|
||||
69
Data/Seed/InstallSeed.cmd
Normal file
69
Data/Seed/InstallSeed.cmd
Normal file
@@ -0,0 +1,69 @@
|
||||
@echo off
|
||||
|
||||
if "%1"=="" goto :usage
|
||||
if "%1"=="sys" goto :usage
|
||||
if "%1"=="system" goto :usage
|
||||
|
||||
sqlplus %1 @disable_constraints
|
||||
|
||||
sqlplus %1 @delete_tables
|
||||
|
||||
sqlldr %1 control=alty
|
||||
|
||||
sqlldr %1 control=caco
|
||||
|
||||
sqlldr %1 control=comt
|
||||
|
||||
sqlldr %1 control=enrt
|
||||
|
||||
sqlldr %1 control=enst
|
||||
|
||||
sqlldr %1 control=enty
|
||||
|
||||
sqlldr %1 control=fity
|
||||
|
||||
sqlldr %1 control=hoty
|
||||
|
||||
sqlldr %1 control=mety
|
||||
|
||||
sqlldr %1 control=part
|
||||
|
||||
sqlldr %1 control=pcmrt
|
||||
|
||||
sqlldr %1 control=prt
|
||||
|
||||
sqlldr %1 control=prtp
|
||||
|
||||
sqlldr %1 control=qurt
|
||||
|
||||
sqlldr %1 control=qust
|
||||
|
||||
sqlldr %1 control=rety
|
||||
|
||||
sqlldr %1 control=rvty
|
||||
|
||||
sqlldr %1 control=svcpt
|
||||
|
||||
sqlldr %1 control=svcp
|
||||
|
||||
sqlldr %1 control=slty
|
||||
|
||||
sqlldr %1 control=cnty
|
||||
|
||||
sqlldr %1 control=cnor
|
||||
|
||||
sqlldr %1 control=slva
|
||||
|
||||
sqlldr %1 control=caca
|
||||
|
||||
sqlldr %1 control=mesc
|
||||
|
||||
sqlplus %1 @enable_constraints
|
||||
|
||||
goto :done
|
||||
|
||||
:usage
|
||||
|
||||
echo usage InstallSeed user/password@database
|
||||
|
||||
:done
|
||||
23
Data/Seed/MESC.ctl
Normal file
23
Data/Seed/MESC.ctl
Normal file
@@ -0,0 +1,23 @@
|
||||
LOAD DATA
|
||||
INFILE *
|
||||
INTO TABLE meter_size_codes
|
||||
REPLACE
|
||||
FIELDS TERMINATED BY '|'
|
||||
(
|
||||
code
|
||||
,qmax
|
||||
,valid_for_new_meter
|
||||
,valid_for_existing_meter
|
||||
)
|
||||
BEGINDATA
|
||||
U16|12.8|YES|YES
|
||||
U25|20|YES|YES
|
||||
U40|32|YES|YES
|
||||
U65|52|YES|YES
|
||||
U100|80|YES|YES
|
||||
U160|128|YES|YES
|
||||
Rotary/Turbine 2"|999|NO|YES
|
||||
Rotary/Turbine 3"|9999|NO|YES
|
||||
Rotary/Turbine 4"|99999|NO|YES
|
||||
Rotary/Turbine 6"|999999|NO|YES
|
||||
Other|9999999|NO|YES
|
||||
14
Data/Seed/SVCPT.ctl
Normal file
14
Data/Seed/SVCPT.ctl
Normal file
@@ -0,0 +1,14 @@
|
||||
LOAD DATA
|
||||
INFILE *
|
||||
INTO TABLE service_pressure_types
|
||||
REPLACE
|
||||
FIELDS TERMINATED BY '|'
|
||||
(
|
||||
code
|
||||
,description
|
||||
)
|
||||
BEGINDATA
|
||||
LP|Low Pressure
|
||||
MP|Medium Pressure
|
||||
HP|High Pressure
|
||||
IP|Intermediate Pressure
|
||||
45
Data/Seed/alty.ctl
Normal file
45
Data/Seed/alty.ctl
Normal file
@@ -0,0 +1,45 @@
|
||||
LOAD DATA
|
||||
INFILE *
|
||||
INTO TABLE asset_location_types
|
||||
REPLACE
|
||||
FIELDS TERMINATED BY '|'
|
||||
(
|
||||
code
|
||||
,description
|
||||
)
|
||||
BEGINDATA
|
||||
00|Unknown
|
||||
01|Cellar
|
||||
02|Under Stairs
|
||||
03|Hall
|
||||
04|Kitchen
|
||||
05|Bathroom
|
||||
06|Garage
|
||||
07|Canteen
|
||||
08|Cloakroom
|
||||
09|Cupboard
|
||||
10|Domestic Science
|
||||
11|Front Door
|
||||
12|Hall Cupboard
|
||||
13|Kitchen Cupboard
|
||||
14|Kitchen under sink
|
||||
15|Landing
|
||||
16|Office
|
||||
17|Office Cupboard
|
||||
18|Outside WC
|
||||
19|Pantry
|
||||
20|Porch
|
||||
21|Public Bar
|
||||
22|Rear of Shop
|
||||
23|Saloon Bar
|
||||
24|Shed
|
||||
25|Shop Front
|
||||
26|Shop Window
|
||||
27|Staff Room
|
||||
28|Store Room
|
||||
29|Toilet
|
||||
30|Under Counter
|
||||
31|Waiting Room
|
||||
32|Meter box Outside
|
||||
98|Other
|
||||
99|Outside
|
||||
30
Data/Seed/caca.ctl
Normal file
30
Data/Seed/caca.ctl
Normal file
@@ -0,0 +1,30 @@
|
||||
LOAD DATA
|
||||
INFILE *
|
||||
INTO TABLE care_categories
|
||||
REPLACE
|
||||
FIELDS TERMINATED BY '|'
|
||||
(
|
||||
code
|
||||
,description
|
||||
)
|
||||
BEGINDATA
|
||||
03|SEUC Unclassified
|
||||
04|Aged 60+
|
||||
05|Blind
|
||||
06|Braille User
|
||||
07|Poor Sight
|
||||
08|Deaf
|
||||
09|Poor Hearing
|
||||
10|Poor Speech
|
||||
11|Poor Sense of Smell
|
||||
12|Arthritic Hands
|
||||
13|Arthritic All
|
||||
14|Poor Walking
|
||||
15|Wheelchair
|
||||
16|Bedridden
|
||||
17|Mental Handicap
|
||||
18|Confused
|
||||
19|Serious Illness
|
||||
20|Other
|
||||
21|Heart Condition
|
||||
22|Breathing Difficulty
|
||||
30
Data/Seed/caco.ctl
Normal file
30
Data/Seed/caco.ctl
Normal file
@@ -0,0 +1,30 @@
|
||||
LOAD DATA
|
||||
INFILE *
|
||||
REPLACE
|
||||
INTO TABLE care_categories
|
||||
FIELDS TERMINATED BY ","
|
||||
(
|
||||
code
|
||||
,DESCRIPTION
|
||||
)
|
||||
BEGINDATA
|
||||
03,SEUC Unclassified
|
||||
04,Aged 60+
|
||||
05,Blind
|
||||
06,Braille User
|
||||
07,Poor Sight
|
||||
08,Deaf
|
||||
09,Poor Hearing
|
||||
10,Poor Speech
|
||||
11,Poor Sense of Smell
|
||||
12,Arthritic Hands
|
||||
13,Arthritic All
|
||||
14,Poor Walking
|
||||
15,Wheelchair
|
||||
16,Bedridden
|
||||
17,Mental Handicap
|
||||
18,Confused
|
||||
19,Serious Illness
|
||||
20,Other
|
||||
21,Heart Condition
|
||||
22,Breathing Difficulty
|
||||
16
Data/Seed/cnor.ctl
Normal file
16
Data/Seed/cnor.ctl
Normal file
@@ -0,0 +1,16 @@
|
||||
LOAD DATA
|
||||
INFILE *
|
||||
INTO TABLE connection_orientations
|
||||
REPLACE
|
||||
FIELDS TERMINATED BY '|'
|
||||
(
|
||||
description
|
||||
,id
|
||||
)
|
||||
BEGINDATA
|
||||
Vertical Up|1
|
||||
Vertical Down|3
|
||||
Horizontal Left|2
|
||||
Horizontal Right|4
|
||||
Horizontal Back|5
|
||||
Horizontal Front|6
|
||||
13
Data/Seed/cnty.ctl
Normal file
13
Data/Seed/cnty.ctl
Normal file
@@ -0,0 +1,13 @@
|
||||
LOAD DATA
|
||||
INFILE *
|
||||
INTO TABLE connection_types
|
||||
REPLACE
|
||||
FIELDS TERMINATED BY '|'
|
||||
(
|
||||
description
|
||||
,code
|
||||
)
|
||||
BEGINDATA
|
||||
(mm) BSPT|MMBSTP
|
||||
(mm) PN16|MMPN16
|
||||
INCH BS 746|INCHBS
|
||||
14
Data/Seed/comt.ctl
Normal file
14
Data/Seed/comt.ctl
Normal file
@@ -0,0 +1,14 @@
|
||||
LOAD DATA
|
||||
INFILE *
|
||||
INTO TABLE contact_mechanism_types
|
||||
REPLACE
|
||||
FIELDS TERMINATED BY '|'
|
||||
(
|
||||
code
|
||||
,description
|
||||
)
|
||||
BEGINDATA
|
||||
FAX|Fax
|
||||
PHONE|Telephone
|
||||
MOBILE|Mobile
|
||||
EMAIL|Email
|
||||
14
Data/Seed/delete_tables.sql
Normal file
14
Data/Seed/delete_tables.sql
Normal file
@@ -0,0 +1,14 @@
|
||||
set wrap off
|
||||
set linesize 100
|
||||
set feedback off
|
||||
set pagesize 0
|
||||
set verify off
|
||||
set TERMOUT off
|
||||
|
||||
SPOOL ydeletey.sql
|
||||
SELECT 'delete from '||table_name||';' FROM user_tables
|
||||
|
||||
spool off
|
||||
set termout on
|
||||
@ydeletey.sql
|
||||
exit
|
||||
21
Data/Seed/disable_constraints.sql
Normal file
21
Data/Seed/disable_constraints.sql
Normal file
@@ -0,0 +1,21 @@
|
||||
set wrap off
|
||||
set linesize 100
|
||||
set feedback off
|
||||
set pagesize 0
|
||||
set verify off
|
||||
set TERMOUT off
|
||||
|
||||
SPOOL ytmpy.sql
|
||||
SELECT cmd FROM (
|
||||
SELECT 1 AS ord, 'alter table '||table_name||' disable constraint '||CONSTRAINT_name||';' AS cmd FROM user_constraints
|
||||
WHERE constraint_type = 'R'
|
||||
UNION
|
||||
SELECT 2 , 'alter table '||table_name||' disable constraint '||CONSTRAINT_name||';'FROM user_constraints
|
||||
WHERE constraint_type = 'P'
|
||||
)
|
||||
ORDER BY ord;
|
||||
|
||||
spool off
|
||||
set termout on
|
||||
@ytmpy.sql
|
||||
exit
|
||||
21
Data/Seed/enable_constraints.sql
Normal file
21
Data/Seed/enable_constraints.sql
Normal file
@@ -0,0 +1,21 @@
|
||||
set wrap off
|
||||
set linesize 100
|
||||
set feedback off
|
||||
set pagesize 0
|
||||
set verify off
|
||||
set TERMOUT off
|
||||
|
||||
SPOOL ytmpy.sql
|
||||
SELECT cmd FROM (
|
||||
SELECT 2 AS ord, 'alter table '||table_name||' enable constraint '||CONSTRAINT_name||';' AS cmd FROM user_constraints
|
||||
WHERE constraint_type = 'R'
|
||||
UNION
|
||||
SELECT 1 , 'alter table '||table_name||' enable constraint '||CONSTRAINT_name||';'FROM user_constraints
|
||||
WHERE constraint_type = 'P'
|
||||
)
|
||||
ORDER BY ord;
|
||||
|
||||
spool off
|
||||
set termout on
|
||||
@ytmpy.sql
|
||||
exit
|
||||
14
Data/Seed/enrt.ctl
Normal file
14
Data/Seed/enrt.ctl
Normal file
@@ -0,0 +1,14 @@
|
||||
LOAD DATA
|
||||
INFILE *
|
||||
INTO TABLE role_types
|
||||
APPEND
|
||||
FIELDS TERMINATED BY '|'
|
||||
(
|
||||
rt_type
|
||||
,code
|
||||
,description
|
||||
)
|
||||
BEGINDATA
|
||||
ENRT|CREATOR|Created Enquiry
|
||||
ENRT|UPDATER|Updated Enquiry
|
||||
ENRT|RFQ|Request For Quotation
|
||||
13
Data/Seed/enst.ctl
Normal file
13
Data/Seed/enst.ctl
Normal file
@@ -0,0 +1,13 @@
|
||||
LOAD DATA
|
||||
INFILE *
|
||||
INTO TABLE enquiry_status_types
|
||||
REPLACE
|
||||
FIELDS TERMINATED BY '|'
|
||||
(
|
||||
code
|
||||
,description
|
||||
)
|
||||
BEGINDATA
|
||||
INP|In Progress
|
||||
SUBMITTED|Submitted For Quotation
|
||||
QUOTED|Quoted For
|
||||
19
Data/Seed/enty.ctl
Normal file
19
Data/Seed/enty.ctl
Normal file
@@ -0,0 +1,19 @@
|
||||
LOAD DATA
|
||||
INFILE *
|
||||
INTO TABLE enquiry_types
|
||||
REPLACE
|
||||
FIELDS TERMINATED BY '|'
|
||||
(
|
||||
code
|
||||
,description
|
||||
)
|
||||
BEGINDATA
|
||||
INSTALL|Installation of new non-Standard meter
|
||||
STD INSTALL|Installation of Standard meter
|
||||
OFMAT|Request for OFGEM Meter Accuracy Test (OFMAT)
|
||||
EXCHANGE|Exchange of meter
|
||||
REMOVE|Removal of non-Standard meter
|
||||
STD REMOVE|Removal of a Standard meter
|
||||
RELOCATE|Relocation of meters
|
||||
ADDON|Purchase of standard add-ons for an existing meter module
|
||||
OTHER|Other
|
||||
16
Data/Seed/fity.ctl
Normal file
16
Data/Seed/fity.ctl
Normal file
@@ -0,0 +1,16 @@
|
||||
LOAD DATA
|
||||
INFILE *
|
||||
INTO TABLE filter_types
|
||||
REPLACE
|
||||
FIELDS TERMINATED BY '|'
|
||||
(
|
||||
code
|
||||
,description
|
||||
)
|
||||
BEGINDATA
|
||||
LLS|Low Loss Strainer
|
||||
FIU|Fixed in Union
|
||||
YT|Y Type
|
||||
IL|InLine
|
||||
AP|Angle Pattern
|
||||
G|Gauze
|
||||
13
Data/Seed/hoty.ctl
Normal file
13
Data/Seed/hoty.ctl
Normal file
@@ -0,0 +1,13 @@
|
||||
LOAD DATA
|
||||
INFILE *
|
||||
INTO TABLE housing_types
|
||||
REPLACE
|
||||
FIELDS TERMINATED BY '|'
|
||||
(
|
||||
code
|
||||
,description
|
||||
)
|
||||
BEGINDATA
|
||||
LO|Lift Off
|
||||
WI|Walk In
|
||||
WT|Walk Through
|
||||
15
Data/Seed/mety.ctl
Normal file
15
Data/Seed/mety.ctl
Normal file
@@ -0,0 +1,15 @@
|
||||
LOAD DATA
|
||||
INFILE *
|
||||
INTO TABLE meter_types
|
||||
REPLACE
|
||||
FIELDS TERMINATED BY '|'
|
||||
(
|
||||
code
|
||||
,description
|
||||
)
|
||||
BEGINDATA
|
||||
ROTA|Rotary
|
||||
TURB|Turbine
|
||||
ORIF|Orifice
|
||||
ULTRA|Ultrasonic flow
|
||||
CORI|Coriolis
|
||||
13
Data/Seed/part.ctl
Normal file
13
Data/Seed/part.ctl
Normal file
@@ -0,0 +1,13 @@
|
||||
LOAD DATA
|
||||
INFILE *
|
||||
INTO TABLE role_types
|
||||
REPLACE
|
||||
FIELDS TERMINATED BY '|'
|
||||
(
|
||||
rt_type
|
||||
,code
|
||||
,description
|
||||
)
|
||||
BEGINDATA
|
||||
PART|OFFICE|Office
|
||||
PART|HOME|Home
|
||||
23
Data/Seed/pcmrt.ctl
Normal file
23
Data/Seed/pcmrt.ctl
Normal file
@@ -0,0 +1,23 @@
|
||||
LOAD DATA
|
||||
INFILE *
|
||||
INTO TABLE role_types
|
||||
APPEND
|
||||
FIELDS TERMINATED BY '|'
|
||||
(
|
||||
rt_type
|
||||
,code
|
||||
,description
|
||||
)
|
||||
BEGINDATA
|
||||
PCMRT|BILLADDR|Billing inquiries
|
||||
PCMRT|BILLPHONE|Billing inquiries number
|
||||
PCMRT|MAINOFFADDR|Main office address
|
||||
PCMRT|MAINOFFPHONE|Main office number
|
||||
PCMRT|MAINOFFFAX|Main office fax
|
||||
PCMRT|SECOFFPHONE|Secondary office number
|
||||
PCMRT|SECOFFFAX|Secondary office fax
|
||||
PCMRT|MAINHOMEADDR|Main home address
|
||||
PCMRT|MAINHOMEPHONE|Main home number
|
||||
PCMRT|MAINHOMEFAX|Main home fax
|
||||
PCMRT|SECHOMEPHONE|Secondary home number
|
||||
PCMRT|SECHOMEFAX|Secondary home fax
|
||||
20
Data/Seed/prt.ctl
Normal file
20
Data/Seed/prt.ctl
Normal file
@@ -0,0 +1,20 @@
|
||||
LOAD DATA
|
||||
INFILE *
|
||||
INTO TABLE role_types
|
||||
APPEND
|
||||
FIELDS TERMINATED BY '|'
|
||||
(
|
||||
rt_type
|
||||
,code
|
||||
,description
|
||||
)
|
||||
BEGINDATA
|
||||
PRT|AGENT|Agent
|
||||
PRT|SUPP|Service supplier
|
||||
PRT|SUPPADMIN|User administrator
|
||||
PRT|MIPADMIN|System Administrator
|
||||
PRT|ICU|Quotation operative
|
||||
PRT|CS|Customer Service operative
|
||||
PRT|INORG|Internal organization
|
||||
PRT|EXTORG|External organization
|
||||
PRT|MEMBER|Member of a group
|
||||
19
Data/Seed/prtp.ctl
Normal file
19
Data/Seed/prtp.ctl
Normal file
@@ -0,0 +1,19 @@
|
||||
LOAD DATA
|
||||
INFILE *
|
||||
INTO TABLE party_relationship_types
|
||||
REPLACE
|
||||
FIELDS TERMINATED BY '|'
|
||||
(
|
||||
to_rt_code
|
||||
,from_rt_code
|
||||
,description
|
||||
)
|
||||
BEGINDATA
|
||||
SUPP|AGENT|Agent for Service Supplier
|
||||
SUPP|SUPPADMIN|Administrator for Supplier
|
||||
AGENT|SUPPADMIN|Administrator of agent
|
||||
SUPPADMIN|AGENT|Administered by
|
||||
INORG|MEMBER|Member of internal organization
|
||||
EXTORG|MEMBER|Member of external organization
|
||||
INORG|ICU|Handles quotations for internal organization
|
||||
INORG|CS|Handles customer enquiries for internal organization
|
||||
17
Data/Seed/qurt.ctl
Normal file
17
Data/Seed/qurt.ctl
Normal file
@@ -0,0 +1,17 @@
|
||||
LOAD DATA
|
||||
INFILE *
|
||||
INTO TABLE role_types
|
||||
APPEND
|
||||
FIELDS TERMINATED BY '|'
|
||||
(
|
||||
rt_type
|
||||
,code
|
||||
,description
|
||||
)
|
||||
BEGINDATA
|
||||
QURT|Q RFQ|Submitted request for quotation
|
||||
QURT|Q OWN|Owner of quotation
|
||||
QURT|Q ACC|Owner of accepted quotation
|
||||
QURT|Q REJ|Owner of rejected quotation
|
||||
QURT|Q SUBACC|Submitted acceptance of quotation
|
||||
QURT|Q SUBREJ|Submitted rejection of quotation
|
||||
16
Data/Seed/qust.ctl
Normal file
16
Data/Seed/qust.ctl
Normal file
@@ -0,0 +1,16 @@
|
||||
LOAD DATA
|
||||
INFILE *
|
||||
REPLACE
|
||||
INTO TABLE quote_statuses
|
||||
FIELDS TERMINATED BY ","
|
||||
(
|
||||
CODE
|
||||
,DESCRIPTION
|
||||
)
|
||||
BEGINDATA
|
||||
INP,In Progress
|
||||
AV,Available
|
||||
ACC,Accepted
|
||||
USERREJ,Rejected by user
|
||||
ACCREJ,Rejected because associated quote accepted
|
||||
LAPSE,Lapsed
|
||||
22
Data/Seed/rety.ctl
Normal file
22
Data/Seed/rety.ctl
Normal file
@@ -0,0 +1,22 @@
|
||||
LOAD DATA
|
||||
INFILE *
|
||||
INTO TABLE regulator_types
|
||||
REPLACE
|
||||
FIELDS TERMINATED BY '|'
|
||||
(
|
||||
code
|
||||
,description
|
||||
)
|
||||
BEGINDATA
|
||||
J90A|J90 Angled
|
||||
DF270R|Donkin Fig 270R
|
||||
DF280/309|Donkin Fig 280/309
|
||||
DF280|Donkin Fig 280
|
||||
RBI 2111|RBI 2111
|
||||
RBI 2011|RBI 2011
|
||||
RBI 2611|RBI 2611
|
||||
RBI 3211|RBI 3211
|
||||
RBE 1711|RBE 1711
|
||||
RBE 4011|RBE 4011
|
||||
SPERYN G1000|SPERYN G1000
|
||||
J48|J48
|
||||
13
Data/Seed/rvty.ctl
Normal file
13
Data/Seed/rvty.ctl
Normal file
@@ -0,0 +1,13 @@
|
||||
LOAD DATA
|
||||
INFILE *
|
||||
INTO TABLE relief_valve_types
|
||||
REPLACE
|
||||
FIELDS TERMINATED BY '|'
|
||||
(
|
||||
code
|
||||
,description
|
||||
)
|
||||
BEGINDATA
|
||||
INTEGRAL|Integral
|
||||
10L|10L
|
||||
VS811|VS811
|
||||
12
Data/Seed/slty.ctl
Normal file
12
Data/Seed/slty.ctl
Normal file
@@ -0,0 +1,12 @@
|
||||
LOAD DATA
|
||||
INFILE *
|
||||
REPLACE
|
||||
INTO TABLE slamshut_types
|
||||
FIELDS TERMINATED BY ","
|
||||
(
|
||||
CODE
|
||||
,DESCRIPTION
|
||||
)
|
||||
BEGINDATA
|
||||
INTEGRAL,Integral
|
||||
DF305,Donkin Fig 305
|
||||
12
Data/Seed/slva.ctl
Normal file
12
Data/Seed/slva.ctl
Normal file
@@ -0,0 +1,12 @@
|
||||
LOAD DATA
|
||||
INFILE *
|
||||
INTO TABLE slamshut_types
|
||||
REPLACE
|
||||
FIELDS TERMINATED BY '|'
|
||||
(
|
||||
code
|
||||
,description
|
||||
)
|
||||
BEGINDATA
|
||||
INTEGRAL|Integral
|
||||
DF305|Donkin Fig 305
|
||||
17
Data/Seed/svcp.ctl
Normal file
17
Data/Seed/svcp.ctl
Normal file
@@ -0,0 +1,17 @@
|
||||
LOAD DATA
|
||||
INFILE *
|
||||
INTO TABLE service_pressures
|
||||
REPLACE
|
||||
FIELDS TERMINATED BY '|'
|
||||
(
|
||||
code
|
||||
,description
|
||||
,svcpt_code
|
||||
)
|
||||
BEGINDATA
|
||||
LP|LP|LP
|
||||
MP35|MP35|MP
|
||||
MP65|MP65|MP
|
||||
MP180|MP180|MP
|
||||
MP270|MP270|MP
|
||||
IP|IP|IP
|
||||
Reference in New Issue
Block a user