如何为飞路迁移添加评论
How to add a comment to flyway migration
我正在努力让我的大迁移更加自我解释,这就是为什么我需要向它添加一些评论。但是,我尝试了几种方法,但都没有成功。
我试过了:
//
#
<!-- TEXT -->
错误:
SQL State : 42601
Error Code : 0
Message : ERROR: syntax error at or near "//"
Position: 1
有什么方法可以为 flyway SQL 迁移添加评论吗?
使用 ANSI SQL 的 --
发表评论!
以下应该适用于所有支持的数据库:
/* Single line comment */
/*
Multi-line
comment
*/
-- Sql-style comment
此外 MySQL 和 MariaDB:
# MySQL-style single line comment
当我们升级到 spring-boot 2.5 时,我们发现前两个连字符后需要一个 space -- 带有 SQL 风格的注释
我正在努力让我的大迁移更加自我解释,这就是为什么我需要向它添加一些评论。但是,我尝试了几种方法,但都没有成功。 我试过了:
//
#
<!-- TEXT -->
错误:
SQL State : 42601
Error Code : 0
Message : ERROR: syntax error at or near "//"
Position: 1
有什么方法可以为 flyway SQL 迁移添加评论吗?
使用 ANSI SQL 的 --
发表评论!
以下应该适用于所有支持的数据库:
/* Single line comment */
/*
Multi-line
comment
*/
-- Sql-style comment
此外 MySQL 和 MariaDB:
# MySQL-style single line comment
当我们升级到 spring-boot 2.5 时,我们发现前两个连字符后需要一个 space -- 带有 SQL 风格的注释