-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsqlcl-project-aliases.xml
More file actions
181 lines (178 loc) · 6.34 KB
/
Copy pathsqlcl-project-aliases.xml
File metadata and controls
181 lines (178 loc) · 6.34 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<aliases>
<alias name="prj_rm_ords">
<description/>
<queries>
<query minversion="8">
<sql><![CDATA[
set define off
prompt Removing fake changes in ORDS schema...
!bash -c "cd $(git rev-parse --show-toplevel) && git restore --worktree --staged -- dist/releases/ords "
]]></sql>
</query>
</queries>
</alias>
<alias name="prj_rm_logs">
<description/>
<queries>
<query minversion="8">
<sql><![CDATA[
set define off
prompt Removing Logs from the repo...
!bash -c "cd $(git rev-parse --show-toplevel) && find . -type f -name '*.log' -delete"
]]></sql>
</query>
</queries>
</alias>
<alias name="prj_exp_app">
<description/>
<queries>
<query minversion="8">
<sql><![CDATA[set define on
column app_id new_value app_id
select :app_id app_id from dual;
prompt Dropping existing export file in bash shell...
!rm -fR src/database/*/apex_apps/&APP_ID.
prompt Dropping existing export file in powershell...
!powershell -NoLogo -NoProfile -Command "Remove-Item -Recurse -Force 'src/database/*/apex_apps/f&APP_ID.'"
prompt Exporting APEX Application ID &app_id...
project export -o APEX.&APP_ID.
column cmd new_value cmd noprint
column msg new_value msg noprint
set verify off
select
case when '&_SQLPLUS_RELEASE' = '2601020000'
then 'export -applicationid &APP_ID. -exptype APEXLANG -dir src/database/'||lower(owner)||'/apex_apps/f'||application_id
else 'validate input -input '||'src/database/'||lower(owner)||'/apex_apps/f'||application_id||'/'||lower(alias)||' -ws '||workspace
end as cmd,
case when '&_SQLPLUS_RELEASE' = '2601020000'
then 'Bug in 26.1 -Rexported application '||application_id||' to src/database/'||lower(owner)||'/apex_apps/f'||application_id
else 'Validating APEXlang app &APP_ID. ...'
end as msg
from apex_applications where application_id = :app_id;
prompt &msg.
apex &cmd.
set define off
]]></sql>
<binds>
<bind id="app_id">
<tooltip><![CDATA[app_id]]></tooltip>
</bind>
</binds>
</query>
</queries>
</alias>
<alias name="prj_install">
<description/>
<queries>
<query minversion="8">
<sql><![CDATA[cd dist
prompt Running Project Installer Script...
set define off
@install.sql
cd ..]]></sql>
</query>
</queries>
</alias>
<alias name="prj_mr">
<description/>
<queries>
<query minversion="8">
<sql><![CDATA[cd dist
prompt Running the Liquibase mark-next-changeset-ran Command to mark the next changeset as executed...
lb mark-next-changeset-ran -changelog-file releases/main.changelog.xml
cd ..]]></sql>
</query>
</queries>
</alias>
<alias name="prj_status">
<description/>
<queries>
<query minversion="8">
<sql><![CDATA[cd dist
prompt Running the Liquibase Status Command to show pending changesets...
lb status -changelog-file releases/main.changelog.xml
cd ..]]></sql>
</query>
</queries>
</alias>
<alias name="prj_sync">
<description/>
<queries>
<query minversion="8">
<sql><![CDATA[cd dist
prompt Running the Liquibase changelog-sync Command to mark all changesets as executed...
lb changelog-sync -changelog-file releases/main.changelog.xml
cd ..]]></sql>
</query>
</queries>
</alias>
<alias name="prj_force_apex">
<description/>
<queries>
<query minversion="8">
<sql><![CDATA[
pause This will FORCE re-deployment or synching of APEX application even if no changes detected. Press ENTER to continue or Ctrl-C to cancel...
delete FROM databasechangelog_actions
where ID like 'INSTALL_%'
and author ='SQLCL-Generated'
and filename like 'releases/apex/f%/f%.xml' ;
delete from databasechangelog
where ID like 'INSTALL_%'
and author ='SQLCL-Generated'
and filename like 'releases/apex/f%/f%.xml'
and description like '%runApexScript%';
prompt Done. Run 'prj_install' to re-install APEX applications or 'prj_sync' to update the catalog now.
]]></sql>
</query>
</queries>
</alias>
<alias name="prj_drift_cleanup">
<description/>
<queries>
<query minversion="8">
<sql><![CDATA[!bash -c scripts/bash/tools/drift_cleanup.sh]]></sql>
</query>
</queries>
</alias>
<alias name="prj_compile">
<description/>
<queries>
<query minversion="8">
<sql><![CDATA[set define on
column apex_src_path new_value apex_src_path noprint
column app_id new_value app_id noprint
select :app_id app_id , 'src/database/'||lower(owner)||'/apex_apps/f'||application_id||'/'||lower(alias)||' -ws '||workspace as apex_src_path from apex_applications where application_id = :app_id;
prompt Compiling APEXlang app &APP_ID. from &APEX_SRC_PATH. ...
apex import -input &APEX_SRC_PATH.
set define off
]]></sql>
<binds>
<bind id="app_id">
<tooltip><![CDATA[app_id]]></tooltip>
</bind>
</binds>
</query>
</queries>
</alias>
<alias name="prj_validate">
<description/>
<queries>
<query minversion="8">
<sql><![CDATA[set define on
column apex_src_path new_value apex_src_path noprint
column app_id new_value app_id noprint
select :app_id app_id , 'src/database/'||lower(owner)||'/apex_apps/f'||application_id||'/'||lower(alias)||' -ws '||workspace as apex_src_path from apex_applications where application_id = :app_id;
prompt Validating APEXlang app &APP_ID. from &APEX_SRC_PATH. ...
apex validate -input &APEX_SRC_PATH.
set define off
]]></sql>
<binds>
<bind id="APP_ID">
<tooltip><![CDATA[APP_ID]]></tooltip>
</bind>
</binds>
</query>
</queries>
</alias>
</aliases>