mysql - analyse primary and foreign keys

This commit is contained in:
Jan Prochazka
2020-05-16 08:45:18 +02:00
parent 70ab03ad73
commit 83e3f8b1d8
7 changed files with 81 additions and 39 deletions

View File

@@ -0,0 +1,7 @@
module.exports = `
select
TABLE_NAME,
case when ENGINE='InnoDB' then CREATE_TIME else coalesce(UPDATE_TIME, CREATE_TIME) end as ALTER_TIME
from information_schema.tables
where TABLE_SCHEMA = '#DATABASE#'
`;