akarshan2701 / h2database

Automatically exported from code.google.com/p/h2database
0 stars 0 forks source link

Feature request: Pretty names for auto creating indexes #126

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
When adding constrains I specify meaningful names, and want to have 
meaningful names for auto creating indexes.

Yes, It is possible to rename indexes to any name I like, but it would be 
nice, if H2 give names for such indexes (PK, Unique and possibly FK) by 
taking constraint name as template and adding a prefix IDX_ to it.

Or may be ALTER TABLE ADD CONSTRAINT syntax could be extended to allow 
specifying index name. 

Original issue reported on code.google.com by kua...@gmail.com on 1 Oct 2009 at 6:17

GoogleCodeExporter commented 8 years ago
I will add a feature request for:
"The index name should be "IDX_" plus the constraint name unless there is a 
conflict,
in which case append a number."

Original comment by thomas.t...@gmail.com on 2 Oct 2009 at 2:18

GoogleCodeExporter commented 8 years ago
That would be great!
I hope this is very easy to implement :)
Could it be included in next (1.1.120) release?

Original comment by kua...@gmail.com on 2 Oct 2009 at 3:00

GoogleCodeExporter commented 8 years ago
> Could it be included in next (1.1.120) release?

No. It has very low priority for me. I don't know any database that support 
this.

Original comment by thomas.t...@gmail.com on 2 Oct 2009 at 3:02

GoogleCodeExporter commented 8 years ago
ok.

>> I don't know any database that support this.
Yes. I don't know either :).
But it would be nice feature, because having human readable names for indexes 
is 
good.

Could I contribute by my self by providing a patch?
Could you give a fast clue what java class I should dig for a patch?

Original comment by kua...@gmail.com on 2 Oct 2009 at 3:47

GoogleCodeExporter commented 8 years ago
> Could I contribute by my self by providing a patch?
Yes.

> Could you give a fast clue what java class I should dig for a patch?
CreateIndex and Schema.getUniqueIndexName / getUniqueName

Original comment by thomas.t...@gmail.com on 7 Oct 2009 at 7:00

GoogleCodeExporter commented 8 years ago
Moved to the roadmap.

Original comment by thomas.t...@gmail.com on 7 Oct 2009 at 7:02