* Streamlined eslint usage * import from @sap/cds instead of @sap/cds/lib * Using @sap/cds/eslint.js * eslint.config.mjs aktualisieren * Adjusted eslint usage for eslint9 with cds8
22 lines
691 B
JavaScript
22 lines
691 B
JavaScript
const cds = require('@sap/cds')
|
|
|
|
/**
|
|
* In order to keep basic bookshop sample as simple as possible, we don't add
|
|
* reuse dependencies. This db/init.js ensures we still have a minimum set of
|
|
* currencies, if not obtained through @capire/common.
|
|
*/
|
|
|
|
// NOTE: We use cds.on('served') to delay the UPSERTs after the db init
|
|
// to run after all INSERTs from .csv files happened.
|
|
module.exports = cds.on('served', ()=> cds.run(
|
|
UPSERT.into ('sap.common.Currencies') .columns (
|
|
[ 'code', 'symbol', 'name' ]
|
|
) .rows (
|
|
[ 'EUR', '€', 'Euro' ],
|
|
[ 'USD', '$', 'US Dollar' ],
|
|
[ 'GBP', '£', 'British Pound' ],
|
|
[ 'ILS', '₪', 'Shekel' ],
|
|
[ 'JPY', '¥', 'Yen' ],
|
|
)
|
|
))
|