diff --git a/dao/generated-src/jooq/main/java/com/databasir/dao/Databasir.java b/dao/generated-src/jooq/main/java/com/databasir/dao/Databasir.java index 22dba22..54ca3e2 100644 --- a/dao/generated-src/jooq/main/java/com/databasir/dao/Databasir.java +++ b/dao/generated-src/jooq/main/java/com/databasir/dao/Databasir.java @@ -8,6 +8,7 @@ import com.databasir.dao.tables.DataSource; import com.databasir.dao.tables.DataSourceProperty; import com.databasir.dao.tables.DatabaseDocument; import com.databasir.dao.tables.DatabaseType; +import com.databasir.dao.tables.DocumentDescription; import com.databasir.dao.tables.DocumentDiscussion; import com.databasir.dao.tables.Group; import com.databasir.dao.tables.Login; @@ -66,6 +67,11 @@ public class Databasir extends SchemaImpl { */ public final DatabaseType DATABASE_TYPE = DatabaseType.DATABASE_TYPE; + /** + * custom document description + */ + public final DocumentDescription DOCUMENT_DESCRIPTION = DocumentDescription.DOCUMENT_DESCRIPTION; + /** * The table databasir.document_discussion. */ @@ -166,6 +172,7 @@ public class Databasir extends SchemaImpl { DataSourceProperty.DATA_SOURCE_PROPERTY, DatabaseDocument.DATABASE_DOCUMENT, DatabaseType.DATABASE_TYPE, + DocumentDescription.DOCUMENT_DESCRIPTION, DocumentDiscussion.DOCUMENT_DISCUSSION, Group.GROUP, Login.LOGIN, diff --git a/dao/generated-src/jooq/main/java/com/databasir/dao/Keys.java b/dao/generated-src/jooq/main/java/com/databasir/dao/Keys.java index 1d0581d..e89d050 100644 --- a/dao/generated-src/jooq/main/java/com/databasir/dao/Keys.java +++ b/dao/generated-src/jooq/main/java/com/databasir/dao/Keys.java @@ -8,6 +8,7 @@ import com.databasir.dao.tables.DataSource; import com.databasir.dao.tables.DataSourceProperty; import com.databasir.dao.tables.DatabaseDocument; import com.databasir.dao.tables.DatabaseType; +import com.databasir.dao.tables.DocumentDescription; import com.databasir.dao.tables.DocumentDiscussion; import com.databasir.dao.tables.Group; import com.databasir.dao.tables.Login; @@ -28,6 +29,7 @@ import com.databasir.dao.tables.records.DataSourcePropertyRecord; import com.databasir.dao.tables.records.DataSourceRecord; import com.databasir.dao.tables.records.DatabaseDocumentRecord; import com.databasir.dao.tables.records.DatabaseTypeRecord; +import com.databasir.dao.tables.records.DocumentDescriptionRecord; import com.databasir.dao.tables.records.DocumentDiscussionRecord; import com.databasir.dao.tables.records.GroupRecord; import com.databasir.dao.tables.records.LoginRecord; @@ -68,6 +70,8 @@ public class Keys { public static final UniqueKey KEY_DATABASE_DOCUMENT_PRIMARY = Internal.createUniqueKey(DatabaseDocument.DATABASE_DOCUMENT, DSL.name("KEY_database_document_PRIMARY"), new TableField[] { DatabaseDocument.DATABASE_DOCUMENT.ID }, true); public static final UniqueKey KEY_DATABASE_TYPE_PRIMARY = Internal.createUniqueKey(DatabaseType.DATABASE_TYPE, DSL.name("KEY_database_type_PRIMARY"), new TableField[] { DatabaseType.DATABASE_TYPE.ID }, true); public static final UniqueKey KEY_DATABASE_TYPE_UK_DATABASE_TYPE_DELETED_DELETED_TOKEN = Internal.createUniqueKey(DatabaseType.DATABASE_TYPE, DSL.name("KEY_database_type_uk_database_type_deleted_deleted_token"), new TableField[] { DatabaseType.DATABASE_TYPE.DATABASE_TYPE_, DatabaseType.DATABASE_TYPE.DELETED, DatabaseType.DATABASE_TYPE.DELETED_TOKEN }, true); + public static final UniqueKey KEY_DOCUMENT_DESCRIPTION_PRIMARY = Internal.createUniqueKey(DocumentDescription.DOCUMENT_DESCRIPTION, DSL.name("KEY_document_description_PRIMARY"), new TableField[] { DocumentDescription.DOCUMENT_DESCRIPTION.ID }, true); + public static final UniqueKey KEY_DOCUMENT_DESCRIPTION_UK_PROJECT_ID_TABLE_NAME_COLUMN_NAME = Internal.createUniqueKey(DocumentDescription.DOCUMENT_DESCRIPTION, DSL.name("KEY_document_description_uk_project_id_table_name_column_name"), new TableField[] { DocumentDescription.DOCUMENT_DESCRIPTION.PROJECT_ID, DocumentDescription.DOCUMENT_DESCRIPTION.TABLE_NAME, DocumentDescription.DOCUMENT_DESCRIPTION.COLUMN_NAME }, true); public static final UniqueKey KEY_DOCUMENT_DISCUSSION_PRIMARY = Internal.createUniqueKey(DocumentDiscussion.DOCUMENT_DISCUSSION, DSL.name("KEY_document_discussion_PRIMARY"), new TableField[] { DocumentDiscussion.DOCUMENT_DISCUSSION.ID }, true); public static final UniqueKey KEY_GROUP_PRIMARY = Internal.createUniqueKey(Group.GROUP, DSL.name("KEY_group_PRIMARY"), new TableField[] { Group.GROUP.ID }, true); public static final UniqueKey KEY_LOGIN_PRIMARY = Internal.createUniqueKey(Login.LOGIN, DSL.name("KEY_login_PRIMARY"), new TableField[] { Login.LOGIN.ID }, true); diff --git a/dao/generated-src/jooq/main/java/com/databasir/dao/Tables.java b/dao/generated-src/jooq/main/java/com/databasir/dao/Tables.java index 0d8be9b..930eaba 100644 --- a/dao/generated-src/jooq/main/java/com/databasir/dao/Tables.java +++ b/dao/generated-src/jooq/main/java/com/databasir/dao/Tables.java @@ -8,6 +8,7 @@ import com.databasir.dao.tables.DataSource; import com.databasir.dao.tables.DataSourceProperty; import com.databasir.dao.tables.DatabaseDocument; import com.databasir.dao.tables.DatabaseType; +import com.databasir.dao.tables.DocumentDescription; import com.databasir.dao.tables.DocumentDiscussion; import com.databasir.dao.tables.Group; import com.databasir.dao.tables.Login; @@ -52,6 +53,11 @@ public class Tables { */ public static final DatabaseType DATABASE_TYPE = DatabaseType.DATABASE_TYPE; + /** + * custom document description + */ + public static final DocumentDescription DOCUMENT_DESCRIPTION = DocumentDescription.DOCUMENT_DESCRIPTION; + /** * The table databasir.document_discussion. */ diff --git a/dao/generated-src/jooq/main/java/com/databasir/dao/tables/DocumentDescription.java b/dao/generated-src/jooq/main/java/com/databasir/dao/tables/DocumentDescription.java new file mode 100644 index 0000000..545aaa0 --- /dev/null +++ b/dao/generated-src/jooq/main/java/com/databasir/dao/tables/DocumentDescription.java @@ -0,0 +1,181 @@ +/* + * This file is generated by jOOQ. + */ +package com.databasir.dao.tables; + + +import com.databasir.dao.Databasir; +import com.databasir.dao.Keys; +import com.databasir.dao.tables.records.DocumentDescriptionRecord; + +import java.time.LocalDateTime; +import java.util.Arrays; +import java.util.List; + +import org.jooq.Field; +import org.jooq.ForeignKey; +import org.jooq.Identity; +import org.jooq.Name; +import org.jooq.Record; +import org.jooq.Row8; +import org.jooq.Schema; +import org.jooq.Table; +import org.jooq.TableField; +import org.jooq.TableOptions; +import org.jooq.UniqueKey; +import org.jooq.impl.DSL; +import org.jooq.impl.SQLDataType; +import org.jooq.impl.TableImpl; + + +/** + * custom document description + */ +@SuppressWarnings({ "all", "unchecked", "rawtypes" }) +public class DocumentDescription extends TableImpl { + + private static final long serialVersionUID = 1L; + + /** + * The reference instance of databasir.document_description + */ + public static final DocumentDescription DOCUMENT_DESCRIPTION = new DocumentDescription(); + + /** + * The class holding records for this type + */ + @Override + public Class getRecordType() { + return DocumentDescriptionRecord.class; + } + + /** + * The column databasir.document_description.id. + */ + public final TableField ID = createField(DSL.name("id"), SQLDataType.INTEGER.nullable(false).identity(true), this, ""); + + /** + * The column databasir.document_description.content. + */ + public final TableField CONTENT = createField(DSL.name("content"), SQLDataType.CLOB.nullable(false), this, ""); + + /** + * The column databasir.document_description.project_id. + */ + public final TableField PROJECT_ID = createField(DSL.name("project_id"), SQLDataType.INTEGER.nullable(false), this, ""); + + /** + * The column databasir.document_description.table_name. + */ + public final TableField TABLE_NAME = createField(DSL.name("table_name"), SQLDataType.VARCHAR(255).nullable(false), this, ""); + + /** + * The column databasir.document_description.column_name. + */ + public final TableField COLUMN_NAME = createField(DSL.name("column_name"), SQLDataType.VARCHAR(255), this, ""); + + /** + * The column databasir.document_description.update_by. + */ + public final TableField UPDATE_BY = createField(DSL.name("update_by"), SQLDataType.INTEGER.nullable(false), this, ""); + + /** + * The column databasir.document_description.update_at. + */ + public final TableField UPDATE_AT = createField(DSL.name("update_at"), SQLDataType.LOCALDATETIME(0).nullable(false).defaultValue(DSL.field("CURRENT_TIMESTAMP", SQLDataType.LOCALDATETIME)), this, ""); + + /** + * The column databasir.document_description.create_at. + */ + public final TableField CREATE_AT = createField(DSL.name("create_at"), SQLDataType.LOCALDATETIME(0).nullable(false).defaultValue(DSL.field("CURRENT_TIMESTAMP", SQLDataType.LOCALDATETIME)), this, ""); + + private DocumentDescription(Name alias, Table aliased) { + this(alias, aliased, null); + } + + private DocumentDescription(Name alias, Table aliased, Field[] parameters) { + super(alias, null, aliased, parameters, DSL.comment("custom document description"), TableOptions.table()); + } + + /** + * Create an aliased databasir.document_description table + * reference + */ + public DocumentDescription(String alias) { + this(DSL.name(alias), DOCUMENT_DESCRIPTION); + } + + /** + * Create an aliased databasir.document_description table + * reference + */ + public DocumentDescription(Name alias) { + this(alias, DOCUMENT_DESCRIPTION); + } + + /** + * Create a databasir.document_description table reference + */ + public DocumentDescription() { + this(DSL.name("document_description"), null); + } + + public DocumentDescription(Table child, ForeignKey key) { + super(child, key, DOCUMENT_DESCRIPTION); + } + + @Override + public Schema getSchema() { + return aliased() ? null : Databasir.DATABASIR; + } + + @Override + public Identity getIdentity() { + return (Identity) super.getIdentity(); + } + + @Override + public UniqueKey getPrimaryKey() { + return Keys.KEY_DOCUMENT_DESCRIPTION_PRIMARY; + } + + @Override + public List> getUniqueKeys() { + return Arrays.asList(Keys.KEY_DOCUMENT_DESCRIPTION_UK_PROJECT_ID_TABLE_NAME_COLUMN_NAME); + } + + @Override + public DocumentDescription as(String alias) { + return new DocumentDescription(DSL.name(alias), this); + } + + @Override + public DocumentDescription as(Name alias) { + return new DocumentDescription(alias, this); + } + + /** + * Rename this table + */ + @Override + public DocumentDescription rename(String name) { + return new DocumentDescription(DSL.name(name), null); + } + + /** + * Rename this table + */ + @Override + public DocumentDescription rename(Name name) { + return new DocumentDescription(name, null); + } + + // ------------------------------------------------------------------------- + // Row8 type methods + // ------------------------------------------------------------------------- + + @Override + public Row8 fieldsRow() { + return (Row8) super.fieldsRow(); + } +} diff --git a/dao/generated-src/jooq/main/java/com/databasir/dao/tables/pojos/DocumentDescriptionPojo.java b/dao/generated-src/jooq/main/java/com/databasir/dao/tables/pojos/DocumentDescriptionPojo.java new file mode 100644 index 0000000..6152b6a --- /dev/null +++ b/dao/generated-src/jooq/main/java/com/databasir/dao/tables/pojos/DocumentDescriptionPojo.java @@ -0,0 +1,189 @@ +/* + * This file is generated by jOOQ. + */ +package com.databasir.dao.tables.pojos; + + +import java.io.Serializable; +import java.time.LocalDateTime; + + +/** + * custom document description + */ +@SuppressWarnings({ "all", "unchecked", "rawtypes" }) +public class DocumentDescriptionPojo implements Serializable { + + private static final long serialVersionUID = 1L; + + private Integer id; + private String content; + private Integer projectId; + private String tableName; + private String columnName; + private Integer updateBy; + private LocalDateTime updateAt; + private LocalDateTime createAt; + + public DocumentDescriptionPojo() {} + + public DocumentDescriptionPojo(DocumentDescriptionPojo value) { + this.id = value.id; + this.content = value.content; + this.projectId = value.projectId; + this.tableName = value.tableName; + this.columnName = value.columnName; + this.updateBy = value.updateBy; + this.updateAt = value.updateAt; + this.createAt = value.createAt; + } + + public DocumentDescriptionPojo( + Integer id, + String content, + Integer projectId, + String tableName, + String columnName, + Integer updateBy, + LocalDateTime updateAt, + LocalDateTime createAt + ) { + this.id = id; + this.content = content; + this.projectId = projectId; + this.tableName = tableName; + this.columnName = columnName; + this.updateBy = updateBy; + this.updateAt = updateAt; + this.createAt = createAt; + } + + /** + * Getter for databasir.document_description.id. + */ + public Integer getId() { + return this.id; + } + + /** + * Setter for databasir.document_description.id. + */ + public void setId(Integer id) { + this.id = id; + } + + /** + * Getter for databasir.document_description.content. + */ + public String getContent() { + return this.content; + } + + /** + * Setter for databasir.document_description.content. + */ + public void setContent(String content) { + this.content = content; + } + + /** + * Getter for databasir.document_description.project_id. + */ + public Integer getProjectId() { + return this.projectId; + } + + /** + * Setter for databasir.document_description.project_id. + */ + public void setProjectId(Integer projectId) { + this.projectId = projectId; + } + + /** + * Getter for databasir.document_description.table_name. + */ + public String getTableName() { + return this.tableName; + } + + /** + * Setter for databasir.document_description.table_name. + */ + public void setTableName(String tableName) { + this.tableName = tableName; + } + + /** + * Getter for databasir.document_description.column_name. + */ + public String getColumnName() { + return this.columnName; + } + + /** + * Setter for databasir.document_description.column_name. + */ + public void setColumnName(String columnName) { + this.columnName = columnName; + } + + /** + * Getter for databasir.document_description.update_by. + */ + public Integer getUpdateBy() { + return this.updateBy; + } + + /** + * Setter for databasir.document_description.update_by. + */ + public void setUpdateBy(Integer updateBy) { + this.updateBy = updateBy; + } + + /** + * Getter for databasir.document_description.update_at. + */ + public LocalDateTime getUpdateAt() { + return this.updateAt; + } + + /** + * Setter for databasir.document_description.update_at. + */ + public void setUpdateAt(LocalDateTime updateAt) { + this.updateAt = updateAt; + } + + /** + * Getter for databasir.document_description.create_at. + */ + public LocalDateTime getCreateAt() { + return this.createAt; + } + + /** + * Setter for databasir.document_description.create_at. + */ + public void setCreateAt(LocalDateTime createAt) { + this.createAt = createAt; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("DocumentDescriptionPojo ("); + + sb.append(id); + sb.append(", ").append(content); + sb.append(", ").append(projectId); + sb.append(", ").append(tableName); + sb.append(", ").append(columnName); + sb.append(", ").append(updateBy); + sb.append(", ").append(updateAt); + sb.append(", ").append(createAt); + + sb.append(")"); + return sb.toString(); + } +} diff --git a/dao/generated-src/jooq/main/java/com/databasir/dao/tables/records/DocumentDescriptionRecord.java b/dao/generated-src/jooq/main/java/com/databasir/dao/tables/records/DocumentDescriptionRecord.java new file mode 100644 index 0000000..b98c636 --- /dev/null +++ b/dao/generated-src/jooq/main/java/com/databasir/dao/tables/records/DocumentDescriptionRecord.java @@ -0,0 +1,387 @@ +/* + * This file is generated by jOOQ. + */ +package com.databasir.dao.tables.records; + + +import com.databasir.dao.tables.DocumentDescription; +import com.databasir.dao.tables.pojos.DocumentDescriptionPojo; + +import java.time.LocalDateTime; + +import org.jooq.Field; +import org.jooq.Record1; +import org.jooq.Record8; +import org.jooq.Row8; +import org.jooq.impl.UpdatableRecordImpl; + + +/** + * custom document description + */ +@SuppressWarnings({ "all", "unchecked", "rawtypes" }) +public class DocumentDescriptionRecord extends UpdatableRecordImpl implements Record8 { + + private static final long serialVersionUID = 1L; + + /** + * Setter for databasir.document_description.id. + */ + public void setId(Integer value) { + set(0, value); + } + + /** + * Getter for databasir.document_description.id. + */ + public Integer getId() { + return (Integer) get(0); + } + + /** + * Setter for databasir.document_description.content. + */ + public void setContent(String value) { + set(1, value); + } + + /** + * Getter for databasir.document_description.content. + */ + public String getContent() { + return (String) get(1); + } + + /** + * Setter for databasir.document_description.project_id. + */ + public void setProjectId(Integer value) { + set(2, value); + } + + /** + * Getter for databasir.document_description.project_id. + */ + public Integer getProjectId() { + return (Integer) get(2); + } + + /** + * Setter for databasir.document_description.table_name. + */ + public void setTableName(String value) { + set(3, value); + } + + /** + * Getter for databasir.document_description.table_name. + */ + public String getTableName() { + return (String) get(3); + } + + /** + * Setter for databasir.document_description.column_name. + */ + public void setColumnName(String value) { + set(4, value); + } + + /** + * Getter for databasir.document_description.column_name. + */ + public String getColumnName() { + return (String) get(4); + } + + /** + * Setter for databasir.document_description.update_by. + */ + public void setUpdateBy(Integer value) { + set(5, value); + } + + /** + * Getter for databasir.document_description.update_by. + */ + public Integer getUpdateBy() { + return (Integer) get(5); + } + + /** + * Setter for databasir.document_description.update_at. + */ + public void setUpdateAt(LocalDateTime value) { + set(6, value); + } + + /** + * Getter for databasir.document_description.update_at. + */ + public LocalDateTime getUpdateAt() { + return (LocalDateTime) get(6); + } + + /** + * Setter for databasir.document_description.create_at. + */ + public void setCreateAt(LocalDateTime value) { + set(7, value); + } + + /** + * Getter for databasir.document_description.create_at. + */ + public LocalDateTime getCreateAt() { + return (LocalDateTime) get(7); + } + + // ------------------------------------------------------------------------- + // Primary key information + // ------------------------------------------------------------------------- + + @Override + public Record1 key() { + return (Record1) super.key(); + } + + // ------------------------------------------------------------------------- + // Record8 type implementation + // ------------------------------------------------------------------------- + + @Override + public Row8 fieldsRow() { + return (Row8) super.fieldsRow(); + } + + @Override + public Row8 valuesRow() { + return (Row8) super.valuesRow(); + } + + @Override + public Field field1() { + return DocumentDescription.DOCUMENT_DESCRIPTION.ID; + } + + @Override + public Field field2() { + return DocumentDescription.DOCUMENT_DESCRIPTION.CONTENT; + } + + @Override + public Field field3() { + return DocumentDescription.DOCUMENT_DESCRIPTION.PROJECT_ID; + } + + @Override + public Field field4() { + return DocumentDescription.DOCUMENT_DESCRIPTION.TABLE_NAME; + } + + @Override + public Field field5() { + return DocumentDescription.DOCUMENT_DESCRIPTION.COLUMN_NAME; + } + + @Override + public Field field6() { + return DocumentDescription.DOCUMENT_DESCRIPTION.UPDATE_BY; + } + + @Override + public Field field7() { + return DocumentDescription.DOCUMENT_DESCRIPTION.UPDATE_AT; + } + + @Override + public Field field8() { + return DocumentDescription.DOCUMENT_DESCRIPTION.CREATE_AT; + } + + @Override + public Integer component1() { + return getId(); + } + + @Override + public String component2() { + return getContent(); + } + + @Override + public Integer component3() { + return getProjectId(); + } + + @Override + public String component4() { + return getTableName(); + } + + @Override + public String component5() { + return getColumnName(); + } + + @Override + public Integer component6() { + return getUpdateBy(); + } + + @Override + public LocalDateTime component7() { + return getUpdateAt(); + } + + @Override + public LocalDateTime component8() { + return getCreateAt(); + } + + @Override + public Integer value1() { + return getId(); + } + + @Override + public String value2() { + return getContent(); + } + + @Override + public Integer value3() { + return getProjectId(); + } + + @Override + public String value4() { + return getTableName(); + } + + @Override + public String value5() { + return getColumnName(); + } + + @Override + public Integer value6() { + return getUpdateBy(); + } + + @Override + public LocalDateTime value7() { + return getUpdateAt(); + } + + @Override + public LocalDateTime value8() { + return getCreateAt(); + } + + @Override + public DocumentDescriptionRecord value1(Integer value) { + setId(value); + return this; + } + + @Override + public DocumentDescriptionRecord value2(String value) { + setContent(value); + return this; + } + + @Override + public DocumentDescriptionRecord value3(Integer value) { + setProjectId(value); + return this; + } + + @Override + public DocumentDescriptionRecord value4(String value) { + setTableName(value); + return this; + } + + @Override + public DocumentDescriptionRecord value5(String value) { + setColumnName(value); + return this; + } + + @Override + public DocumentDescriptionRecord value6(Integer value) { + setUpdateBy(value); + return this; + } + + @Override + public DocumentDescriptionRecord value7(LocalDateTime value) { + setUpdateAt(value); + return this; + } + + @Override + public DocumentDescriptionRecord value8(LocalDateTime value) { + setCreateAt(value); + return this; + } + + @Override + public DocumentDescriptionRecord values(Integer value1, String value2, Integer value3, String value4, String value5, Integer value6, LocalDateTime value7, LocalDateTime value8) { + value1(value1); + value2(value2); + value3(value3); + value4(value4); + value5(value5); + value6(value6); + value7(value7); + value8(value8); + return this; + } + + // ------------------------------------------------------------------------- + // Constructors + // ------------------------------------------------------------------------- + + /** + * Create a detached DocumentDescriptionRecord + */ + public DocumentDescriptionRecord() { + super(DocumentDescription.DOCUMENT_DESCRIPTION); + } + + /** + * Create a detached, initialised DocumentDescriptionRecord + */ + public DocumentDescriptionRecord(Integer id, String content, Integer projectId, String tableName, String columnName, Integer updateBy, LocalDateTime updateAt, LocalDateTime createAt) { + super(DocumentDescription.DOCUMENT_DESCRIPTION); + + setId(id); + setContent(content); + setProjectId(projectId); + setTableName(tableName); + setColumnName(columnName); + setUpdateBy(updateBy); + setUpdateAt(updateAt); + setCreateAt(createAt); + } + + /** + * Create a detached, initialised DocumentDescriptionRecord + */ + public DocumentDescriptionRecord(DocumentDescriptionPojo value) { + super(DocumentDescription.DOCUMENT_DESCRIPTION); + + if (value != null) { + setId(value.getId()); + setContent(value.getContent()); + setProjectId(value.getProjectId()); + setTableName(value.getTableName()); + setColumnName(value.getColumnName()); + setUpdateBy(value.getUpdateBy()); + setUpdateAt(value.getUpdateAt()); + setCreateAt(value.getCreateAt()); + } + } +} diff --git a/dao/src/main/resources/db/migration/V1.1__database_type.sql b/dao/src/main/resources/db/migration/V1.1__database_type.sql index a5616b1..c5a0c41 100644 --- a/dao/src/main/resources/db/migration/V1.1__database_type.sql +++ b/dao/src/main/resources/db/migration/V1.1__database_type.sql @@ -19,5 +19,21 @@ CREATE TABLE IF NOT EXISTS database_type REPLACE INTO databasir.database_type (id, database_type, icon, DESCRIPTION, jdbc_driver_file_url, jdbc_driver_class_name, jdbc_protocol, url_pattern) -VALUES (1, 'mysql', '', 'system default mysql', 'N/A', 'com.mysql.cj.jdbc.Driver', 'jdbc:mysql', '{{jdbc.protocol}}://{{db.url}}/{{db.name}}'), - (2, 'postgresql', '', 'system default postgresql', 'N/A', 'org.postgresql.Driver', 'jdbc:postgresql', '{{jdbc.protocol}}://{{db.url}}/{{db.name}}'); +VALUES (1, 'mysql', '', 'system default mysql', 'N/A', 'com.mysql.cj.jdbc.Driver', 'jdbc:mysql', + '{{jdbc.protocol}}://{{db.url}}/{{db.name}}'), + (2, 'postgresql', '', 'system default postgresql', 'N/A', 'org.postgresql.Driver', 'jdbc:postgresql', + '{{jdbc.protocol}}://{{db.url}}/{{db.name}}'); + +CREATE TABLE IF NOT EXISTS document_description +( + id INT PRIMARY KEY AUTO_INCREMENT, + content TEXT NOT NULL, + project_id INT NOT NULL, + table_name VARCHAR(255) NOT NULL, + column_name VARCHAR(255) DEFAULT NULL, + update_by INT NOT NULL, + update_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + create_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, + CONSTRAINT UNIQUE uk_project_id_table_name_column_name (project_id, table_name, column_name) +) CHARSET utf8mb4 + COLLATE utf8mb4_unicode_ci COMMENT 'custom document description'; \ No newline at end of file