dbmodel 6.4.3-alpha.1 → 6.5.0

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.
Files changed (2) hide show
  1. package/bin/dbmodel.js +4 -2
  2. package/package.json +11 -11
package/bin/dbmodel.js CHANGED
@@ -41,13 +41,14 @@ program
41
41
  'regex, which table data will be loaded and stored in model (in load command)'
42
42
  )
43
43
  .option('-e, --engine <engine>', 'engine name, eg. mysql@dbgate-plugin-mysql')
44
- .option('--commonjs', 'Creates CommonJS module');
44
+ .option('--commonjs', 'Creates CommonJS module')
45
+ .option('--transaction', 'Run deploy query in transaction');
45
46
 
46
47
  program
47
48
  .command('deploy <modelFolder>')
48
49
  .description('Deploys model to database')
49
50
  .action(modelFolder => {
50
- const { engine, server, user, password, database } = program.opts();
51
+ const { engine, server, user, password, database, transaction } = program.opts();
51
52
  // const hooks = [];
52
53
  // if (program.autoIndexForeignKeys) hooks.push(dbmodel.hooks.autoIndexForeignKeys);
53
54
 
@@ -61,6 +62,7 @@ program
61
62
  database,
62
63
  },
63
64
  modelFolder,
65
+ useTransaction: transaction,
64
66
  })
65
67
  );
66
68
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dbmodel",
3
- "version": "6.4.3-alpha.1",
3
+ "version": "6.5.0",
4
4
  "homepage": "https://dbgate.org/",
5
5
  "repository": {
6
6
  "type": "git",
@@ -30,16 +30,16 @@
30
30
  ],
31
31
  "dependencies": {
32
32
  "commander": "^10.0.0",
33
- "dbgate-api": "^6.4.3-alpha.1",
34
- "dbgate-plugin-csv": "^6.4.3-alpha.1",
35
- "dbgate-plugin-excel": "^6.4.3-alpha.1",
36
- "dbgate-plugin-mongo": "^6.4.3-alpha.1",
37
- "dbgate-plugin-mssql": "^6.4.3-alpha.1",
38
- "dbgate-plugin-mysql": "^6.4.3-alpha.1",
39
- "dbgate-plugin-postgres": "^6.4.3-alpha.1",
40
- "dbgate-plugin-xml": "^6.4.3-alpha.1",
41
- "dbgate-plugin-oracle": "^6.4.3-alpha.1",
42
- "dbgate-web": "^6.4.3-alpha.1",
33
+ "dbgate-api": "^6.5.0",
34
+ "dbgate-plugin-csv": "^6.5.0",
35
+ "dbgate-plugin-excel": "^6.5.0",
36
+ "dbgate-plugin-mongo": "^6.5.0",
37
+ "dbgate-plugin-mssql": "^6.5.0",
38
+ "dbgate-plugin-mysql": "^6.5.0",
39
+ "dbgate-plugin-postgres": "^6.5.0",
40
+ "dbgate-plugin-xml": "^6.5.0",
41
+ "dbgate-plugin-oracle": "^6.5.0",
42
+ "dbgate-web": "^6.5.0",
43
43
  "dotenv": "^16.0.0",
44
44
  "pinomin": "^1.0.4"
45
45
  }