Skip to content

Commit

Permalink
Merge pull request #7884 from qmonmert/fix/punctuation
Browse files Browse the repository at this point in the history
Fix punctuation
  • Loading branch information
pascalgrimaud authored Oct 30, 2023
2 parents 1703da1 + 20a8dc9 commit 599d3c7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ The changelog folder for cassandra/cql files is similar to Liquibase (for SQL da
- Unit tests
- Run of `docker compose -f src/main/docker/cassandra-migration.yml up -d` command

Changelog scripts MUST tell explicitly which keyspace is used :
Changelog scripts MUST tell explicitly which keyspace is used:

- by using `USE myKeyspace;` directive at the beginning of a script
- or by prepending each table with the keyspace it belongs to : `CREATE TABLE IF NOT EXISTS myKeyspace.myTable`
- or by prepending each table with the keyspace it belongs to: `CREATE TABLE IF NOT EXISTS myKeyspace.myTable`

Second approach is recommended : it allows to not switch keyspace at runtime if there's many of them.
Second approach is recommended: it allows to not switch keyspace at runtime if there's many of them.
See [warn-if-set-keyspace section](https://docs.datastax.com/en/developer/java-driver/latest/manual/core/configuration/reference/) for more info.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Cassandra Migration tool

## How it works ?
## How it works?

Similar to Liquibase, jhipster-lite provide a tool to apply your CQL migration scripts, with some restrictions:

Expand Down Expand Up @@ -28,7 +28,7 @@ Uncomment this line in `src/docker/cassandra-migration.yml`:
#- DEBUG_LOG=1 # uncomment to show debug logs during the migration process
```

Run the migration container :
Run the migration container:

```bash
docker compose -f src/main/docker/cassandra-migration.yml up -d
Expand All @@ -37,8 +37,8 @@ docker logs cassandra-migration --follow

## Differences with JHipster

This tool is the same that is [used by jhipster project](https://www.jhipster.tech/using-cassandra/), with 2 differences :
This tool is the same that is [used by jhipster project](https://www.jhipster.tech/using-cassandra/), with 2 differences:

- jhipster-lite doesn't have a CLI to generate entities, so there's no automatic generation of changelog in `resources/cql/changelog` folder
- a dedicated keyspace, `jhipsterMigration` is used to store migration metadata. It allows to not mix jhipster data with your application data
- it means that you must explicitly tell which keyspace to use in your `changelog/*.cql` scripts : either by using `USE` directive, or by prepending your table names with keyspace they belong to
- it means that you must explicitly tell which keyspace to use in your `changelog/*.cql` scripts: either by using `USE` directive, or by prepending your table names with keyspace they belong to

0 comments on commit 599d3c7

Please sign in to comment.