Skip to content

Commit cd3e5f1

Browse files
committed
drop: removed persistance of flow signature
1 parent e5d1bde commit cd3e5f1

16 files changed

Lines changed: 20 additions & 38 deletions

File tree

app/graphql/types/flow_type.rb

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,6 @@ class FlowType < Types::BaseObject
2323
null: false,
2424
method: :flow_settings,
2525
description: 'The settings of the flow'
26-
field :signature, String,
27-
null: false,
28-
description: 'The signature of the flow'
2926
field :starting_node_id, Types::GlobalIdType[::NodeFunction],
3027
null: true,
3128
description: 'The ID of the starting node of the flow'

app/graphql/types/input/flow_input_type.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@ class FlowInputType < Types::BaseInputObject
1717

1818
argument :type, Types::GlobalIdType[::FlowType], required: true,
1919
description: 'The identifier of the flow type'
20-
21-
argument :signature, String, required: false, description: 'The signature of the flow'
2220
end
2321
end
2422
end

app/models/flow.rb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,6 @@ class Flow < ApplicationRecord
4141
allow_blank: false,
4242
uniqueness: { case_sensitive: false, scope: :project_id }
4343

44-
validates :signature, presence: true, length: { maximum: 500 }
45-
4644
scope :enabled, -> { where(disabled_reason: nil) }
4745
scope :disabled, -> { where.not(disabled_reason: nil) }
4846

@@ -61,7 +59,7 @@ def to_grpc
6159
settings: flow_settings.map(&:to_grpc),
6260
starting_node_id: starting_node&.id,
6361
node_functions: node_functions.map(&:to_grpc),
64-
signature: signature
62+
signature: flow_type.signature
6563
)
6664
end
6765

app/services/namespaces/projects/flows/create_service.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,7 @@ def execute
3838
flow = Flow.new(
3939
project: namespace_project,
4040
name: flow_input.name,
41-
flow_type: flow_type,
42-
signature: flow_input.signature.presence || flow_type.signature
41+
flow_type: flow_type
4342
)
4443

4544
unless flow.save

app/services/namespaces/projects/flows/update_service.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ def update_flow(t)
4848

4949
def update_flow_attributes
5050
flow.name = flow_input.name
51-
flow.signature = flow_input.signature if flow_input.signature.present?
5251
flow.validation_status = :unvalidated
5352
end
5453

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# frozen_string_literal: true
2+
3+
class RemoveSignatureFromFlows < Code0::ZeroTrack::Database::Migration[1.0]
4+
def change
5+
remove_column :flows, :signature, :text, if_exists: true
6+
end
7+
end
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
68074a1fb7f8bdf3087c3b6823eaef35175c480f05d4bc73c190ef7b2811cf68

db/structure.sql

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -361,9 +361,7 @@ CREATE TABLE flows (
361361
created_at timestamp with time zone NOT NULL,
362362
updated_at timestamp with time zone NOT NULL,
363363
validation_status integer DEFAULT 0 NOT NULL,
364-
disabled_reason integer,
365-
signature text DEFAULT ''::text NOT NULL,
366-
CONSTRAINT check_8c731c24ec CHECK ((char_length(signature) <= 500))
364+
disabled_reason integer
367365
);
368366

369367
CREATE SEQUENCE flows_id_seq

docs/graphql/input_object/flowinput.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,5 @@ Input type for creating or updating a flow
1111
| `name` | [`String!`](../scalar/string.md) | The name of the flow |
1212
| `nodes` | [`[NodeFunctionInput!]!`](../input_object/nodefunctioninput.md) | The node functions of the flow |
1313
| `settings` | [`[FlowSettingInput!]`](../input_object/flowsettinginput.md) | The settings of the flow |
14-
| `signature` | [`String`](../scalar/string.md) | The signature of the flow |
1514
| `startingNodeId` | [`NodeFunctionID`](../scalar/nodefunctionid.md) | The starting node of the flow |
1615
| `type` | [`FlowTypeID!`](../scalar/flowtypeid.md) | The identifier of the flow type |

docs/graphql/object/flow.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ Represents a flow
1717
| `nodes` | [`NodeFunctionConnection!`](../object/nodefunctionconnection.md) | Nodes of the flow |
1818
| `project` | [`NamespaceProject!`](../object/namespaceproject.md) | The project the flow belongs to |
1919
| `settings` | [`FlowSettingConnection!`](../object/flowsettingconnection.md) | The settings of the flow |
20-
| `signature` | [`String!`](../scalar/string.md) | The signature of the flow |
2120
| `startingNodeId` | [`NodeFunctionID`](../scalar/nodefunctionid.md) | The ID of the starting node of the flow |
2221
| `type` | [`FlowType!`](../object/flowtype.md) | The flow type of the flow |
2322
| `updatedAt` | [`Time!`](../scalar/time.md) | Time when this Flow was last updated |

0 commit comments

Comments
 (0)