drawdb-io / drawdb

Free, simple, and intuitive online database diagram editor and SQL generator.
https://drawdb.app
GNU Affero General Public License v3.0
22.8k stars 1.59k forks source link

Suggestion: Export to Django Models #19

Open wedersonrsouza opened 7 months ago

wedersonrsouza commented 7 months ago

It would be great if it were possible to export to "Django Models". In other words, generate the models automatically.

1ilit commented 7 months ago

Thanks for the suggestion! This is definitely in the plans along with TS, C#, and Java classes

sumeet-kg commented 7 months ago

Some suggestion for model export

  1. Python a. Models in SQLAlchemy
  2. Java Entity Model a. Hibernate
  3. Ruby a. ActiveRecord default with Ruby
  4. PHP a. Doctrine models
  5. Javascript a. TypeORM
himalaya-kaushik commented 7 months ago

hi @1ilit I would like to work on this enhancement ...

image

Just a quick question, should i add Django Models along with the list or do you have any picture in mind?

1ilit commented 7 months ago

I'm thinking of making the diagrams DBMS specific, so major parts of the UI might change including the way things get exported

I don't want to jump the gun with major features before we have a solid base that won't get changed much

If you want to work on it now feel free to put it anywhere you find fit. The conversion from diagram to code would still be the same, we can move things around in the UI later

himalaya-kaushik commented 7 months ago

hey @1ilit https://github.com/drawdb-io/drawdb/pull/42 Here is the PR for python django models , since you said we can alter UI later the underlying functionality might help to get more traffic to the product.