Reorganizing a Legacy Django Project with Database Challenges

19 views Asked by At

I'm dealing with a sizable Django project housing crucial data, but the database structure lacks organization, with tables lacking proper relationships and relying on unique IDs. Additionally, the poorly written Django application is shared among three projects.

I've been tasked with creating a common central codebase – a Python package installable across all three projects. The goal is to manage common functionality centrally, while keeping application-specific parts separate. The admin panel, shared among the projects, will be moved to this package.

However, I'm facing challenges in making the package suitable for all three projects. While the model names are consistent, variations in field structures and the absence of relationship fields pose hurdles.

My current plan is to create a new project with a new database, restructuring the existing project. The new application will go live, allowing admins to access the old dashboards for checking legacy data. The plan involves a gradual migration from the old to the new database until the old project can be completely retired.

I'd appreciate feedback on this approach or suggestions for alternative strategies. I've opted for a new database to avoid jeopardizing the existing data. What are your thoughts on this plan, and do you have any alternative recommendations?

(content is optimised with ChatGPT, I am not this proficient in english. Also, I don't really rely on AI response in this matter, Required a human response ;-))

0

There are 0 answers