feat: generate document description model

This commit is contained in:
vran 2022-03-13 18:35:05 +08:00
parent e85e0e6e70
commit fe6d61e1b6
7 changed files with 792 additions and 2 deletions

View File

@ -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 <code>databasir.document_discussion</code>.
*/
@ -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,

View File

@ -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<DatabaseDocumentRecord> 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<DatabaseTypeRecord> 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<DatabaseTypeRecord> 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<DocumentDescriptionRecord> 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<DocumentDescriptionRecord> 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<DocumentDiscussionRecord> 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<GroupRecord> KEY_GROUP_PRIMARY = Internal.createUniqueKey(Group.GROUP, DSL.name("KEY_group_PRIMARY"), new TableField[] { Group.GROUP.ID }, true);
public static final UniqueKey<LoginRecord> KEY_LOGIN_PRIMARY = Internal.createUniqueKey(Login.LOGIN, DSL.name("KEY_login_PRIMARY"), new TableField[] { Login.LOGIN.ID }, true);

View File

@ -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 <code>databasir.document_discussion</code>.
*/

View File

@ -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<DocumentDescriptionRecord> {
private static final long serialVersionUID = 1L;
/**
* The reference instance of <code>databasir.document_description</code>
*/
public static final DocumentDescription DOCUMENT_DESCRIPTION = new DocumentDescription();
/**
* The class holding records for this type
*/
@Override
public Class<DocumentDescriptionRecord> getRecordType() {
return DocumentDescriptionRecord.class;
}
/**
* The column <code>databasir.document_description.id</code>.
*/
public final TableField<DocumentDescriptionRecord, Integer> ID = createField(DSL.name("id"), SQLDataType.INTEGER.nullable(false).identity(true), this, "");
/**
* The column <code>databasir.document_description.content</code>.
*/
public final TableField<DocumentDescriptionRecord, String> CONTENT = createField(DSL.name("content"), SQLDataType.CLOB.nullable(false), this, "");
/**
* The column <code>databasir.document_description.project_id</code>.
*/
public final TableField<DocumentDescriptionRecord, Integer> PROJECT_ID = createField(DSL.name("project_id"), SQLDataType.INTEGER.nullable(false), this, "");
/**
* The column <code>databasir.document_description.table_name</code>.
*/
public final TableField<DocumentDescriptionRecord, String> TABLE_NAME = createField(DSL.name("table_name"), SQLDataType.VARCHAR(255).nullable(false), this, "");
/**
* The column <code>databasir.document_description.column_name</code>.
*/
public final TableField<DocumentDescriptionRecord, String> COLUMN_NAME = createField(DSL.name("column_name"), SQLDataType.VARCHAR(255), this, "");
/**
* The column <code>databasir.document_description.update_by</code>.
*/
public final TableField<DocumentDescriptionRecord, Integer> UPDATE_BY = createField(DSL.name("update_by"), SQLDataType.INTEGER.nullable(false), this, "");
/**
* The column <code>databasir.document_description.update_at</code>.
*/
public final TableField<DocumentDescriptionRecord, LocalDateTime> UPDATE_AT = createField(DSL.name("update_at"), SQLDataType.LOCALDATETIME(0).nullable(false).defaultValue(DSL.field("CURRENT_TIMESTAMP", SQLDataType.LOCALDATETIME)), this, "");
/**
* The column <code>databasir.document_description.create_at</code>.
*/
public final TableField<DocumentDescriptionRecord, LocalDateTime> 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<DocumentDescriptionRecord> aliased) {
this(alias, aliased, null);
}
private DocumentDescription(Name alias, Table<DocumentDescriptionRecord> aliased, Field<?>[] parameters) {
super(alias, null, aliased, parameters, DSL.comment("custom document description"), TableOptions.table());
}
/**
* Create an aliased <code>databasir.document_description</code> table
* reference
*/
public DocumentDescription(String alias) {
this(DSL.name(alias), DOCUMENT_DESCRIPTION);
}
/**
* Create an aliased <code>databasir.document_description</code> table
* reference
*/
public DocumentDescription(Name alias) {
this(alias, DOCUMENT_DESCRIPTION);
}
/**
* Create a <code>databasir.document_description</code> table reference
*/
public DocumentDescription() {
this(DSL.name("document_description"), null);
}
public <O extends Record> DocumentDescription(Table<O> child, ForeignKey<O, DocumentDescriptionRecord> key) {
super(child, key, DOCUMENT_DESCRIPTION);
}
@Override
public Schema getSchema() {
return aliased() ? null : Databasir.DATABASIR;
}
@Override
public Identity<DocumentDescriptionRecord, Integer> getIdentity() {
return (Identity<DocumentDescriptionRecord, Integer>) super.getIdentity();
}
@Override
public UniqueKey<DocumentDescriptionRecord> getPrimaryKey() {
return Keys.KEY_DOCUMENT_DESCRIPTION_PRIMARY;
}
@Override
public List<UniqueKey<DocumentDescriptionRecord>> 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<Integer, String, Integer, String, String, Integer, LocalDateTime, LocalDateTime> fieldsRow() {
return (Row8) super.fieldsRow();
}
}

View File

