Compare commits
4 Commits
Author | SHA1 | Date |
---|---|---|
|
6318a58f24 | |
|
f05cc498cc | |
|
2b6a97c243 | |
|
5e6353688f |
|
@ -7,6 +7,9 @@ mockFunctions:
|
||||||
- mockUtcTime
|
- mockUtcTime
|
||||||
sumViews: true
|
sumViews: true
|
||||||
defaultDefiner: root@localhost
|
defaultDefiner: root@localhost
|
||||||
|
localRemotes:
|
||||||
|
- local
|
||||||
|
- docker
|
||||||
deprecMarkRegex: __$
|
deprecMarkRegex: __$
|
||||||
deprecCommentRegex: ^@deprecated [0-9]{4}-[0-9]{2}-[0-9]{2}
|
deprecCommentRegex: ^@deprecated [0-9]{4}-[0-9]{2}-[0-9]{2}
|
||||||
deprecDateRegex: '[0-9]{4}-[0-9]{2}-[0-9]{2}'
|
deprecDateRegex: '[0-9]{4}-[0-9]{2}-[0-9]{2}'
|
||||||
|
|
|
@ -371,9 +371,12 @@ class Push extends Command {
|
||||||
const oldSql = await engine.fetchRoutine(type, schema, name);
|
const oldSql = await engine.fetchRoutine(type, schema, name);
|
||||||
const oldSum = engine.getShaSum(type, schema, name);
|
const oldSum = engine.getShaSum(type, schema, name);
|
||||||
|
|
||||||
|
const localRemote = opts.remote == null
|
||||||
|
|| opts.localRemotes?.indexOf(opts.remote) !== -1;
|
||||||
|
|
||||||
const isMockFn = type == 'function'
|
const isMockFn = type == 'function'
|
||||||
&& schema == opts.versionSchema
|
&& schema == opts.versionSchema
|
||||||
&& opts.remote == 'local'
|
&& localRemote
|
||||||
&& opts.mockDate
|
&& opts.mockDate
|
||||||
&& opts.mockFunctions
|
&& opts.mockFunctions
|
||||||
&& opts.mockFunctions.indexOf(name) !== -1;
|
&& opts.mockFunctions.indexOf(name) !== -1;
|
||||||
|
|
|
@ -125,13 +125,14 @@ class Run extends Command {
|
||||||
try {
|
try {
|
||||||
const server = new Server(ct, dbConfig);
|
const server = new Server(ct, dbConfig);
|
||||||
|
|
||||||
if (isRandom) {
|
const useCustom = opts.ci || opts.network
|
||||||
|
if (isRandom || useCustom) {
|
||||||
try {
|
try {
|
||||||
const netSettings = await ct.inspect({
|
const netSettings = await ct.inspect({
|
||||||
format: '{{json .NetworkSettings}}'
|
format: '{{json .NetworkSettings}}'
|
||||||
});
|
});
|
||||||
|
|
||||||
if (opts.ci || opts.network) {
|
if (useCustom) {
|
||||||
dbConfig.host = opts.network
|
dbConfig.host = opts.network
|
||||||
? netSettings.Networks[opts.network].IPAddress
|
? netSettings.Networks[opts.network].IPAddress
|
||||||
: netSettings.Gateway;
|
: netSettings.Gateway;
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
{
|
{
|
||||||
"name": "@verdnatura/myt",
|
"name": "@verdnatura/myt",
|
||||||
"version": "1.6.10",
|
"version": "1.6.13",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "@verdnatura/myt",
|
"name": "@verdnatura/myt",
|
||||||
"version": "1.6.10",
|
"version": "1.6.13",
|
||||||
"license": "GPL-3.0",
|
"license": "GPL-3.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@sqltools/formatter": "^1.2.5",
|
"@sqltools/formatter": "^1.2.5",
|
||||||
|
@ -1169,6 +1169,7 @@
|
||||||
"resolved": "https://registry.npmjs.org/nodegit/-/nodegit-0.27.0.tgz",
|
"resolved": "https://registry.npmjs.org/nodegit/-/nodegit-0.27.0.tgz",
|
||||||
"integrity": "sha512-E9K4gPjWiA0b3Tx5lfWCzG7Cvodi2idl3V5UD2fZrOrHikIfrN7Fc2kWLtMUqqomyoToYJLeIC8IV7xb1CYRLA==",
|
"integrity": "sha512-E9K4gPjWiA0b3Tx5lfWCzG7Cvodi2idl3V5UD2fZrOrHikIfrN7Fc2kWLtMUqqomyoToYJLeIC8IV7xb1CYRLA==",
|
||||||
"hasInstallScript": true,
|
"hasInstallScript": true,
|
||||||
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"fs-extra": "^7.0.0",
|
"fs-extra": "^7.0.0",
|
||||||
"got": "^10.7.0",
|
"got": "^10.7.0",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@verdnatura/myt",
|
"name": "@verdnatura/myt",
|
||||||
"version": "1.6.11",
|
"version": "1.6.13",
|
||||||
"author": "Verdnatura Levante SL",
|
"author": "Verdnatura Levante SL",
|
||||||
"description": "MySQL version control",
|
"description": "MySQL version control",
|
||||||
"license": "GPL-3.0",
|
"license": "GPL-3.0",
|
||||||
|
|
Loading…
Reference in New Issue