mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-05-03 21:03:59 +00:00
docs
This commit is contained in:
@@ -35,6 +35,7 @@
|
|||||||
"build:lib": "yarn build:sqltree && yarn build:tools && yarn build:filterparser && yarn build:datalib",
|
"build:lib": "yarn build:sqltree && yarn build:tools && yarn build:filterparser && yarn build:datalib",
|
||||||
"build:app": "yarn plugins:copydist && cd app && yarn install && yarn build",
|
"build:app": "yarn plugins:copydist && cd app && yarn install && yarn build",
|
||||||
"build:api": "yarn workspace dbgate-api build",
|
"build:api": "yarn workspace dbgate-api build",
|
||||||
|
"build:api:doc": "yarn workspace dbgate-api build:doc",
|
||||||
"build:web": "yarn workspace dbgate-web build",
|
"build:web": "yarn workspace dbgate-web build",
|
||||||
"build:plugins:frontend": "workspaces-run --only=\"dbgate-plugin-*\" -- yarn build:frontend",
|
"build:plugins:frontend": "workspaces-run --only=\"dbgate-plugin-*\" -- yarn build:frontend",
|
||||||
"build:plugins:backend": "workspaces-run --only=\"dbgate-plugin-*\" -- yarn build:backend",
|
"build:plugins:backend": "workspaces-run --only=\"dbgate-plugin-*\" -- yarn build:backend",
|
||||||
|
|||||||
@@ -6,6 +6,21 @@ const requireEngineDriver = require('../utility/requireEngineDriver');
|
|||||||
const loadModelFolder = require('../utility/loadModelFolder');
|
const loadModelFolder = require('../utility/loadModelFolder');
|
||||||
const crypto = require('crypto');
|
const crypto = require('crypto');
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Deploys database model stored in modelFolder (table as yamls) to database
|
||||||
|
* @param {object} options
|
||||||
|
* @param {connectionType} options.connection - connection object
|
||||||
|
* @param {object} options.systemConnection - system connection (result of driver.connect). If not provided, new connection will be created
|
||||||
|
* @param {object} options.driver - driver object. If not provided, it will be loaded from connection
|
||||||
|
* @param {object} options.analysedStructure - analysed structure of the database. If not provided, it will be loaded
|
||||||
|
* @param {string} options.modelFolder - folder with model files (YAML files for tables, SQL files for views, procedures, ...)
|
||||||
|
* @param {import('dbgate-tools').DatabaseModelFile[]} options.loadedDbModel - loaded database model - collection of yaml and SQL files loaded into array
|
||||||
|
* @param {function[]} options.modelTransforms - array of functions for transforming model
|
||||||
|
* @param {object} options.dbdiffOptionsExtra - extra options for dbdiff
|
||||||
|
* @param {string} options.ignoreNameRegex - regex for ignoring objects by name
|
||||||
|
* @param {string} options.targetSchema - target schema for deployment
|
||||||
|
* @param {number} options.maxMissingTablesRatio - maximum ratio of missing tables in database. Safety check, if missing ratio is highe, deploy is stopped (preventing accidental drop of all tables)
|
||||||
|
*/
|
||||||
async function deployDb({
|
async function deployDb({
|
||||||
connection,
|
connection,
|
||||||
systemConnection,
|
systemConnection,
|
||||||
|
|||||||
@@ -15,6 +15,21 @@ const importDbModel = require('../utility/importDbModel');
|
|||||||
const requireEngineDriver = require('../utility/requireEngineDriver');
|
const requireEngineDriver = require('../utility/requireEngineDriver');
|
||||||
const connectUtility = require('../utility/connectUtility');
|
const connectUtility = require('../utility/connectUtility');
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Generates query for deploying model into database
|
||||||
|
* @param {object} options
|
||||||
|
* @param {connectionType} options.connection - connection object
|
||||||
|
* @param {object} options.systemConnection - system connection (result of driver.connect). If not provided, new connection will be created
|
||||||
|
* @param {object} options.driver - driver object. If not provided, it will be loaded from connection
|
||||||
|
* @param {object} options.analysedStructure - analysed structure of the database. If not provided, it will be loaded
|
||||||
|
* @param {string} options.modelFolder - folder with model files (YAML files for tables, SQL files for views, procedures, ...)
|
||||||
|
* @param {import('dbgate-tools').DatabaseModelFile[]} options.loadedDbModel - loaded database model - collection of yaml and SQL files loaded into array
|
||||||
|
* @param {function[]} options.modelTransforms - array of functions for transforming model
|
||||||
|
* @param {object} options.dbdiffOptionsExtra - extra options for dbdiff
|
||||||
|
* @param {string} options.ignoreNameRegex - regex for ignoring objects by name
|
||||||
|
* @param {string} options.targetSchema - target schema for deployment
|
||||||
|
* @param {number} options.maxMissingTablesRatio - maximum ratio of missing tables in database. Safety check, if missing ratio is highe, deploy is stopped (preventing accidental drop of all tables)
|
||||||
|
*/
|
||||||
async function generateDeploySql({
|
async function generateDeploySql({
|
||||||
connection,
|
connection,
|
||||||
systemConnection = undefined,
|
systemConnection = undefined,
|
||||||
|
|||||||
Reference in New Issue
Block a user