Configure a table definition

In this topic, you learn how to configure a table definition for a database table in Table Definition.

Prerequisites

  • There are no prerequisites.

Procedure

  1. In the Cockpit, go to Tools and click Table Definition.

  2. Click Add to create a new database table.

  3. Enter a meaningful Name.

  4. Enter a short and meaningful Description.

  5. If you want to track logs of your database table in the Table Audit, activate Enable Table Audit.

  6. If you are working on a development package, you can include the metadata when using Git.

  7. Click Save.

You can bring in an entire schema by clicking on the Import option. This file must be in JSON format and follow this structure:

{
    "id": "7f846de3-e908-4ff8-9543-e9b1d1f8a83b",
    "createdAt": "2023-08-10T09:04:04.000Z",
    "updatedAt": "2023-08-15T12:48:52.000Z",
    "createdBy": "admin",
    "changedBy": "admin",
    "fields": [
        {
            "id": "8657c879-7176-4758-c769-cb19b8bb080f",
            "fieldName": "names",
            "fieldType": "text",
            "isUnique": false,
            "default": "",
            "isNullable": false
        },
        {
            "id": "e0165030-828c-4c2a-d197-e6a208eed19e",
            "fieldName": "age",
            "fieldType": "integer",
            "isUnique": false,
            "default": "",
            "isNullable": false
        },
        {
            "id": "73b6f6a2-2cc2-47b4-d953-1e5d810fa477",
            "fieldName": "uniqueID",
            "fieldType": "smalltext",
            "isUnique": false,
            "isNullable": false
        },
        {
            "id": "da8f4c73-7031-4edd-b296-3805e4560faf",
            "fieldName": "city",
            "fieldType": "text",
            "isUnique": false
        }
    ],
    "indices": [
        {
            "id": "2521a619-ce14-4747-ad02-69753405870c",
            "name": "IDX_560eafa3f4f83ed5a93648b75d",
            "columns": [
                {
                    "id": "73b6f6a2-2cc2-47b4-d953-1e5d810fa477",
                    "fieldName": "uniqueID",
                    "fieldType": "smalltext",
                    "isUnique": false,
                    "isNullable": false
                }
            ],
            "isUnique": false
        }
    ],
    "foreignKeys": [],
    "name": "test",
    "description": null,
    "ver": "23.8.15.1548",
    "enableAudit": false,
    "includeDataInPackage": false,
    "package": null,
    "rolesRead": [],
    "rolesWrite": []
}