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.74k stars 1.59k forks source link

[FEATURE]Primary key from composite index. #213

Closed lastcmaster closed 3 months ago

lastcmaster commented 3 months ago

Is your feature request related to a problem? Please describe. Testing drawdb, I cannot find a way to designate a composite index as the primary key for a table. I can only define it as unique but that does not result in correct SQL, designating the primary key.

Describe the solution you'd like A checkbox in the index tool for marking the index as the primary key and allowing this to result in database appropriate code.

Additional context Most of our databases do not use generated indexes. They are unique over a few fields.

lastcmaster commented 3 months ago

And I just realise that you did not need to create a composite index to make a multi-key primary key. Sorry for the noise.