This is a follow on to my previous question. Basically I have a table that has 2 foreign key links into two other table. But I think the best way is to add a primary key to the table itself so that it becomes:
id, int, primary
foreign_id_1, int, primary
foreign_id_2, int, primary
The problem is that there are already a lot of items in the table. So when I ran alembic upgrade head
, it add 0
as the value of all the existing items. This apparently breaks my code.
Is there a way to retrospectively add id
s to the existing items?