Project

General

Profile

redmine data model

Added by Luan Nguyen almost 14 years ago

Hi All,

I used MySQL reverse engineering tool to get redmine data model. However, we don't have foreign key constraints among tables, so there are no links between models.

All of validations is in the model objects. Is there anyway I can get the model through sql scripts.

Please let me know.

Thanks,
Luan


Replies (2)

RE: redmine data model - Added by Felix Schäfer almost 14 years ago

Rails doesn't impose constraints on databases because it supports lots of different database types. Supporting constraints for so many different database types would be difficult, that's why all constraints are enforced at the application level.

So much for the explanation, as to your question: I don't know of any way to automagically get sql constraints out of the rails objects, you'll have to go through them yourself I'm afraid.

RE: redmine data model - Added by Luan Nguyen almost 14 years ago

Thanks for your reply. I understand this now. Coming from database developer, I always look at foreign key constraints and reverse back to get data model map out. I can manually go through them.

Luan

    (1-2/2)