mirror of
https://github.com/Dokploy/dokploy.git
synced 2026-07-07 06:55:23 +02:00
feat(libsql): introduce libsql service schema and update related tables
- Created a new SQL type for 'libsql' and added it to the serviceType enum. - Established a 'libsql' table with necessary fields and constraints. - Updated existing tables (backup, mount, volume_backup) to include foreign key references to 'libsql'. - Adjusted the mount schema to incorporate 'libsql' as a valid service type, enhancing service management capabilities.
This commit is contained in:
@@ -3,6 +3,7 @@ import {
|
||||
deleteMount,
|
||||
findApplicationById,
|
||||
findComposeById,
|
||||
findLibsqlById,
|
||||
findMariadbById,
|
||||
findMongoById,
|
||||
findMountById,
|
||||
@@ -13,7 +14,7 @@ import {
|
||||
getServiceContainer,
|
||||
updateMount,
|
||||
} from "@dokploy/server";
|
||||
import type { ServiceType } from "@dokploy/server/services/mount";
|
||||
import type { ServiceType } from "@dokploy/server/db/schema/mount";
|
||||
import {
|
||||
checkServiceAccess,
|
||||
checkServicePermissionAndAccess,
|
||||
@@ -63,6 +64,10 @@ async function getServiceOrganizationId(
|
||||
const compose = await findComposeById(serviceId);
|
||||
return compose?.environment?.project?.organizationId ?? null;
|
||||
}
|
||||
case "libsql": {
|
||||
const libsql = await findLibsqlById(serviceId);
|
||||
return libsql?.environment?.project?.organizationId ?? null;
|
||||
}
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
@@ -169,7 +174,6 @@ export const mountRouter = createTRPCRouter({
|
||||
listByServiceId: protectedProcedure
|
||||
.input(apiFindMountByApplicationId)
|
||||
.query(async ({ input, ctx }) => {
|
||||
console.log("input", input);
|
||||
await checkServiceAccess(ctx, input.serviceId, "read");
|
||||
const organizationId = await getServiceOrganizationId(
|
||||
input.serviceId,
|
||||
|
||||
Reference in New Issue
Block a user