Skip to content

Commit e3cc3d2

Browse files
committed
fix: configure Liquibase to use NOW() on PostgreSQL to fix migrations.
The failure was: liquibase.exception.DatabaseException: ERROR: syntax error at or near "$" Position: 162 [Failed SQL: INSERT INTO public.categories (id, name, name_ru, created_at, created_by, updated_at, updated_by) VALUES ('1', 'Prehistoric animals', 'Доисторические животные', ${NOW}, '2', ${NOW}, '2')] Addressed to #1034
1 parent db21731 commit e3cc3d2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/resources/liquibase/changelog.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog
66
http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.0.xsd">
77

8-
<property name="NOW" value="NOW()" dbms="mysql" />
8+
<property name="NOW" value="NOW()" dbms="mysql,postgresql" />
99
<property name="NOW" value="CURRENT_TIMESTAMP()" dbms="h2" />
1010

1111
<include file="initial-state.xml" relativeToChangelogFile="true" />

0 commit comments

Comments
 (0)