diff --git a/guides/databases-sqlite.md b/guides/databases-sqlite.md index c5bfa7345..2121a67eb 100644 --- a/guides/databases-sqlite.md +++ b/guides/databases-sqlite.md @@ -84,6 +84,34 @@ Further configuration depends on whether you run SQLite as an [in-memory databas ## Deployment +
+ +### Initial Database Schema + +Configure the build to create an initial _schema.sql_ file for SQLite using `cds deploy --to sqlite --dry > srv/src/main/resources/schema.sql`. + +::: code-group +```xml [srv/pom.xml] + + schema.sql + + cds + + + + deploy --to sqlite --dry > srv/src/main/resources/schema.sql + + + +``` +::: + + +[Learn more about creating an initial database schema](/java/persistence-services#initial-database-schema-1){.learn-more} + +
+ + ### In-Memory Databases
@@ -114,11 +142,10 @@ Using in-memory databases is the most recommended option for test drives and tes
-The database content is stored in-memory. [Configure the build](../java/persistence-services#initial-database-schema-1) to create an initial _schema.sql_ file for SQLite using `cds deploy --to sqlite --dry > srv/src/main/resources/schema.sql`. - -Finally, configure the DB connection in the non-productive `default` profile: +The database content is stored in-memory. Configure the DB connection in the non-productive `default` profile: -```yaml +::: code-group +```yaml [application.yaml] --- spring: config.activate.on-profile: default @@ -132,6 +159,8 @@ spring: maximum-pool-size: 1 max-lifetime: 0 ``` +::: + [Learn how to configure an in-memory SQLite database.](../java/persistence-services#in-memory-storage){.learn-more} diff --git a/java/persistence-services.md b/java/persistence-services.md index 5cf190068..72d0bd912 100644 --- a/java/persistence-services.md +++ b/java/persistence-services.md @@ -154,7 +154,7 @@ To generate a `schema.sql` for PostgreSQL, use the dialect `postgres` with the ` ```xml - cds + schema.sql cds @@ -195,7 +195,7 @@ To generate a `schema.sql` for H2, use the dialect `h2` with the `cds deploy` co ```xml - cds + schema.sql cds @@ -220,9 +220,9 @@ mvn com.sap.cds:cds-maven-plugin:add -Dfeature=H2 -Dprofile=default To generate a `schema.sql` for SQLite, use the dialect `sqlite` with the `cds deploy` command: `cds deploy --to sqlite --dry`. The following snippet from _srv/pom.xml_ configures the [cds-maven-plugin](../java/development/#cds-maven-plugin) accordingly: -```xml +```xml [srv/pom.xml] - cds + schema.sql cds