Rename table for view source
This commit is contained in:
parent
1a0b232ff9
commit
2d0ce8b33e
@ -1521,7 +1521,7 @@ CREATE OR REPLACE PACKAGE app AS
|
|||||||
--
|
--
|
||||||
-- Rebuild source lines for views
|
-- Rebuild source lines for views
|
||||||
--
|
--
|
||||||
PROCEDURE rebuild_obj_views_source (
|
PROCEDURE rebuild_user_source_views (
|
||||||
in_owner apex_applications.owner%TYPE := NULL
|
in_owner apex_applications.owner%TYPE := NULL
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -1704,7 +1704,7 @@ CREATE OR REPLACE PACKAGE BODY app AS
|
|||||||
BEGIN
|
BEGIN
|
||||||
FOR c IN (
|
FOR c IN (
|
||||||
SELECT r.page_id, i.item_name, app.get_item(i.item_name) AS item_value
|
SELECT r.page_id, i.item_name, app.get_item(i.item_name) AS item_value
|
||||||
FROM obj_views_source s
|
FROM user_source_views s
|
||||||
JOIN apex_application_page_items i
|
JOIN apex_application_page_items i
|
||||||
ON i.item_name = app.get_item_name(REPLACE(REGEXP_SUBSTR(s.text, '''(\$?[A-Z0-9_]+)[^'']'), ''''), i.page_id, i.application_id)
|
ON i.item_name = app.get_item_name(REPLACE(REGEXP_SUBSTR(s.text, '''(\$?[A-Z0-9_]+)[^'']'), ''''), i.page_id, i.application_id)
|
||||||
JOIN apex_application_page_regions r
|
JOIN apex_application_page_regions r
|
||||||
@ -4120,14 +4120,14 @@ CREATE OR REPLACE PACKAGE BODY app AS
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
PROCEDURE rebuild_obj_views_source (
|
PROCEDURE rebuild_user_source_views (
|
||||||
in_owner apex_applications.owner%TYPE := NULL
|
in_owner apex_applications.owner%TYPE := NULL
|
||||||
)
|
)
|
||||||
AS
|
AS
|
||||||
BEGIN
|
BEGIN
|
||||||
app.log_module(in_owner);
|
app.log_module(in_owner);
|
||||||
--
|
--
|
||||||
DELETE FROM obj_views_source t
|
DELETE FROM user_source_views t
|
||||||
WHERE t.owner = NVL(in_owner, t.owner);
|
WHERE t.owner = NVL(in_owner, t.owner);
|
||||||
--
|
--
|
||||||
FOR c IN (
|
FOR c IN (
|
||||||
@ -4140,7 +4140,7 @@ CREATE OR REPLACE PACKAGE BODY app AS
|
|||||||
ON s.owner = t.owner
|
ON s.owner = t.owner
|
||||||
WHERE t.owner = NVL(in_owner, t.owner)
|
WHERE t.owner = NVL(in_owner, t.owner)
|
||||||
) LOOP
|
) LOOP
|
||||||
INSERT INTO obj_views_source (owner, name, line, text)
|
INSERT INTO user_source_views (owner, name, line, text)
|
||||||
SELECT
|
SELECT
|
||||||
c.owner,
|
c.owner,
|
||||||
c.name,
|
c.name,
|
||||||
|
|||||||
@ -1,17 +0,0 @@
|
|||||||
CREATE TABLE obj_views_source (
|
|
||||||
owner VARCHAR2(30) CONSTRAINT nn_obj_views_source_owner NOT NULL,
|
|
||||||
name VARCHAR2(30) CONSTRAINT nn_obj_views_source_name NOT NULL,
|
|
||||||
line NUMBER(10,0) CONSTRAINT nn_obj_views_source_line NOT NULL,
|
|
||||||
text VARCHAR2(2000),
|
|
||||||
--
|
|
||||||
CONSTRAINT pk_obj_views_source
|
|
||||||
PRIMARY KEY (owner, name, line)
|
|
||||||
);
|
|
||||||
--
|
|
||||||
COMMENT ON TABLE obj_views_source IS '[CORE] User views source converted to lines';
|
|
||||||
--
|
|
||||||
COMMENT ON COLUMN obj_views_source.owner IS 'View owner';
|
|
||||||
COMMENT ON COLUMN obj_views_source.name IS 'View name';
|
|
||||||
COMMENT ON COLUMN obj_views_source.line IS 'Line number';
|
|
||||||
COMMENT ON COLUMN obj_views_source.text IS 'Line content';
|
|
||||||
|
|
||||||
17
database/tables/user_source_views.sql
Normal file
17
database/tables/user_source_views.sql
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
CREATE TABLE user_source_views (
|
||||||
|
owner VARCHAR2(30) CONSTRAINT nn_user_source_views_owner NOT NULL,
|
||||||
|
name VARCHAR2(30) CONSTRAINT nn_user_source_views_name NOT NULL,
|
||||||
|
line NUMBER(10,0) CONSTRAINT nn_user_source_views_line NOT NULL,
|
||||||
|
text VARCHAR2(2000),
|
||||||
|
--
|
||||||
|
CONSTRAINT pk_user_source_views
|
||||||
|
PRIMARY KEY (owner, name, line)
|
||||||
|
);
|
||||||
|
--
|
||||||
|
COMMENT ON TABLE user_source_views IS '[CORE] User views source converted to lines';
|
||||||
|
--
|
||||||
|
COMMENT ON COLUMN user_source_views.owner IS 'View owner';
|
||||||
|
COMMENT ON COLUMN user_source_views.name IS 'View name';
|
||||||
|
COMMENT ON COLUMN user_source_views.line IS 'Line number';
|
||||||
|
COMMENT ON COLUMN user_source_views.text IS 'Line content';
|
||||||
|
|
||||||
Loading…
x
Reference in New Issue
Block a user