Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Longtext fix #70

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this one is actually required for large queries

Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ public class ExecutionCommand {
@GeneratedValue
Long id;

@Column(columnDefinition = "text")
@Column(columnDefinition = "longtext")
String template = null;
@JsonBackReference
@OneToOne(fetch = FetchType.EAGER, mappedBy = "command")
Test test;
@ElementCollection(fetch = FetchType.EAGER)
@CollectionTable(name="command_statements", joinColumns=@JoinColumn(name="command_id"))
@Column(name="statement", columnDefinition = "text")
@Column(name="statement", columnDefinition = "longtext")
@OrderColumn(name="statement_index")
List<String> statements = new ArrayList<>();

Expand Down
6 changes: 3 additions & 3 deletions src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ spring.mvc.pathmatch.matching-strategy= ANT_PATH_MATCHER
spring.security.user.name=user
spring.security.user.password=password
# REST API max request file size
spring.servlet.multipart.max-file-size=1GB
spring.servlet.multipart.max-request-size=1GB
spring.servlet.multipart.max-file-size=2GB
spring.servlet.multipart.max-request-size=2GB

# Handles X-Forwarded-XXX headers
# Support additional web proxy headers
Expand Down Expand Up @@ -144,4 +144,4 @@ spring.cloud.vault.enabled=false
#spring.cloud.vault.scheme=http
#spring.cloud.vault.kv.enabled=true
#spring.config.import=consul:localhost:8500,vault://
#spring.cloud.vault.uri=http://localhost:8200
#spring.cloud.vault.uri=http://localhost:8200
6 changes: 3 additions & 3 deletions src/main/resources/sql/create-resource-tables.sql
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I actually don't think this change is required. We obviously want it to be greater than 333 but I think that was the maximum that mysql engine would allow at the time. Regardless, I think SI has already extended the max term length so this is likely not needed

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
drop table if exists res_us_gb_terms;
create table res_us_gb_terms (
us_term varchar(255),
gb_term varchar(255)
us_term VARCHAR(333),
gb_term VARCHAR(333)
)engine=myisam default charset=utf8;
create index idx_res_usTermMap on res_us_gb_terms(us_term);
create index idx_res_gbTermMap on res_us_gb_terms(gb_term);
Expand All @@ -10,7 +10,7 @@ create index idx_res_gbTermMap on res_us_gb_terms(gb_term);
drop table if exists res_casesensitiveTerm;

create table res_casesensitiveTerm(
casesensitiveTerm VARCHAR(255) not null
casesensitiveTerm VARCHAR(333) not null
)engine=myisam default charset=utf8;
create index idx_casesensitiveTerm on res_casesensitiveTerm(casesensitiveTerm);