- Introduced a new server package with Fastify for handling API requests and workflows. - Implemented user authentication and authorization with JWT and cookie management. - Added endpoints for managing workflows, runs, and user accounts. - Established a dashboard for monitoring workflow status and statistics. - Included a script sandbox for executing user-defined scripts securely. - Updated README with setup instructions and API documentation. - Configured database migrations for user management. - Enhanced logging capabilities for better traceability.
21 lines
499 B
JavaScript
21 lines
499 B
JavaScript
/**
|
|
* @param {import("knex").Knex} knex
|
|
*/
|
|
export async function up(knex) {
|
|
await knex.schema.createTable("users", (t) => {
|
|
t.text("id").primary();
|
|
t.text("username").notNullable().unique();
|
|
t.text("password_hash").notNullable();
|
|
t.text("role").notNullable();
|
|
t.text("created_at").notNullable();
|
|
t.text("updated_at").notNullable();
|
|
});
|
|
}
|
|
|
|
/**
|
|
* @param {import("knex").Knex} knex
|
|
*/
|
|
export async function down(knex) {
|
|
await knex.schema.dropTableIfExists("users");
|
|
}
|