Skip to content

Commit e6764c6

Browse files
committed
Adapt output for "oracle_export"
- Add additional attributes to the <entity> tag. - Use "text" for all string data types.
1 parent 07da00c commit e6764c6

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

ora_migrator--0.9.sql

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2158,8 +2158,10 @@ BEGIN
21582158
AND (only_schemas IS NULL
21592159
OR schema =ANY (only_schemas))
21602160
LOOP
2161-
result := result || E'\n <entity name="' || quote_xml(t) || E'">\n'
2162-
' <attributes>\n';
2161+
result := result || E'\n <entity name="' || quote_xml(t) || E'" label="'
2162+
|| quote_xml(t) || E'" description="A '
2163+
|| quote_xml(t) || E' entity" delete="false" translatable="false">\n'
2164+
|| E' <attributes>\n';
21632165

21642166
/* loop all columns in the table */
21652167
FOR c, ty, nul IN
@@ -2170,6 +2172,11 @@ BEGIN
21702172
OR schema =ANY (only_schemas))
21712173
ORDER BY position
21722174
LOOP
2175+
/* use "text" for all string types */
2176+
IF ty LIKE 'character%' THEN
2177+
ty := 'text';
2178+
END IF;
2179+
21732180
result := result || E' <attribute name="' || quote_xml(c)
21742181
|| E'" datatype="' || quote_xml(ty)
21752182
|| E'" required="' || CASE WHEN nul THEN 'false' ELSE 'true' END

0 commit comments

Comments
 (0)