mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-18 00:56:02 +00:00
admin screenshots
This commit is contained in:
@@ -178,6 +178,7 @@ async function copyFolder(source, target) {
|
||||
|
||||
async function run() {
|
||||
await initMySqlDatabase('MyChinook', path.resolve(path.join(__dirname, '../data/chinook-mysql.sql')));
|
||||
await initMySqlDatabase('MyChangedChinook', path.resolve(path.join(__dirname, '../data/chinook-mysql-changed.sql')));
|
||||
// await initMySqlDatabase('Northwind', path.resolve(path.join(__dirname, '../data/northwind-mysql.sql')));
|
||||
// await initMySqlDatabase('Sakila', path.resolve(path.join(__dirname, '../data/sakila-mysql.sql')));
|
||||
|
||||
|
||||
34
e2e-tests/init/team.js
Normal file
34
e2e-tests/init/team.js
Normal file
@@ -0,0 +1,34 @@
|
||||
const dbgateApi = require('dbgate-api');
|
||||
dbgateApi.initializeApiEnvironment();
|
||||
const dbgatePluginMysql = require('dbgate-plugin-mysql');
|
||||
dbgateApi.registerPlugins(dbgatePluginMysql);
|
||||
|
||||
async function initStorageDatabase() {
|
||||
await dbgateApi.executeQuery({
|
||||
connection: {
|
||||
server: process.env.STORAGE_SERVER,
|
||||
user: process.env.STORAGE_USER,
|
||||
password: process.env.STORAGE_PASSWORD,
|
||||
port: process.env.STORAGE_PORT,
|
||||
engine: process.env.STORAGE_ENGINE,
|
||||
},
|
||||
sql: `drop database if exists ${process.env.STORAGE_DATABASE}`,
|
||||
});
|
||||
|
||||
await dbgateApi.executeQuery({
|
||||
connection: {
|
||||
server: process.env.STORAGE_SERVER,
|
||||
user: process.env.STORAGE_USER,
|
||||
password: process.env.STORAGE_PASSWORD,
|
||||
port: process.env.STORAGE_PORT,
|
||||
engine: process.env.STORAGE_ENGINE,
|
||||
},
|
||||
sql: `create database ${process.env.STORAGE_DATABASE}`,
|
||||
});
|
||||
}
|
||||
|
||||
async function run() {
|
||||
await initStorageDatabase();
|
||||
}
|
||||
|
||||
dbgateApi.runScript(run);
|
||||
Reference in New Issue
Block a user