Skip to content

Commit

Permalink
Increase document sod data limits
Browse files Browse the repository at this point in the history
  • Loading branch information
J3imip committed Dec 11, 2024
1 parent 4c9f24c commit cb354a2
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 6 deletions.
21 changes: 21 additions & 0 deletions internal/assets/migrations/002_limits_increase.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
-- +migrate Up

alter table document_sod
alter column dg15 type varchar(32760),
alter column signed_attributes type varchar(65536),
alter column encapsulated_content type varchar(65536),
alter column signature type varchar(16384),
alter column aa_signature type varchar(16384),
alter column pem_file type varchar(65536),
alter column error type varchar(16384);

-- +migrate Down

alter table document_sod
alter column dg15 type varchar(512),
alter column signed_attributes type varchar(512),
alter column encapsulated_content type varchar(4096),
alter column signature type varchar(4096),
alter column aa_signature type varchar(4096),
alter column pem_file type varchar(4096),
alter column error type varchar(1024);
12 changes: 6 additions & 6 deletions internal/service/api/requests/register.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,31 +45,31 @@ func validateRegister(r resources.RegisterResponse) error {
})),
"/data/attributes/document_sod/dg15": validation.Validate(
r.Data.Attributes.DocumentSod.Dg15,
validation.Length(0, 512),
validation.Length(0, 32760),
),
"/data/attributes/document_sod/signed_attributes": validation.Validate(
r.Data.Attributes.DocumentSod.SignedAttributes,
validation.Required,
validation.Length(1, 512),
validation.Length(0, 65536),
),
"/data/attributes/document_sod/encapsulated_content": validation.Validate(
r.Data.Attributes.DocumentSod.EncapsulatedContent,
validation.Required,
validation.Length(1, 4096),
validation.Length(0, 65536),
),
"/data/attributes/document_sod/signature": validation.Validate(
r.Data.Attributes.DocumentSod.Signature,
validation.Required,
validation.Length(1, 4096),
validation.Length(0, 16384),
),
"/data/attributes/document_sod/aa_signature": validation.Validate(
r.Data.Attributes.DocumentSod.AaSignature,
validation.Length(0, 4096),
validation.Length(0, 16384),
),
"/data/attributes/document_sod/pem_file": validation.Validate(
r.Data.Attributes.DocumentSod.PemFile,
validation.Required,
validation.Length(1, 4096),
validation.Length(0, 65536),
),
"/data/attributes/zk_proof/proof": validation.Validate(
r.Data.Attributes.ZkProof.Proof,
Expand Down

0 comments on commit cb354a2

Please sign in to comment.