refDeleteAction, refUpdateAction

This commit is contained in:
Jan Prochazka
2024-07-09 09:22:51 +02:00
parent f04a3bdbd5
commit ed134d787b
3 changed files with 6 additions and 1 deletions

View File

@@ -37,7 +37,7 @@
"build:web:docker": "yarn workspace dbgate-web build",
"build:plugins:frontend": "workspaces-run --only=\"dbgate-plugin-*\" -- yarn build:frontend",
"build:plugins:frontend:watch": "workspaces-run --parallel --only=\"dbgate-plugin-*\" -- yarn build:frontend:watch",
"storage-json": "dbmodel model-to-json storage-db packages/api/src/storageModel.json",
"storage-json": "dbmodel model-to-json storage-db packages/api/src/storageModel.js --commonjs",
"plugins:copydist": "workspaces-run --only=\"dbgate-plugin-*\" -- yarn copydist",
"build:app:local": "yarn plugins:copydist && cd app && yarn build:local",
"start:app:local": "cd app && yarn start:local",

View File

@@ -11,6 +11,8 @@ export interface ColumnInfoYaml {
length?: number;
autoIncrement?: boolean;
references?: string;
refDeleteAction?: string;
refUpdateAction?: string;
primaryKey?: boolean;
default?: string;
}
@@ -104,6 +106,8 @@ function convertForeignKeyFromYaml(
constraintType: 'foreignKey',
pureName: table.name,
refTableName: col.references,
deleteAction: col.refDeleteAction,
updateAction: col.refUpdateAction,
columns: [
{
columnName: col.name,

View File

@@ -188,6 +188,7 @@
'img app-query': 'mdi mdi-view-comfy color-icon-magenta',
'img connection': 'mdi mdi-connection color-icon-blue',
'img profiler': 'mdi mdi-gauge color-icon-blue',
'img users': 'mdi mdi-account-multiple color-icon-blue',
'img role': 'mdi mdi-account-group color-icon-blue',
'img admin': 'mdi mdi-security color-icon-blue',