Skip to Content
0
Former Member
Feb 08, 2017 at 04:27 PM

Generate 'ALTER SEQUENCE'

158 Views Last edit Mar 16, 2018 at 06:34 PM 3 rev

Hi all and thank you for your help.

I'm using powerdesigner 16.6 SP1 to model an postgresql database, but i can't associate sequences with PKs...

"To associate the sequence with the column, double-click the column entry. Then, in the General tab, specify the name of the sequence."

but i already did this...

the problem is that when i generate database, the sequences are simply created, but not associated with the column...

create sequence SQ_CARGO;

create table CARGO (
   ID                   INT4                 not null,
   NOME                 VARCHAR(20)          not null,
   ROLE                 VARCHAR(100)         not null,
   constraint PK_CARGO primary key (ID)
);

It's missing

ALTER SEQUENCE sequence_name OWNED BY table_name.colum_name;

Thanks for you help,