This documentation describes the database configuration file for the capsule, in case you want to create your own models.
The configuration uses TOML format to define database schema changes and structure. It really similar to liquibase and permit versionning of the database.
Configuration Header
version = "1.0.0"
changeSetId = "20241214-01"
author = "steevy"
description = "Initial schema setup"
database = "capsule-kit"
Header Fields
Field
Description
Example
version
Schema version number
1.0.0
changeSetId
Unique identifier for the changeset
20241214-01
author
Author of the changes
steevy
description
Brief description of changes
Initial schema setup
database
Target database name
capsule-kit
Schema Structure
Operations
The operations tag is the main tag to define an action to be performed on the database.
[[operations]]
type = "createTable"
tableName = "caplet"
Operations Fields
Field
Data Type
Description
type
text
The operation type to execute against the database
tableName
text
Name of the table to execute the operatio against
columns
List [ColumnDefinition]
Definitions of the columns in the table
foreignKeys
List [ForeignKeyDefinition]
Definitions of the foreign keys in the table
Operations Type
Can be of value :
createTable
dropTable
alterTable
Columns Définitions
{ name = “id”, type = “text”, constraints = { primaryKey = true, nullable = false } },