- Added a new module for managing variables, including creation, retrieval, updating, and deletion functionalities. - Implemented a new API endpoint for variable operations, allowing users to interact with variables through HTTP requests. - Enhanced the configuration reference system to support variable references, replacing the previous KV reference system. - Updated existing workflows and scripts to utilize the new variable management features, improving flexibility in configuration handling. - Introduced smoke tests to validate the functionality of the variable system, ensuring reliability and robustness. This update significantly enhances the ability to manage dynamic variables within workflows, improving overall usability and maintainability.
27 lines
657 B
JavaScript
27 lines
657 B
JavaScript
/**
|
|
* @param {import("knex").Knex} knex
|
|
*/
|
|
export async function up(knex) {
|
|
await knex.schema.createTable("variables", (t) => {
|
|
t.text("id").primary();
|
|
t.text("owner").notNullable();
|
|
t.text("name").notNullable();
|
|
t.text("type").notNullable();
|
|
t.text("value").notNullable();
|
|
t.text("created_at").notNullable();
|
|
t.text("updated_at").notNullable();
|
|
t.unique(["owner", "name"]);
|
|
});
|
|
|
|
await knex.schema.raw(
|
|
"CREATE INDEX variables_owner_name_idx ON variables (owner, name)",
|
|
);
|
|
}
|
|
|
|
/**
|
|
* @param {import("knex").Knex} knex
|
|
*/
|
|
export async function down(knex) {
|
|
await knex.schema.dropTableIfExists("variables");
|
|
}
|