Skip to content

Commit

Permalink
Polish "Document comments in SQL for database initialization"
Browse files Browse the repository at this point in the history
  • Loading branch information
mhalbritter committed Nov 22, 2023
1 parent 578d043 commit 0171ed2
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ While we do not recommend using multiple data source initialization technologies
This will defer data source initialization until after any `EntityManagerFactory` beans have been created and initialized.
`schema.sql` can then be used to make additions to any schema creation performed by Hibernate and `data.sql` can be used to populate it.

NOTE: When including comments in your SQL file, it is advisable to use `--` for single-line comments and `/++*++` and `++*++/` for block comments. Be cautious when using other comment formats, as they may lead to the omission of certain SQL statements during parsing.
NOTE: The initialization scripts support `--` for single line comments and `/++*++ ++*++/` for block comments.
Other comment formats are not supported.

If you are using a <<howto#howto.data-initialization.migration-tool,Higher-level Database Migration Tool>>, like Flyway or Liquibase, you should use them alone to create and initialize the schema.
Using the basic `schema.sql` and `data.sql` scripts alongside Flyway or Liquibase is not recommended and support will be removed in a future release.
Expand Down

0 comments on commit 0171ed2

Please sign in to comment.