Skip to content

Commit

Permalink
Commit with changes columns length to 255 and validation max length i…
Browse files Browse the repository at this point in the history
…n dto and entity (#1212)

Co-authored-by: Helen Sotnik <[email protected]>
HelenSotnik and Helen Sotnik authored Aug 9, 2023

Verified

This commit was signed with the committer’s verified signature. The key has expired.
DRSchlaubi Michael Rittmeister
1 parent cee8928 commit 1f1058a
Showing 5 changed files with 18 additions and 4 deletions.
4 changes: 2 additions & 2 deletions dao/src/main/java/greencity/entity/order/Service.java
Original file line number Diff line number Diff line change
@@ -40,10 +40,10 @@ public class Service {
@Column(nullable = false)
private Long price;

@Column(nullable = false, length = 30)
@Column(nullable = false)
private String name;

@Column(nullable = false, length = 30)
@Column(nullable = false)
private String nameEng;

@Column(nullable = false)
Original file line number Diff line number Diff line change
@@ -215,4 +215,5 @@
<include file="/db/changelog/logs/ch-upd-notification-templates-titles-Lenets.xml"/>
<include file="db/changelog/logs/ch-add-table-refunds-Bondar.xml"/>
<include file="db/changelog/logs/2023-08-07-change-service-name-column-length.xml"/>
<include file="db/changelog/logs/2023-08-08-change-bag-name-column-length.xml"/>
</databaseChangeLog>
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.4.xsd">
<changeSet id="change-bag-name-column-length.xml" author="Olena Sotnik">
<sqlFile path="db/changelog/sql/bag-name-length-change.sql"/>
<comment>Changed bag name and name_eng columns length from 30 to 255 chars</comment>
</changeSet>
</databaseChangeLog>
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
ALTER TABLE bag
ALTER COLUMN name TYPE varchar(255);
ALTER TABLE bag
ALTER COLUMN name_eng TYPE varchar(255);
Original file line number Diff line number Diff line change
@@ -22,11 +22,11 @@
@ToString
public class ServiceDto {
@NotBlank
@Length(max = 30)
@Length(max = 255)
private String name;

@NotBlank
@Length(max = 30)
@Length(max = 255)
private String nameEng;

@NotBlank

0 comments on commit 1f1058a

Please sign in to comment.