Files
Athou_commafeed/commafeed-server/src/main/resources/changelogs/db.changelog-4.2.xml

27 lines
1.8 KiB
XML

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.1.xsd">
<changeSet id="use-timestamps" author="athou">
<modifyDataType tableName="FEEDS" columnName="lastUpdated" newDataType="TIMESTAMP" />
<modifyDataType tableName="FEEDS" columnName="lastPublishedDate" newDataType="TIMESTAMP" />
<modifyDataType tableName="FEEDS" columnName="lastEntryDate" newDataType="TIMESTAMP" />
<modifyDataType tableName="FEEDS" columnName="disabledUntil" newDataType="TIMESTAMP" />
<modifyDataType tableName="FEEDENTRIES" columnName="inserted" newDataType="TIMESTAMP" />
<modifyDataType tableName="FEEDENTRIES" columnName="updated" newDataType="TIMESTAMP" />
<modifyDataType tableName="FEEDENTRYSTATUSES" columnName="entryInserted" newDataType="TIMESTAMP" />
<modifyDataType tableName="FEEDENTRYSTATUSES" columnName="entryUpdated" newDataType="TIMESTAMP" />
<modifyDataType tableName="USERS" columnName="lastLogin" newDataType="TIMESTAMP" />
<modifyDataType tableName="USERS" columnName="created" newDataType="TIMESTAMP" />
<modifyDataType tableName="USERS" columnName="recoverPasswordTokenDate" newDataType="TIMESTAMP" />
<modifySql dbms="postgresql">
<!-- liquibase uses the 'TIMESTAMP WITHOUT TIME ZONE' type by default, which is not a UTC timestamp -->
<!-- postgresql UTC timestamp is actually 'TIMESTAMP WITH TIME ZONE' -->
<!-- see https://stackoverflow.com/a/48069726/1885506 -->
<replace replace="WITHOUT TIME ZONE" with="WITH TIME ZONE" />
</modifySql>
</changeSet>
</databaseChangeLog>