Skip to main content
Version: Current

Tables - migration

Before version 7.2, Genesis you had to define fields in their own dictionary file, separately from tables.

From version 7.2, Genesis supports a new syntax where fields are defined inline in the table.

We went from this...

table(name = "RIGHT", id = 1004) {
CODE
DESCRIPTION
primaryKey {
CODE
}
}

...to this:

table(name = "RIGHT", id = 1004) {
field("CODE").primaryKey()
field("DESCRIPTION")
}

To help you migrate to the new syntax, Genesis provides a gradle plugin.

To start, add the following line to the top of the build.gradle.kts file in your -config module:

plugins {
id("global.genesis.dictionary.upgrade")
}

After doing a Gradle refresh, a new task: updateTablesDictionary is available in the Gradle task list, under genesis. To migrate the table dictionaries in your config module, run the task.