mirror of
https://github.com/dbgate/dbgate
synced 2024-11-07 20:26:23 +00:00
This commit is contained in:
parent
9d711e45f9
commit
40203f2823
@ -88,7 +88,7 @@ class MsSqlAnalyser extends DatabaseAnalyser {
|
||||
|
||||
const tables = tablesRows.rows.map(row => ({
|
||||
...row,
|
||||
contentHash: row.modifyDate.toISOString(),
|
||||
contentHash: row.modifyDate && row.modifyDate.toISOString(),
|
||||
columns: columnsRows.rows.filter(col => col.objectId == row.objectId).map(getColumnInfo),
|
||||
primaryKey: DatabaseAnalyser.extractPrimaryKeys(row, pkColumnsRows.rows),
|
||||
foreignKeys: DatabaseAnalyser.extractForeignKeys(row, fkColumnsRows.rows),
|
||||
@ -96,7 +96,7 @@ class MsSqlAnalyser extends DatabaseAnalyser {
|
||||
|
||||
const views = viewsRows.rows.map(row => ({
|
||||
...row,
|
||||
contentHash: row.modifyDate.toISOString(),
|
||||
contentHash: row.modifyDate && row.modifyDate.toISOString(),
|
||||
createSql: getCreateSql(row),
|
||||
columns: viewColumnRows.rows.filter(col => col.objectId == row.objectId).map(getColumnInfo),
|
||||
}));
|
||||
@ -105,7 +105,7 @@ class MsSqlAnalyser extends DatabaseAnalyser {
|
||||
.filter(x => x.sqlObjectType.trim() == 'P')
|
||||
.map(row => ({
|
||||
...row,
|
||||
contentHash: row.modifyDate.toISOString(),
|
||||
contentHash: row.modifyDate && row.modifyDate.toISOString(),
|
||||
createSql: getCreateSql(row),
|
||||
}));
|
||||
|
||||
@ -113,7 +113,7 @@ class MsSqlAnalyser extends DatabaseAnalyser {
|
||||
.filter(x => ['FN', 'IF', 'TF'].includes(x.sqlObjectType.trim()))
|
||||
.map(row => ({
|
||||
...row,
|
||||
contentHash: row.modifyDate.toISOString(),
|
||||
contentHash: row.modifyDate && row.modifyDate.toISOString(),
|
||||
createSql: getCreateSql(row),
|
||||
}));
|
||||
|
||||
@ -137,7 +137,7 @@ class MsSqlAnalyser extends DatabaseAnalyser {
|
||||
|
||||
res[field].push({
|
||||
objectId,
|
||||
contentHash: modifyDate.toISOString(),
|
||||
contentHash: modifyDate && modifyDate.toISOString(),
|
||||
schemaName,
|
||||
pureName,
|
||||
});
|
||||
|
@ -128,14 +128,14 @@ class Analyser extends DatabaseAnalyser {
|
||||
.map(x => ({
|
||||
...x,
|
||||
objectId: x.pureName,
|
||||
contentHash: x.modifyDate.toISOString(),
|
||||
contentHash: x.modifyDate && x.modifyDate.toISOString(),
|
||||
})),
|
||||
views: tableModificationsQueryData.rows
|
||||
.filter(x => x.objectType == 'VIEW')
|
||||
.map(x => ({
|
||||
...x,
|
||||
objectId: x.pureName,
|
||||
contentHash: x.modifyDate.toISOString(),
|
||||
contentHash: x.modifyDate && x.modifyDate.toISOString(),
|
||||
})),
|
||||
procedures: procedureModificationsQueryData.rows.map(x => ({
|
||||
contentHash: x.Modified,
|
||||
|
Loading…
Reference in New Issue
Block a user