Remove versions from logicFunction (#17540)
## Summary - Remove `latestVersion` and `publishedVersions` columns from `LogicFunction` entity - Remove version parameter from logic function execution, build, and source code retrieval - Update all related services, DTOs, utilities, and tests - Add database migration to drop the version columns
This commit is contained in:
-2
@@ -7,8 +7,6 @@ export const LOGIC_FUNCTION_FRAGMENT = gql`
|
||||
description
|
||||
runtime
|
||||
timeoutSeconds
|
||||
latestVersion
|
||||
publishedVersions
|
||||
sourceHandlerPath
|
||||
builtHandlerPath
|
||||
handlerName
|
||||
|
||||
+1
-3
@@ -8,11 +8,9 @@ import {
|
||||
|
||||
export const useGetOneLogicFunctionSourceCode = ({
|
||||
id,
|
||||
version,
|
||||
onCompleted,
|
||||
}: {
|
||||
id: string;
|
||||
version: string;
|
||||
onCompleted?: (data: FindOneLogicFunctionSourceCodeQuery) => void;
|
||||
}) => {
|
||||
const apolloMetadataClient = useApolloCoreClient();
|
||||
@@ -22,7 +20,7 @@ export const useGetOneLogicFunctionSourceCode = ({
|
||||
>(FIND_ONE_LOGIC_FUNCTION_SOURCE_CODE, {
|
||||
client: apolloMetadataClient ?? undefined,
|
||||
variables: {
|
||||
input: { id, version },
|
||||
input: { id },
|
||||
},
|
||||
onCompleted,
|
||||
fetchPolicy: 'network-only',
|
||||
|
||||
-3
@@ -28,10 +28,8 @@ type SetLogicFunctionFormValues = Dispatch<
|
||||
|
||||
export const useLogicFunctionUpdateFormState = ({
|
||||
logicFunctionId,
|
||||
logicFunctionVersion = 'draft',
|
||||
}: {
|
||||
logicFunctionId: string;
|
||||
logicFunctionVersion?: string;
|
||||
}): {
|
||||
formValues: LogicFunctionFormValues;
|
||||
logicFunction: LogicFunction | null;
|
||||
@@ -67,7 +65,6 @@ export const useLogicFunctionUpdateFormState = ({
|
||||
const { loading: logicFunctionSourceCodeLoading } =
|
||||
useGetOneLogicFunctionSourceCode({
|
||||
id: logicFunctionId,
|
||||
version: logicFunctionVersion,
|
||||
onCompleted: async (data: FindOneLogicFunctionSourceCodeQuery) => {
|
||||
const code = data?.getLogicFunctionSourceCode;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user