Skip to content

Commit

Permalink
rename file column
Browse files Browse the repository at this point in the history
  • Loading branch information
lucas-amiaud committed Oct 20, 2023
1 parent dcdef6a commit cc73732
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/main/java/com/coreoz/db/generated/QUserFile.java
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ public QUserFile(PathMetadata metadata) {
}

public void addMetadata() {
addMetadata(excelUniqueName, ColumnMetadata.named("EXCEL_UNIQUE_NAME").withIndex(3).ofType(Types.VARCHAR).withSize(255).notNull());
addMetadata(pictureUniqueName, ColumnMetadata.named("PICTURE_UNIQUE_NAME").withIndex(2).ofType(Types.VARCHAR).withSize(255).notNull());
addMetadata(excelUniqueName, ColumnMetadata.named("FILE_EXCEL_FILENAME").withIndex(3).ofType(Types.VARCHAR).withSize(255).notNull());
addMetadata(pictureUniqueName, ColumnMetadata.named("FILE_PICTURE_FILENAME").withIndex(2).ofType(Types.VARCHAR).withSize(255).notNull());
addMetadata(userId, ColumnMetadata.named("USER_ID").withIndex(1).ofType(Types.BIGINT).withSize(64).notNull());
}

Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/coreoz/db/generated/UserFile.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
@Generated("com.coreoz.plume.db.querydsl.generation.IdBeanSerializer")
public class UserFile {

@Column("EXCEL_UNIQUE_NAME")
@Column("FILE_EXCEL_FILENAME")
private String excelUniqueName;

@Column("PICTURE_UNIQUE_NAME")
@Column("FILE_PICTURE_FILENAME")
private String pictureUniqueName;

@JsonSerialize(using=com.fasterxml.jackson.databind.ser.std.ToStringSerializer.class)
Expand Down
8 changes: 4 additions & 4 deletions src/main/resources/db/migration/V3__setup_plume_file.sql
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ CREATE TABLE `PLM_FILE_DATA`
CREATE TABLE `SWC_USER_FILE`
(
`user_id` bigint(20) NOT NULL,
`picture_unique_name` VARCHAR(255) NOT NULL,
`excel_unique_name` VARCHAR(255) NOT NULL,
`file_picture_filename` VARCHAR(255) NOT NULL,
`file_excel_filename` VARCHAR(255) NOT NULL,
FOREIGN KEY (user_id) REFERENCES PLM_USER (id),
FOREIGN KEY (picture_unique_name) REFERENCES PLM_FILE (unique_name),
FOREIGN KEY (excel_unique_name) REFERENCES PLM_FILE (unique_name)
FOREIGN KEY (file_picture_filename) REFERENCES PLM_FILE (unique_name),
FOREIGN KEY (file_excel_filename) REFERENCES PLM_FILE (unique_name)
) DEFAULT CHARSET = utf8;

-- DATA EXAMPLE
Expand Down

0 comments on commit cc73732

Please sign in to comment.