pgrepup icon indicating copy to clipboard operation
pgrepup copied to clipboard

pgrepup fix suggestion

Open noizo opened this issue 7 years ago • 2 comments

I had no primary key on some tables. So pgrepup fix fixed it by adding another column with __pgrepup_id__ or some similar name.

Thats really a not very good idea to alter DB's without explaining to user, what is going to be altered. In my case, this alteration would broke our deploy process.

What did helped me, id adding a primary key to the tables itself.

ALTER TABLE alembic_version ADD PRIMARY KEY (version_num);

That helped.

noizo avatar Mar 24 '17 16:03 noizo

You mean: pgrepup fix could be prompt for an existing column to be used as primary key (if no primary key is found) or use the "automatic" fix pgrepup__id Is that correct?

rtshome avatar Mar 24 '17 17:03 rtshome

Yep, that would be enough i think.

noizo avatar Mar 27 '17 07:03 noizo