-
-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Foreign & Indexes support #950
Comments
Hi, The syntax of the commands that create indexes and foreign keys is very flexible and unsuitable to be expressed in annotations. To create indexes and foreign keys, please use the executeScript function: val query = QueryDsl.executeScript("CREATE INDEX part_of_name ON customer (name(10));")
db.runQuery(query) |
Doesn't have to be annotations... (although it would be nice...), it could be some kind of DdlDsl or maybe a builder on the Otherwise, we loose some of the beauty of Komapper's support for multiple dbs... we can't use the same code to create the indexes between dbs (like for a production/staging or testing db -- testing dbs by us are in H2 for speed unless specific db features are needed...) |
I believe that the development environment should use the same type of database as the production environment. |
I use Testcontainers before a release... but while doing TDD it's too slow. H2 is sufficient for TDD and before a release, running with a real db just to make sure. |
Use case
https://dev.mysql.com/doc/refman/8.0/en/mysql-indexes.html
https://dev.mysql.com/doc/refman/8.0/en/create-table-foreign-keys.html
Describe the solution you'd like
Annotations like @KomapperIndex and @KomapperKey.
The text was updated successfully, but these errors were encountered: