Skip to content

Commit

Permalink
Fix missing column from view
Browse files Browse the repository at this point in the history
  • Loading branch information
jariolaine committed Jun 9, 2023
1 parent fb93311 commit af629a6
Show file tree
Hide file tree
Showing 11 changed files with 228 additions and 179 deletions.
9 changes: 8 additions & 1 deletion APEX/Supporting_Objects/admin/database_objects.sql
Original file line number Diff line number Diff line change
Expand Up @@ -2251,7 +2251,7 @@ where 1 = 1
--------------------------------------------------------
-- DDL for View BLOG_V_POSTS
--------------------------------------------------------
CREATE OR REPLACE FORCE VIEW "BLOG_V_POSTS" ("POST_ID", "CATEGORY_ID", "BLOGGER_ID", "BLOGGER_NAME", "POST_TITLE", "CATEGORY_TITLE", "POST_DESC", "FIRST_PARAGRAPH", "BODY_HTML", "PUBLISHED_ON", "CTX_SEARCH", "CHANGED_ON", "ARCHIVE_YEAR", "CATEGORY_SEQ", "POST_URL", "TAGS_HTML1", "TAGS_HTML2", "NEXT_POST", "PREV_POST") AS
CREATE OR REPLACE FORCE VIEW "BLOG_V_POSTS" ("POST_ID", "CATEGORY_ID", "BLOGGER_ID", "BLOGGER_NAME", "POST_TITLE", "CATEGORY_TITLE", "POST_DESC", "FIRST_PARAGRAPH", "BODY_HTML", "PUBLISHED_ON", "CTX_SEARCH", "CHANGED_ON", "ARCHIVE_YEAR", "CATEGORY_SEQ", "POST_URL", "TAGS", "TAGS_HTML1", "TAGS_HTML2", "NEXT_POST", "PREV_POST") AS
with q1 as(
select
t1.id as post_id
Expand Down Expand Up @@ -2298,6 +2298,13 @@ select
,blog_url.get_post(
p_post_id => q1.post_id
) as post_url
,(
select
listagg( lkp.tag, ', ' ) within group( order by lkp.display_seq ) as tags
from blog_v_post_tags lkp
where 1 = 1
and lkp.post_id = q1.post_id
) as tags
-- Aggregate tag HTML for post
,(
select
Expand Down
9 changes: 8 additions & 1 deletion APEX/Upgrade/public/database_objects_upgrade.sql
Original file line number Diff line number Diff line change
Expand Up @@ -1832,7 +1832,7 @@ where 1 = 1
--------------------------------------------------------
-- DDL for View BLOG_V_POSTS
--------------------------------------------------------
CREATE OR REPLACE FORCE VIEW "BLOG_V_POSTS" ("POST_ID", "CATEGORY_ID", "BLOGGER_ID", "BLOGGER_NAME", "POST_TITLE", "CATEGORY_TITLE", "POST_DESC", "FIRST_PARAGRAPH", "BODY_HTML", "PUBLISHED_ON", "CTX_SEARCH", "CHANGED_ON", "ARCHIVE_YEAR", "CATEGORY_SEQ", "POST_URL", "TAGS_HTML1", "TAGS_HTML2", "NEXT_POST", "PREV_POST") AS
CREATE OR REPLACE FORCE VIEW "BLOG_V_POSTS" ("POST_ID", "CATEGORY_ID", "BLOGGER_ID", "BLOGGER_NAME", "POST_TITLE", "CATEGORY_TITLE", "POST_DESC", "FIRST_PARAGRAPH", "BODY_HTML", "PUBLISHED_ON", "CTX_SEARCH", "CHANGED_ON", "ARCHIVE_YEAR", "CATEGORY_SEQ", "POST_URL", "TAGS", "TAGS_HTML1", "TAGS_HTML2", "NEXT_POST", "PREV_POST") AS
with q1 as(
select
t1.id as post_id
Expand Down Expand Up @@ -1879,6 +1879,13 @@ select
,blog_url.get_post(
p_post_id => q1.post_id
) as post_url
,(
select
listagg( lkp.tag, ', ' ) within group( order by lkp.display_seq ) as tags
from blog_v_post_tags lkp
where 1 = 1
and lkp.post_id = q1.post_id
) as tags
-- Aggregate tag HTML for post
,(
select
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ wwv_flow_imp.create_flow(
,p_substitution_string_01=>'BLOG_DEFAULT_TIMEFRAME'
,p_substitution_value_01=>'3600'
,p_last_updated_by=>'LAINFJAR'
,p_last_upd_yyyymmddhh24miss=>'20230609055033'
,p_last_upd_yyyymmddhh24miss=>'20230609070725'
,p_file_prefix => nvl(wwv_flow_application_install.get_static_app_file_prefix,'')
,p_files_version=>785
,p_print_server_type=>'INSTANCE'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2331,7 +2331,7 @@ wwv_flow_imp_shared.append_to_install_script(
'-- DDL for View BLOG_V_POSTS',
'--------------------------------------------------------',
'CREATE OR REPLACE FORCE VIEW "BLOG_V_POSTS" ("POST_ID", "CATEGORY_ID", "BLOGGER_ID", "BLOGGER_NAME", "POST_TITLE", "CATEGORY_TITLE", "POST_DESC", "FIRST_PARAGRAPH", "BODY_HTML", "PUBLISHED_ON", "CTX_SEARCH", "CHANGED_ON", "ARCHIVE_YEAR", "CATEGORY_SE'
||'Q", "POST_URL", "TAGS_HTML1", "TAGS_HTML2", "NEXT_POST", "PREV_POST") AS',
||'Q", "POST_URL", "TAGS", "TAGS_HTML1", "TAGS_HTML2", "NEXT_POST", "PREV_POST") AS',
'with q1 as(',
' select',
' t1.id as post_id',
Expand Down Expand Up @@ -2378,6 +2378,13 @@ wwv_flow_imp_shared.append_to_install_script(
' ,blog_url.get_post(',
' p_post_id => q1.post_id',
' ) as post_url',
' ,(',
' select',
' listagg( lkp.tag, '', '' ) within group( order by lkp.display_seq ) as tags',
' from blog_v_post_tags lkp',
' where 1 = 1',
' and lkp.post_id = q1.post_id',
' ) as tags',
'-- Aggregate tag HTML for post',
' ,(',
' select',
Expand Down Expand Up @@ -3292,17 +3299,7 @@ wwv_flow_imp_shared.append_to_install_script(
'',
' ctx_ddl.create_preference(',
' preference_name => ''BLOG_COMMENTS_UDS''',
' ,object_name => ''USER_DATASTORE''',
' );',
'',
' ctx_ddl.set_attribute(',
' preference_name => ''BLOG_COMMENTS_UDS''',
' ,attribute_name => ''OUTPUT_TYPE''',
' ,attribute_value => ''CLOB''',
' );',
'',
' ctx_ddl.set_attribute(',
' preference_'))
' ,object_name '))
);
null;
wwv_flow_imp.component_end;
Expand All @@ -3320,7 +3317,17 @@ wwv_flow_imp.component_begin (
wwv_flow_imp_shared.append_to_install_script(
p_id=>wwv_flow_imp.id(32897013199918411)
,p_script_clob=>wwv_flow_string.join(wwv_flow_t_varchar2(
'name => ''BLOG_COMMENTS_UDS''',
' => ''USER_DATASTORE''',
' );',
'',
' ctx_ddl.set_attribute(',
' preference_name => ''BLOG_COMMENTS_UDS''',
' ,attribute_name => ''OUTPUT_TYPE''',
' ,attribute_value => ''CLOB''',
' );',
'',
' ctx_ddl.set_attribute(',
' preference_name => ''BLOG_COMMENTS_UDS''',
' ,attribute_name => ''PROCEDURE''',
' ,attribute_value =>',
' apex_string.format(',
Expand Down Expand Up @@ -4328,17 +4335,7 @@ wwv_flow_imp_shared.append_to_install_script(
'-- Global functions and procedures',
'--------------------------------------------------------------------------------',
'--------------------------------------------------------------------------------',
' procedure post_authentication',
' as',
' l_group_names apex_t_varchar2;',
' begin',
'',
' -- collect user groups to PL/SQL table',
' for c1 in(',
' select group_name',
' from apex_workspace_group_users',
' where 1 = 1',
' and user_name '))
' procedure post_authentica'))
);
null;
wwv_flow_imp.component_end;
Expand All @@ -4356,7 +4353,17 @@ wwv_flow_imp.component_begin (
wwv_flow_imp_shared.append_to_install_script(
p_id=>wwv_flow_imp.id(32897013199918411)
,p_script_clob=>wwv_flow_string.join(wwv_flow_t_varchar2(
'= sys_context( ''APEX$SESSION'', ''APP_USER'' )',
'tion',
' as',
' l_group_names apex_t_varchar2;',
' begin',
'',
' -- collect user groups to PL/SQL table',
' for c1 in(',
' select group_name',
' from apex_workspace_group_users',
' where 1 = 1',
' and user_name = sys_context( ''APEX$SESSION'', ''APP_USER'' )',
' ) loop',
' apex_string.push( l_group_names, c1.group_name );',
' end loop;',
Expand Down Expand Up @@ -5373,13 +5380,7 @@ wwv_flow_imp_shared.append_to_install_script(
' c_archive_page constant t_page_item := t_page_item( ''ARCHIVES'', ''P15_ARCHIVE_ID'' );',
' c_tags_page constant t_page_item := t_page_item( ''TAG'', ''P6_TAG_ID'' );',
'',
'-- cache rss url',
' g_rss_url varchar2(1024);',
'-- cache canonical host',
' g_canonical_url varchar2(1024);',
'',
'--------------------------------------------------------------------------------',
'------------------------------'))
'-- cach'))
);
null;
wwv_flow_imp.component_end;
Expand All @@ -5397,7 +5398,13 @@ wwv_flow_imp.component_begin (
wwv_flow_imp_shared.append_to_install_script(
p_id=>wwv_flow_imp.id(32897013199918411)
,p_script_clob=>wwv_flow_string.join(wwv_flow_t_varchar2(
'--------------------------------------------------',
'e rss url',
' g_rss_url varchar2(1024);',
'-- cache canonical host',
' g_canonical_url varchar2(1024);',
'',
'--------------------------------------------------------------------------------',
'--------------------------------------------------------------------------------',
'-- Private procedures and functions',
'--------------------------------------------------------------------------------',
'--------------------------------------------------------------------------------',
Expand Down Expand Up @@ -6386,12 +6393,7 @@ wwv_flow_imp_shared.append_to_install_script(
' begin',
' return ''<meta name="robots" value="noindex">'';',
' end get_robots_noindex_meta;',
'--------------------------------------------------------------------------------',
'--------------------------------------------------------------------------------',
' function get_tab_canonical_link(',
' p_page in varchar2',
' ) return varchar2',
' as'))
'------------------------------'))
);
null;
wwv_flow_imp.component_end;
Expand All @@ -6409,7 +6411,12 @@ wwv_flow_imp.component_begin (
wwv_flow_imp_shared.append_to_install_script(
p_id=>wwv_flow_imp.id(32897013199918411)
,p_script_clob=>wwv_flow_string.join(wwv_flow_t_varchar2(
'',
'--------------------------------------------------',
'--------------------------------------------------------------------------------',
' function get_tab_canonical_link(',
' p_page in varchar2',
' ) return varchar2',
' as',
' l_html varchar2(32700);',
' begin',
' -- generate canonical link for tab',
Expand Down
2 changes: 1 addition & 1 deletion APEX/blog_public_pages/application/create_application.sql
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ wwv_flow_imp.create_flow(
,p_error_handling_function=>'blog_util.apex_error_handler'
,p_tokenize_row_search=>'N'
,p_last_updated_by=>'LAINFJAR'
,p_last_upd_yyyymmddhh24miss=>'20230609055133'
,p_last_upd_yyyymmddhh24miss=>'20230609070701'
,p_file_prefix => nvl(wwv_flow_application_install.get_static_app_file_prefix,'')
,p_files_version=>698
,p_print_server_type=>'INSTANCE'
Expand Down
Loading

0 comments on commit af629a6

Please sign in to comment.