Skip to content

Commit 804bb02

Browse files
committed
feat: create tables
1 parent 1799689 commit 804bb02

File tree

2 files changed

+21
-7
lines changed

2 files changed

+21
-7
lines changed

backend/src/main/java/ch/xxx/aidoclibchat/domain/model/entity/Document.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ public class Document {
1313
@GeneratedValue(strategy=GenerationType.SEQUENCE)
1414
private Long id;
1515
private String documentName;
16-
private DocumentType DocumentType;
16+
private DocumentType documentType;
1717
@Lob
1818
private byte[] documentContent;
1919

@@ -34,11 +34,11 @@ public void setDocumentName(String documentName) {
3434
}
3535

3636
public DocumentType getDocumentType() {
37-
return DocumentType;
37+
return documentType;
3838
}
3939

40-
public void setDocumentType(DocumentType DocumentType) {
41-
this.DocumentType = DocumentType;
40+
public void setDocumentType(DocumentType documentType) {
41+
this.documentType = documentType;
4242
}
4343

4444
public byte[] getDocumentContent() {

backend/src/main/resources/db/changelog/changes/db.changelog-1.xml

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,22 @@
1414
<changeSet author="angular2guy" id="1">
1515
<sql>CREATE EXTENSION vector;</sql>
1616
</changeSet>
17-
<!--
18-
<createSequence sequenceName="document_SEQ" incrementBy="50"
17+
<changeSet author="angular2guy" id="2">
18+
<createTable tableName="document">
19+
<column name="id" type="bigint">
20+
<constaints primaryKey="true"/>
21+
</column>
22+
<column name="document_name" type="varchar(255)">
23+
<constaints notNullConstraintName="document_document_name" nullable="false"/>
24+
</column>
25+
<column name="document_type" type="varchar(25)">
26+
<constaints notNullConstraintName="document_document_type" nullable="false"/>
27+
</column>
28+
<column name="document_content" type="blob"/>
29+
</createTable>
30+
</changeSet>
31+
<changeSet autor="angular2guy" id="3">
32+
<createSequence sequenceName="document_SEQ" incrementBy="50"
1933
startValue="1000" />
20-
-->
34+
</changeSet>
2135
</databaseChangeLog>

0 commit comments

Comments
 (0)