PKGBUILD/pkg/repository/db/postgres/ddl/1_table_devices.up.sql
markus 366dccde12
fix: use go-migrate pkg to init or update db schema
Instead to implement own logic how the database scheme should be updated
or migrated to a newer or older version flucky use now instead the
go-migrate package.
2021-01-30 15:44:21 +01:00

8 lines
439 B
SQL

CREATE TABLE devices (
device_id CHAR(36) NOT NULL,
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,
CONSTRAINT pk_devices PRIMARY KEY(device_id)
);