SUPPORT-9561: add status column

This commit is contained in:
gulnaz 2025-11-26 10:24:11 +03:00
parent 07418603d1
commit fb30eb553d
4 changed files with 37 additions and 1 deletions

View file

@ -74,6 +74,11 @@ public class ExcerptHistory extends TableImpl<ExcerptHistoryRecord> {
*/ */
public final TableField<ExcerptHistoryRecord, Timestamp> DATETIME = createField(DSL.name("datetime"), SQLDataType.TIMESTAMP(0), this, ""); public final TableField<ExcerptHistoryRecord, Timestamp> DATETIME = createField(DSL.name("datetime"), SQLDataType.TIMESTAMP(0), this, "");
/**
* The column <code>public.excerpt_history.status</code>.
*/
public final TableField<ExcerptHistoryRecord, String> STATUS = createField(DSL.name("status"), SQLDataType.VARCHAR(20), this, "");
private ExcerptHistory(Name alias, Table<ExcerptHistoryRecord> aliased) { private ExcerptHistory(Name alias, Table<ExcerptHistoryRecord> aliased) {
this(alias, aliased, (Field<?>[]) null, null); this(alias, aliased, (Field<?>[]) null, null);
} }

View file

@ -89,6 +89,20 @@ public class ExcerptHistoryRecord extends TableRecordImpl<ExcerptHistoryRecord>
return (Timestamp) get(4); return (Timestamp) get(4);
} }
/**
* Setter for <code>public.excerpt_history.status</code>.
*/
public void setStatus(String value) {
set(5, value);
}
/**
* Getter for <code>public.excerpt_history.status</code>.
*/
public String getStatus() {
return (String) get(5);
}
// ------------------------------------------------------------------------- // -------------------------------------------------------------------------
// Constructors // Constructors
// ------------------------------------------------------------------------- // -------------------------------------------------------------------------
@ -103,7 +117,7 @@ public class ExcerptHistoryRecord extends TableRecordImpl<ExcerptHistoryRecord>
/** /**
* Create a detached, initialised ExcerptHistoryRecord * Create a detached, initialised ExcerptHistoryRecord
*/ */
public ExcerptHistoryRecord(Long id, String ervuId, String prnOid, String url, Timestamp datetime) { public ExcerptHistoryRecord(Long id, String ervuId, String prnOid, String url, Timestamp datetime, String status) {
super(ExcerptHistory.EXCERPT_HISTORY); super(ExcerptHistory.EXCERPT_HISTORY);
setId(id); setId(id);
@ -111,6 +125,7 @@ public class ExcerptHistoryRecord extends TableRecordImpl<ExcerptHistoryRecord>
setPrnOid(prnOid); setPrnOid(prnOid);
setUrl(url); setUrl(url);
setDatetime(datetime); setDatetime(datetime);
setStatus(status);
resetChangedOnNotNull(); resetChangedOnNotNull();
} }
} }

View file

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.5.xsd">
<changeSet id="001" author="gulnaz">
<preConditions onFail="MARK_RAN" onFailMessage="Column status already exists">
<not>
<columnExists tableName="excerpt_history" columnName="status"/>
</not>
</preConditions>
<comment>Add status column to excerpt history table</comment>
<addColumn schemaName="public" tableName="excerpt_history">
<column name="status" type="varchar(20)"/>
</addColumn>
</changeSet>
</databaseChangeLog>

View file

@ -12,5 +12,6 @@
<include file="2025-10-24-add-org-allowed-table.xml" relativeToChangelogFile="true"/> <include file="2025-10-24-add-org-allowed-table.xml" relativeToChangelogFile="true"/>
<include file="2025-11-05-rename-column.xml" relativeToChangelogFile="true"/> <include file="2025-11-05-rename-column.xml" relativeToChangelogFile="true"/>
<include file="2025-11-20_add-excerpt-history.xml" relativeToChangelogFile="true"/> <include file="2025-11-20_add-excerpt-history.xml" relativeToChangelogFile="true"/>
<include file="2025-11-26_add-status-column-to-excerpt-history.xml" relativeToChangelogFile="true"/>
</databaseChangeLog> </databaseChangeLog>