View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0006594 | SymmetricDS | Improvement | public | 2024-09-20 17:09 | 2024-09-20 17:09 |
Reporter | elong | Assigned To | elong | ||
Priority | normal | ||||
Status | assigned | Resolution | open | ||
Product Version | 3.15.0 | ||||
Target Version | 3.15.9 | ||||
Summary | 0006594: Support DDL for automatic update of timestamp by database | ||||
Description | Support data definition language (DDL) replication of a timestamp column with the option to update the timestamp automatically by the database when the row is updated. Add a "autoUpdate" boolean attribute to the "column" element in the XML. On MySQL: CREATE TABLE mytest ( id INT NOT NULL, name VARCHAR(100) NULL, ts1 TIMESTAMP DEFAULT current_timestamp() on update current_timestamp() NOT NULL, ts2 TIMESTAMP DEFAULT current_timestamp() on update current_timestamp() NOT NULL, dt DATETIME DEFAULT current_timestamp() on update current_timestamp() NOT NULL, PRIMARY KEY (id) ); On DB2: CREATE TABLE mytest ( id INT NOT NULL, name VARCHAR(100) NULL, ts1 TIMESTAMP DEFAULT current_timestamp() generated by default for each row on update as row change timestamp NOT NULL, PRIMARY KEY (id) ); <database xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="dbexport" encoding="UTF-8"> <table name="mytest2"> <column name="id" primaryKey="true" primaryKeySeq="1" required="true" type="INTEGER" size="10"> <platform-column name="mysql" type="INT" size="10"/> </column> <column name="name" type="VARCHAR" size="100"> <platform-column name="mysql" type="VARCHAR" size="100"/> </column> <column name="ts1" required="true" type="TIMESTAMP" size="0" default="current_timestamp()" autoUpdate="true"> <platform-column name="mysql" type="TIMESTAMP" default="current_timestamp()"/> </column> </table> </database> | ||||
Tags | ddl/schema, dialect: db2, dialect: mysql/mariadb | ||||
Date Modified | Username | Field | Change |
---|---|---|---|
2024-09-20 17:09 | elong | New Issue | |
2024-09-20 17:09 | elong | Status | new => assigned |
2024-09-20 17:09 | elong | Assigned To | => elong |
2024-09-20 17:09 | elong | Tag Attached: ddl/schema | |
2024-09-20 17:09 | elong | Tag Attached: dialect: db2 | |
2024-09-20 17:09 | elong | Tag Attached: dialect: mysql/mariadb |