These changes reduce duplicate entries in the database when multiple characters from the same corporation are added to the same account, or additional accounts. Rework the models, jobs, controllers to adapt to the hasMany relationships.
Now when a character/account is deleted the structures are left behind in case other characters who are Station Managers are using their data. Created a new job to run once a week to check for the orphaned structures that have had all their characters deleted, and removes them. (if you're concerned about security, this information is next to useless as its now stale and can't be updated).
These changes reduce duplicate entries in the database when multiple characters from the same corporation are added to the same account, or additional accounts. Rework the models, jobs, controllers to adapt to the
hasMany
relationships.Now when a character/account is deleted the structures are left behind in case other characters who are Station Managers are using their data. Created a new job to run once a week to check for the orphaned structures that have had all their characters deleted, and removes them. (if you're concerned about security, this information is next to useless as its now stale and can't be updated).