feat: refs #7562 Changes
gitea/salix/pipeline/pr-dev There was a failure building this commit
Details
gitea/salix/pipeline/pr-dev There was a failure building this commit
Details
This commit is contained in:
parent
c0668d054f
commit
aedc8071e1
|
@ -23,7 +23,7 @@ BEGIN
|
|||
AND REGEXP_SUBSTR(c.COLUMN_COMMENT, vDateRegex COLLATE utf8mb3_unicode_ci) < vDated
|
||||
AND v.TABLE_NAME IS NULL
|
||||
AND s.INDEX_NAME = 'PRIMARY'
|
||||
UNION ALL
|
||||
UNION
|
||||
SELECT CONCAT('ALTER TABLE ', c.TABLE_SCHEMA, '.', c.TABLE_NAME, ' DROP FOREIGN KEY ', kcu.CONSTRAINT_NAME, ';')
|
||||
FROM information_schema.`COLUMNS` c
|
||||
LEFT JOIN information_schema.`VIEWS` v ON v.TABLE_SCHEMA = c.TABLE_SCHEMA
|
||||
|
@ -35,7 +35,7 @@ BEGIN
|
|||
AND REGEXP_SUBSTR(c.COLUMN_COMMENT, vDateRegex COLLATE utf8mb3_unicode_ci) < vDated
|
||||
AND v.TABLE_NAME IS NULL
|
||||
AND kcu.REFERENCED_COLUMN_NAME IS NOT NULL
|
||||
UNION ALL
|
||||
UNION
|
||||
SELECT CONCAT('ALTER TABLE ', c.TABLE_SCHEMA, '.', c.TABLE_NAME, ' DROP COLUMN ', c.COLUMN_NAME, ';')
|
||||
FROM information_schema.`COLUMNS` c
|
||||
LEFT JOIN information_schema.`VIEWS` v ON v.TABLE_SCHEMA = c.TABLE_SCHEMA
|
||||
|
@ -46,7 +46,7 @@ BEGIN
|
|||
WHERE c.COLUMN_NAME REGEXP vMarkRegex COLLATE utf8mb3_unicode_ci
|
||||
AND REGEXP_SUBSTR(c.COLUMN_COMMENT, vDateRegex COLLATE utf8mb3_unicode_ci) < vDated
|
||||
AND v.TABLE_NAME IS NULL
|
||||
UNION ALL
|
||||
UNION
|
||||
SELECT CONCAT('DROP TABLE ', TABLE_SCHEMA, '.', TABLE_NAME, ';')
|
||||
FROM information_schema.TABLES
|
||||
WHERE TABLE_NAME REGEXP vMarkRegex COLLATE utf8mb3_unicode_ci
|
||||
|
|
Loading…
Reference in New Issue