I have a database schema issue, and I would like to have some opinions.
Imagine a object car
. In the first version of the software I develop, my customers requested my to manage 4 wheels
on each car
: so I had a collection of wheels
in my class car. 3 tables were created:
In the second version of the software, my customers informed my that they did not need 4 wheels anymore, but only one per car. No problem for me, I just had to remove the wheel collection from my class car, and instead put a attribute wheel.
2 tables are needed in that case
So when I update the database schema with the VSChema utility, everything works find, except that the table car_wheel remains in the database.
When I want to remove a car from the database, I first remove the associated wheel, and when I want to remove the car itself, an error is raised, telling that some reference of the car still exist in the car_wheel table, and that the removal of the car is forbidden.
Am I missing something in the schema update process, or do I have a possibility to remove the unused table car_wheel?
If not I have to remove all entries from the table manually before trying to remove my car?