@smallprod/models
Version:
51 lines (50 loc) • 1.42 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.addDatabases = void 0;
const mariaConfig = {
dbms: 'mariadb',
database: 'test',
host: '127.0.0.1',
user: 'test',
password: 'secret',
port: 3306,
name: 'maria',
};
const mysqlConfig = {
dbms: 'mariadb',
database: 'test',
host: '127.0.0.1',
user: 'root',
password: 'secret123',
port: 3307,
name: 'mysql',
};
const postgresConfig = {
dbms: 'postgre',
database: 'test',
host: '127.0.0.1',
user: 'postgres',
password: 'secret',
port: 5432,
name: 'postgres',
};
const mssqlConfig = {
dbms: 'mssql',
database: 'test',
host: '127.0.0.1',
user: 'SA',
password: 'secret123',
port: 1433,
name: 'mssql',
};
exports.default = {
mariaConfig,
mysqlConfig,
postgresConfig,
mssqlConfig,
};
exports.addDatabases = async (dbManager) => {
await dbManager.add(mariaConfig.dbms, mariaConfig.host, mariaConfig.port, mariaConfig.user, mariaConfig.password, mariaConfig.database, 'maria', true);
await dbManager.add(mysqlConfig.dbms, mysqlConfig.host, mysqlConfig.port, mysqlConfig.user, mysqlConfig.password, mysqlConfig.database, 'mysql', true);
await dbManager.add(postgresConfig.dbms, postgresConfig.host, postgresConfig.port, postgresConfig.user, postgresConfig.password, postgresConfig.database, 'postgres', true);
};