mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-18 16:06:01 +00:00
postgresql analyse optyimalization #273
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
module.exports = `
|
||||
select
|
||||
basecol.constraint_name,
|
||||
basecol.constraint_schema,
|
||||
basecol.column_name as "column_name",
|
||||
basecol.table_schema,
|
||||
basecol.table_name,
|
||||
basecol.ordinal_position
|
||||
from information_schema.key_column_usage basecol
|
||||
`;
|
||||
@@ -0,0 +1,10 @@
|
||||
module.exports = `
|
||||
select
|
||||
fk.constraint_name as "constraint_name",
|
||||
fk.constraint_schema as "constraint_schema",
|
||||
fk.update_rule as "update_action",
|
||||
fk.delete_rule as "delete_action",
|
||||
fk.unique_constraint_name as "unique_constraint_name",
|
||||
fk.unique_constraint_schema as "unique_constraint_schema"
|
||||
from information_schema.referential_constraints fk
|
||||
`;
|
||||
@@ -0,0 +1,8 @@
|
||||
module.exports = `
|
||||
select
|
||||
base.table_name as "table_name",
|
||||
base.table_schema as "table_schema",
|
||||
base.constraint_name as "constraint_name",
|
||||
base.constraint_schema as "constraint_schema"
|
||||
from information_schema.table_constraints base
|
||||
`;
|
||||
@@ -14,6 +14,10 @@ const indexes = require('./indexes');
|
||||
const indexcols = require('./indexcols');
|
||||
const uniqueNames = require('./uniqueNames');
|
||||
|
||||
const fk_keyColumnUsage = require('./fk_key_column_usage');
|
||||
const fk_referentialConstraints = require('./fk_referential_constraints');
|
||||
const fk_tableConstraints = require('./fk_table_constraints');
|
||||
|
||||
module.exports = {
|
||||
columns,
|
||||
tableModifications,
|
||||
@@ -21,6 +25,9 @@ module.exports = {
|
||||
viewModifications,
|
||||
primaryKeys,
|
||||
foreignKeys,
|
||||
fk_keyColumnUsage,
|
||||
fk_referentialConstraints,
|
||||
fk_tableConstraints,
|
||||
views,
|
||||
routines,
|
||||
routineModifications,
|
||||
|
||||
Reference in New Issue
Block a user