{"id":18906,"library":"vs-cds-dbm","title":"cds-dbm","description":"Database deployment and migrations for SAP CAP models supporting non-HANA relational databases. Current stable version is 0.0.4. It extends @sap/cds with Liquibase-based CLI commands (deploy, load, diff, drop) and a custom build task for SAP BTP Cloud Foundry. Key differentiators: enables CAP on PostgreSQL via cds-pg adapter, automated delta deployments using zero-downtime schema cloning. Release cadence is low (single patch).","status":"active","version":"0.0.4","language":"javascript","source_language":"en","source_url":"https://github.com/mikezaschka/cds-dbm","tags":["javascript","sap","cap","cds","PostgreSQL","postgres"],"install":[{"cmd":"npm install vs-cds-dbm","lang":"bash","label":"npm"},{"cmd":"yarn add vs-cds-dbm","lang":"bash","label":"yarn"},{"cmd":"pnpm add vs-cds-dbm","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Required peer dependency for CAP models and service SDK","package":"@sap/cds","optional":false},{"reason":"Liquibase requires JRE >= 8; must be installed on system","package":"java-runtime","optional":true},{"reason":"PostgreSQL adapter for CDS (e.g., @cap-js/postgres or cds-pg)","package":"cds-pg","optional":true}],"imports":[{"note":"cds-dbm is a CLI tool; no JavaScript import. Use npx or add scripts in package.json.","wrong":"require('cds-dbm')","symbol":"cds-dbm","correct":"npx cds-dbm deploy"},{"note":"Programmatic API is experimental; path must include /commands.","wrong":"import cdsDbm from 'cds-dbm'","symbol":"cds-dbm/commands","correct":"import { deploy } from 'cds-dbm/commands'"},{"note":"Config must be in root package.json under cds.migrations.db. See README for required schema/clone/reference.","wrong":"Missing migrations config block","symbol":"cds-dbm (package.json config)","correct":"\"cds\": { \"migrations\": { \"db\": { ... } } }"}],"quickstart":{"code":"npm install cds-dbm\n# In package.json, add:\n\"cds\": {\n  \"migrations\": {\n    \"db\": {\n      \"schema\": {\n        \"default\": \"public\",\n        \"clone\": \"_cdsdbm_clone\",\n        \"reference\": \"_cdsdbm_ref\"\n      },\n      \"deploy\": {\n        \"tmpFile\": \"tmp/_autodeploy.json\",\n        \"undeployFile\": \"db/undeploy.json\"\n      }\n    }\n  }\n}\n# Ensure JRE >= 8 is installed\nnpx cds-dbm deploy","lang":"typescript","description":"Installs cds-dbm, adds required migration config to package.json, runs deploy command."},"warnings":[{"fix":"Install Java 8+ and ensure java is on PATH","message":"JRE >= 8 required on system; not bundled with npm","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Use exactly 'public' for default, '_cdsdbm_clone' for clone, '_cdsdbm_ref' for reference","message":"CDS configuration must be exactly as documented; schema names cannot be arbitrary","severity":"breaking","affected_versions":">=0.0.0"},{"fix":"Ensure cds-pg (or compatible adapter) is installed and configured","message":"cds-dbm only supports PostgreSQL via cds-pg; other databases not supported","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Test migrations on a development copy first; check Liquibase compatibility","message":"Liquibase is used internally; complex migrations may fail on unsupported DB features","severity":"gotcha","affected_versions":">=0.0.0"}],"env_vars":null,"search_vec":"'0.0.4':22 'adapt':56 'autom':57 'base':29 'btp':43 'build':39 'cadenc':67 'cap':10,49,74 'cds':2,54,75 'cds-dbm':1 'cds-pg':53 'cli':30 'clone':65 'cloud':44 'command':31 'current':18 'custom':38 'databas':4,17 'dbm':3 'delta':58 'deploy':5,32,59 'diff':34 'differenti':47 'downtim':63 'drop':35 'enabl':48 'extend':24 'foundri':45 'hana':15 'javascript':72 'key':46 'liquibas':28 'liquibase-bas':27 'load':33 'low':69 'migrat':7 'model':11 'non':14 'non-hana':13 'patch':71 'pg':55 'postgr':77 'postgresql':51,76 'relat':16 'releas':66 'sap':9,42,73 'sap/cds':25 'schema':64 'singl':70 'stabl':19 'support':12 'task':40 'use':60 'version':20 'via':52 'zero':62 'zero-downtim':61","created_at":"2026-04-25T07:40:45.856767+00:00","updated_at":"2026-04-25T07:40:45.856767+00:00","problems":[{"fix":"Run 'npm install cds-dbm' and use 'import { deploy } from 'cds-dbm/commands''","cause":"Incorrect import path or not installed","error":"Error: Cannot find module 'cds-dbm/commands'"},{"fix":"Install JRE >= 8 and ensure 'java' command works in terminal","cause":"Java not installed or not in PATH","error":"java.lang.RuntimeException: java.io.IOException: Cannot run program \"java\": error=2, No such file or directory"},{"fix":"Add the required migrations configuration as shown in the README","cause":"Missing or incorrect configuration block","error":"Error: cds-dbm requires a 'cds.migrations.db' configuration in package.json"},{"fix":"Set environment variables for DB connection (e.g., DATABASE_URL) and install database adapter","cause":"Missing database credentials or driver","error":"LiquibaseException: liquibase.exception.DatabaseException: Connection could not be created"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":"cds-dbm","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/mikezaschka/cds-dbm","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/vs-cds-dbm","openapi_spec":null,"status_page":null,"smithery":null,"categories":["database"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-17","next_check":"2026-07-24","install_tag":null}}