mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-17 13:05:49 +00:00
extend the size of the description col for visit
This commit is contained in:
parent
bd5dd27f88
commit
d5b9faa379
3 changed files with 4 additions and 5 deletions
|
@ -17,8 +17,6 @@ package org.springframework.samples.petclinic.model;
|
|||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import org.hibernate.validator.constraints.NotEmpty;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
|
@ -27,6 +25,7 @@ import javax.persistence.ManyToOne;
|
|||
import javax.persistence.Table;
|
||||
import javax.persistence.Temporal;
|
||||
import javax.persistence.TemporalType;
|
||||
import javax.validation.constraints.Size;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
|
@ -49,7 +48,7 @@ public class Visit extends BaseEntity {
|
|||
/**
|
||||
* Holds value of property description.
|
||||
*/
|
||||
@NotEmpty
|
||||
@Size(max = 8192)
|
||||
@Column(name = "description")
|
||||
private String description;
|
||||
|
||||
|
|
|
@ -58,7 +58,7 @@ CREATE TABLE visits (
|
|||
id INTEGER IDENTITY PRIMARY KEY,
|
||||
pet_id INTEGER NOT NULL,
|
||||
visit_date DATE,
|
||||
description VARCHAR(255)
|
||||
description VARCHAR(8192)
|
||||
);
|
||||
ALTER TABLE visits ADD CONSTRAINT fk_visits_pets FOREIGN KEY (pet_id) REFERENCES pets (id);
|
||||
CREATE INDEX visits_pet_id ON visits (pet_id);
|
||||
|
|
|
@ -55,6 +55,6 @@ CREATE TABLE IF NOT EXISTS visits (
|
|||
id INT(4) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
|
||||
pet_id INT(4) UNSIGNED NOT NULL,
|
||||
visit_date DATE,
|
||||
description VARCHAR(255),
|
||||
description VARCHAR(8192),
|
||||
FOREIGN KEY (pet_id) REFERENCES pets(id)
|
||||
) engine=InnoDB;
|
Loading…
Reference in a new issue