8032-devToTest_2440 #3009

Merged
alexm merged 262 commits from 8032-devToTest_2440 into test 2024-09-24 09:34:49 +00:00
1 changed files with 3 additions and 3 deletions
Showing only changes of commit aedc8071e1 - Show all commits

View File

@ -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