diff --git a/internal/assets/migrations/002_limits_increase.sql b/internal/assets/migrations/002_limits_increase.sql new file mode 100644 index 0000000..aa77fd1 --- /dev/null +++ b/internal/assets/migrations/002_limits_increase.sql @@ -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); diff --git a/internal/service/api/requests/register.go b/internal/service/api/requests/register.go index d4353b5..b15ac7d 100644 --- a/internal/service/api/requests/register.go +++ b/internal/service/api/requests/register.go @@ -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,