Django Postgres Database Migration
I have an access database with two tables, members and residential areas, I'm using a tool to migrate the tables from access to postgres on railway.app. The problem is, when i run migrations from django, i get a relationship doesn't exist error. (I have a foreign key attribute in members referencing residential areas because each member is linked to a residential area.
I understand this is happening because when the data gets to postgres, it doesn't have a unique ID fields(the auto-generated ID from django), I've tried using custom fields as primary keys but nothing seems to work. Anyone with an idea how I can solve this issue?
It is likely that the unique IDs are not being correctly transferred from Access to PostgreSQL during the migration. To resolve this issue, you can try the following steps:
1) Manually add unique ID fields to both tables in Access before migration.
2) During the migration process, make sure to specify the unique ID fields as primary keys.
3) Ensure that the foreign key in the "members" table is properly referencing the primary key in the "residential areas" table.
If this does not resolve the issue, you may also want to try using a different migration tool or manually writing SQL scripts to transfer the data. Additionally, you may want to consider using the Django ORM to automatically generate the unique IDs and handle the relationships between tables.