pgrepup
pgrepup copied to clipboard
pgrepup fix suggestion
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.
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?
Yep, that would be enough i think.