w

    wouterdoeland

    5 years ago
    Hi, is it possible to add a unique key that consists of multiple fields?
    tapac

    tapac

    5 years ago
    You may use uniqueIndex() or index within Table init{} block:
    val t = object : Table("t1") {
                val type = varchar("type", 255)
                val name = varchar("name", 255)
                init {
                    index(true, name, type)
                    uniqueIndex(type, name)
                }
            }