Che*_*eng 5 database postgresql
目前,我使用独立的GUI工具DbSchema来设计我的数据库模式.
我喜欢它,因为它可以
替代文字http://sites.google.com/site/yanchengcheok/Home/PostgreSQL.png
但是,我意识到DbSchema生成的SQL代码没有被PostgreSQL识别.
CREATE TABLE lot (
lot_id serial AUTO_INCREMENT NOT NULL,
operator_name text,
machine_name text,
timestamp timestamp,
CONSTRAINT pk_lot_id PRIMARY KEY(lot_id))
CREATE TABLE unit (
unit_id serial AUTO_INCREMENT NOT NULL,
fk_lot_id serial NOT NULL,
CONSTRAINT pk_unit_id PRIMARY KEY(unit_id),
CONSTRAINT fk_lot_id FOREIGN KEY( fk_lot_id ) REFERENCES lot ( lot_id ))
Run Code Online (Sandbox Code Playgroud)
我收到错误:
org.postgresql.util.PSQLException: ERROR: syntax error at or near "AUTO_INCREMENT"
Run Code Online (Sandbox Code Playgroud)
是否有任何替代"正常工作"免费工具,我可以使用PostgreSQL,提供以上2个功能?