mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-19 14:16:01 +00:00
mysql - analyse modifications
This commit is contained in:
3
packages/engines/mysql/sql/functionModifications.js
Normal file
3
packages/engines/mysql/sql/functionModifications.js
Normal file
@@ -0,0 +1,3 @@
|
||||
module.exports = `
|
||||
SHOW PROCEDURE STATUS WHERE Db = '#DATABASE#'
|
||||
`;
|
||||
@@ -5,6 +5,8 @@ const foreignKeys = require('./foreignKeys');
|
||||
const tableModifications = require('./tableModifications');
|
||||
const views = require('./views');
|
||||
const programmables = require('./programmables');
|
||||
const procedureModifications = require('./procedureModifications');
|
||||
const functionModifications = require('./functionModifications');
|
||||
|
||||
module.exports = {
|
||||
columns,
|
||||
@@ -14,4 +16,6 @@ module.exports = {
|
||||
tableModifications,
|
||||
views,
|
||||
programmables,
|
||||
procedureModifications,
|
||||
functionModifications,
|
||||
};
|
||||
|
||||
3
packages/engines/mysql/sql/procedureModifications.js
Normal file
3
packages/engines/mysql/sql/procedureModifications.js
Normal file
@@ -0,0 +1,3 @@
|
||||
module.exports = `
|
||||
SHOW PROCEDURE STATUS WHERE Db = '#DATABASE#'
|
||||
`;
|
||||
@@ -1,7 +1,8 @@
|
||||
module.exports = `
|
||||
select
|
||||
TABLE_NAME,
|
||||
case when ENGINE='InnoDB' then CREATE_TIME else coalesce(UPDATE_TIME, CREATE_TIME) end as ALTER_TIME
|
||||
TABLE_NAME as pureName,
|
||||
TABLE_TYPE as objectType,
|
||||
case when ENGINE='InnoDB' then CREATE_TIME else coalesce(UPDATE_TIME, CREATE_TIME) end as modifyDate
|
||||
from information_schema.tables
|
||||
where TABLE_SCHEMA = '#DATABASE#'
|
||||
`;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
module.exports = `
|
||||
select
|
||||
TABLE_NAME as pureName,
|
||||
case when ENGINE='InnoDB' then CREATE_TIME else coalesce(UPDATE_TIME, CREATE_TIME) end as alterTime
|
||||
case when ENGINE='InnoDB' then CREATE_TIME else coalesce(UPDATE_TIME, CREATE_TIME) end as modifyDate
|
||||
from information_schema.tables
|
||||
where TABLE_SCHEMA = '#DATABASE#' and TABLE_TYPE='BASE TABLE' and TABLE_NAME =[OBJECT_NAME_CONDITION];
|
||||
`;
|
||||
|
||||
Reference in New Issue
Block a user