MySQL DataType - TIME not persisting seconds (getting hours and minutes..so I've got that going for me.)

Description

Create table like so:

CREATE TABLE TESTTIME(
TIME_NULL TIME NULL,
TIME_NOTNULL TIME NOT NULL,
TIME_DEFAULT TIME DEFAULT '04:12:34',
TIME_PK TIME NOT NULL,
TIME_UNIQUE TIME NOT NULL,
CONSTRAINT PK_TIME PRIMARY KEY (TIME_PK),
CONSTRAINT UN_TIME UNIQUE (TIME_UNIQUE)
);

Take snapshot and notice the seconds are 00 and not 34:

<changeSet author="robert" id="1383674467554-21">
<createTable tableName="testtime">
<column name="TIME_NULL" type="time"/>
<column name="TIME_NOTNULL" type="time">
<constraints nullable="false"/>
</column>
<column defaultValueDate="04:12:00" name="TIME_DEFAULT" type="time"/>
<column name="TIME_PK" type="time">
<constraints nullable="false"/>
</column>
<column name="TIME_UNIQUE" type="time">
<constraints nullable="false"/>
</column>
</createTable>
</changeSet>

Environment

Linux and MySQL

Activity

Show:
Fixed

Details

Reporter

Fix versions

Affects versions

Priority

Created November 11, 2013 at 8:47 PM
Updated November 20, 2013 at 10:18 PM
Resolved November 20, 2013 at 10:18 PM

Flag notifications