@ -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 <code>databasir.document_description.id</code>.
*/
public Integer getId() {
return this.id;
}
/**
* Setter for <code>databasir.document_description.id</code>.
*/
public void setId(Integer id) {
this.id = id;
}
/**
* Getter for <code>databasir.document_description.content</code>.
*/
public String getContent() {
return this.content;
}
/**
* Setter for <code>databasir.document_description.content</code>.
*/
public void setContent(String content) {
this.content = content;
}
/**
* Getter for <code>databasir.document_description.project_id</code>.
*/
public Integer getProjectId() {
return this.projectId;
}
/**
* Setter for <code>databasir.document_description.project_id</code>.
*/
public void setProjectId(Integer projectId) {
this.projectId = projectId;
}
/**
* Getter for <code>databasir.document_description.table_name</code>.
*/
public String getTableName() {
return this.tableName;
}
/**
* Setter for <code>databasir.document_description.table_name</code>.
*/
public void setTableName(String tableName) {
this.tableName = tableName;
}
/**
* Getter for <code>databasir.document_description.column_name</code>.
*/
public String getColumnName() {
return this.columnName;
}
/**
* Setter for <code>databasir.document_description.column_name</code>.
*/
public void setColumnName(String columnName) {
this.columnName = columnName;
}
/**
* Getter for <code>databasir.document_description.update_by</code>.
*/
public Integer getUpdateBy() {
return this.updateBy;
}
/**
* Setter for <code>databasir.document_description.update_by</code>.
*/
public void setUpdateBy(Integer updateBy) {
this.updateBy = updateBy;
}
/**
* Getter for <code>databasir.document_description.update_at</code>.
*/
public LocalDateTime getUpdateAt() {
return this.updateAt;
}
/**
* Setter for <code>databasir.document_description.update_at</code>.
*/
public void setUpdateAt(LocalDateTime updateAt) {
this.updateAt = updateAt;
}
/**
* Getter for <code>databasir.document_description.create_at</code>.
*/
public LocalDateTime getCreateAt() {
return this.createAt;
}
/**
* Setter for <code>databasir.document_description.create_at</code>.
*/
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();
}
}

View File

@ -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<DocumentDescriptionRecord> implements Record8<Integer, String, Integer, String, String, Integer, LocalDateTime, LocalDateTime> {
private static final long serialVersionUID = 1L;
/**
* Setter for <code>databasir.document_description.id</code>.
*/
public void setId(Integer value) {
set(0, value);
}
/**
* Getter for <code>databasir.document_description.id</code>.
*/
public Integer getId() {
return (Integer) get(0);
}
/**
* Setter for <code>databasir.document_description.content</code>.
*/
public void setContent(String value) {
set(1, value);
}
/**
* Getter for <code>databasir.document_description.content</code>.
*/
public String getContent() {
return (String) get(1);
}
/**
* Setter for <code>databasir.document_description.project_id</code>.
*/
public void setProjectId(Integer value) {
set(2, value);
}
/**
* Getter for <code>databasir.document_description.project_id</code>.
*/
public Integer getProjectId() {
return (Integer) get(2);
}
/**
* Setter for <code>databasir.document_description.table_name</code>.
*/
public void setTableName(String value) {
set(3, value);
}
/**
* Getter for <code>databasir.document_description.table_name</code>.
*/
public String getTableName() {
return (String) get(3);
}
/**
* Setter for <code>databasir.document_description.column_name</code>.
*/
public void setColumnName(String value) {
set(4, value);
}
/**
* Getter for <code>databasir.document_description.column_name</code>.
*/
public String getColumnName() {
return (String) get(4);
}
/**
* Setter for <code>databasir.document_description.update_by</code>.
*/
public void setUpdateBy(Integer value) {
set(5, value);
}
/**
* Getter for <code>databasir.document_description.update_by</code>.
*/
public Integer getUpdateBy() {
return (Integer) get(5);
}
/**
* Setter for <code>databasir.document_description.update_at</code>.
*/
public void setUpdateAt(LocalDateTime value) {
set(6, value);
}
/**
* Getter for <code>databasir.document_description.update_at</code>.
*/
public LocalDateTime getUpdateAt() {
return (LocalDateTime) get(6);
}
/**
* Setter for <code>databasir.document_description.create_at</code>.
*/
public void setCreateAt(LocalDateTime value) {
set(7, value);
}
/**
* Getter for <code>databasir.document_description.create_at</code>.
*/
public LocalDateTime getCreateAt() {
return (LocalDateTime) get(7);
}
// -------------------------------------------------------------------------
// Primary key information
// -------------------------------------------------------------------------
@Override
public Record1<Integer> key() {
return (Record1) super.key();
}
// -------------------------------------------------------------------------
// Record8 type implementation
// -------------------------------------------------------------------------
@Override
public Row8<Integer, String, Integer, String, String, Integer, LocalDateTime, LocalDateTime> fieldsRow() {
return (Row8) super.fieldsRow();
}
@Override
public Row8<Integer, String, Integer, String, String, Integer, LocalDateTime, LocalDateTime> valuesRow() {
return (Row8) super.valuesRow();
}
@Override
public Field<Integer> field1() {
return DocumentDescription.DOCUMENT_DESCRIPTION.ID;
}
@Override
public Field<String> field2() {
return DocumentDescription.DOCUMENT_DESCRIPTION.CONTENT;
}
@Override
public Field<Integer> field3() {
return DocumentDescription.DOCUMENT_DESCRIPTION.PROJECT_ID;
}
@Override
public Field<String> field4() {
return DocumentDescription.DOCUMENT_DESCRIPTION.TABLE_NAME;
}
@Override
public Field<String> field5() {
return DocumentDescription.DOCUMENT_DESCRIPTION.COLUMN_NAME;
}
@Override
public Field<Integer> field6() {
return DocumentDescription.DOCUMENT_DESCRIPTION.UPDATE_BY;
}
@Override
public Field<LocalDateTime> field7() {
return DocumentDescription.DOCUMENT_DESCRIPTION.UPDATE_AT;
}
@Override
public Field<LocalDateTime> 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());
}
}
}

View File

@ -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';