0fc4aa7c28
Add timezone for the columns creation_date and update_date, otherwise it's difficult to compare the times correctly in the unit test. Furthermore the default value of the creation_date will now be defined by the postgres implementation of the database interface.
7 lines
430 B
SQL
7 lines
430 B
SQL
CREATE TABLE IF NOT EXISTS devices (
|
|
device_id CHAR(36) CONSTRAINT pk_devices PRIMARY KEY,
|
|
device_name VARCHAR(64) NOT NULL,
|
|
device_location VARCHAR(64),
|
|
creation_date TIMESTAMP WITH TIME ZONE DEFAULT CURRENT_TIMESTAMP NOT NULL,
|
|
update_date TIMESTAMP WITH TIME ZONE
|
|
); |