feat(libsql): implement libsql service schema and update related components

- Created a new SQL type for 'libsql' and established a corresponding table with necessary fields and constraints.
- Updated existing tables (backup, mount, volume_backup) to include foreign key references to 'libsql'.
- Enhanced the libsql schema in the application to support additional fields such as stopGracePeriodSwarm and endpointSpecSwarm.
- Adjusted form handling and validation to accommodate the new libsql service type, improving overall integration and functionality.
This commit is contained in:
Mauricio Siu
2026-03-23 21:51:02 -06:00
parent cf25c17c20
commit c752cf3f9e
11 changed files with 58 additions and 115 deletions

View File

@@ -8,6 +8,7 @@ import {
keepLatestNBackups,
runCommand,
runComposeBackup,
runLibsqlBackup,
runMariadbBackup,
runMongoBackup,
runMySqlBackup,
@@ -38,6 +39,7 @@ export const runJobs = async (job: QueueJob) => {
mysql,
mongo,
mariadb,
libsql,
compose,
backupType,
} = backup;
@@ -75,6 +77,14 @@ export const runJobs = async (job: QueueJob) => {
}
await runMariadbBackup(mariadb, backup);
await keepLatestNBackups(backup, server.serverId);
} else if (databaseType === "libsql" && libsql) {
const server = await findServerById(libsql.serverId as string);
if (server.serverStatus === "inactive") {
logger.info("Server is inactive");
return;
}
await runLibsqlBackup(libsql, backup);
await keepLatestNBackups(backup, server.serverId);
}
} else if (backupType === "compose" && compose) {
const server = await findServerById(compose.serverId as string);
@@ -141,6 +151,7 @@ export const initializeJobs = async () => {
mysql: true,
postgres: true,
mongo: true,
libsql: true,
compose: true,
},
});