pdb icon indicating copy to clipboard operation
pdb copied to clipboard

There should be a way to create an index for an already existing table

Open orium opened this issue 9 years ago • 4 comments

orium avatar Apr 19 '16 12:04 orium

Adding on demand or after in general? Because after in general is possible - you just add the new one and if it doesn't exist it will be created.

rpvilao avatar Apr 19 '16 12:04 rpvilao

Not sure if I get what on-demand/after-in-general means. In my case I have a table that is created elsewhere (and I don't have access to the entity definition), where I just know that a few columns exist and I want and index on those columns.

orium avatar Apr 19 '16 15:04 orium

I can imagine of a few use cases for this like schema migrations.

But, in general, creating and updating DML in different places and with only partial knowledge of of the entity feels wrong.

defer avatar Apr 19 '16 15:04 defer

yep it's true. but that would be the approach being wrong and not the feature it self as you said. I don't see any harm to have it. whether it's properly used or not it's a different matter.

rpvilao avatar Apr 19 '16 16:04 rpvilao