@verdnatura/myt 1.8.4 → 1.8.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/myt.js CHANGED
@@ -322,10 +322,10 @@ class Myt {
322
322
  await conn.query(structure);
323
323
  }
324
324
 
325
- const [[realm]] = await conn.query(
325
+ const [[versionConfig]] = await conn.query(
326
326
  `SELECT realm FROM versionConfig`
327
327
  );
328
- this.realm = realm;
328
+ this.realm = versionConfig?.realm;
329
329
  }
330
330
 
331
331
  return this.conn;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@verdnatura/myt",
3
- "version": "1.8.4",
3
+ "version": "1.8.6",
4
4
  "author": "Verdnatura Levante SL",
5
5
  "description": "MySQL version control",
6
6
  "license": "GPL-3.0",
@@ -12,4 +12,5 @@ RUN echo "[LOG] Import finished." \
12
12
  && rm -rf dump
13
13
 
14
14
  COPY fixtures.*.sql dump/
15
+ COPY .fixtures.sql dump/
15
16
  COPY realms realms/
@@ -1,30 +0,0 @@
1
- CREATE DATABASE /*!32312 IF NOT EXISTS*/ `account`;
2
-
3
- CREATE TABLE `version` (
4
- `code` VARCHAR(50) NOT NULL,
5
- `number` CHAR(11) NULL DEFAULT NULL,
6
- `gitCommit` VARCHAR(255) NULL DEFAULT NULL,
7
- `updated` DATETIME NOT NULL,
8
- `lastNumber` CHAR(11) NULL DEFAULT NULL
9
- ) ENGINE=InnoDB;
10
-
11
- ALTER TABLE `version`
12
- ADD PRIMARY KEY (`code`);
13
-
14
- CREATE TABLE `versionLog` (
15
- `code` VARCHAR(50) NOT NULL,
16
- `number` CHAR(11) NOT NULL,
17
- `file` VARCHAR(255) NOT NULL,
18
- `user` VARCHAR(255) NULL,
19
- `updated` DATETIME NOT NULL,
20
- `errorNumber` INT(10) UNSIGNED DEFAULT NULL,
21
- `errorMessage` VARCHAR(255) DEFAULT NULL
22
- ) ENGINE=InnoDB;
23
-
24
- ALTER TABLE `versionLog`
25
- ADD PRIMARY KEY (`code`,`number`,`file`);
26
-
27
- CREATE TABLE `util`.`versionConfig` (
28
- `id` INT UNSIGNED AUTO_INCREMENT PRIMARY KEY,
29
- `realm` VARCHAR(16) NULL DEFAULT NULL COMMENT 'Data set on which the project runs'
30
- ) ENGINE=InnoDB;