@sap/cds-dk 6.2.0 → 6.2.2

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/CHANGELOG.md CHANGED
@@ -7,6 +7,22 @@ This project adheres to [Semantic Versioning](http://semver.org/).
7
7
 
8
8
  The format is based on [Keep a Changelog](http://keepachangelog.com/).
9
9
 
10
+ ## Version 6.2.2 - 2022-10-13
11
+
12
+ ### Added
13
+
14
+ - `cds deploy --to postgres --dry` to create drop/create DDL for PostgreSQL. Full deployment (w/o `--dry`) is not yet supported, though.
15
+
16
+ ### Fixed
17
+
18
+ - `cds deploy --to sql` now honors the `cds.sql.dialect` configuration to specify SQL dialects like `postgres`.
19
+
20
+ ## Version 6.2.1 - 2022-10-10
21
+
22
+ ### Fixed
23
+
24
+ - Installation errors with unresolvable `@sap/hdi` 4.4.0 are fixed.
25
+
10
26
  ## Version 6.2.0 - 2022-10-07
11
27
 
12
28
  ### Added
@@ -0,0 +1,4 @@
1
+ exports.deploy = function deploy_to_sql (model, db, options) {
2
+ options.dialect = 'postgres'
3
+ return require('./to-sql') .deploy (model, db, options)
4
+ }
@@ -5,8 +5,13 @@ exports.deploy = function deploy_to_sqlite (_model, _db, options) {
5
5
  const fts = cds.env.features.folders
6
6
  const model = _model || conf.model || cds.resolve(!fts ? '*' : ['*',fts], false)
7
7
  const file = _database4 (_db, _dbrl, conf)
8
+
8
9
  const dialect = _dbrl && _dbrl.match(/^(\w+)/) && RegExp.$1
9
- if (dialect) options.dialect = dialect === 'sql' ? conf.dialect || 'plain' : dialect
10
+ if (dialect) options.dialect = (dialect === 'sql')
11
+ ? conf.dialect || cds.env.sql.dialect
12
+ : dialect
13
+ if (options.dialect === 'postgres' && !options.dry) console.error('\nDeploying to PostgreSQL is not yet supported\n')
14
+
10
15
  return cds.deploy(model) .to ('sqlite:'+file, options)
11
16
  .then (db => db && db.disconnect()) // REVISIT: we should NOT require to disconnect explicitly
12
17
  }