Browse Source

feat: remove unique name constraint on group (#18)

master
vran 3 years ago
committed by GitHub
parent
commit
77b1583f0b
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      dao/generated-src/jooq/main/java/com/databasir/dao/Keys.java
  2. 7
      dao/generated-src/jooq/main/java/com/databasir/dao/tables/Group.java
  3. 4
      dao/src/main/resources/db/migration/V1.2__operation_log.sql

1
dao/generated-src/jooq/main/java/com/databasir/dao/Keys.java

@ -67,7 +67,6 @@ public class Keys {
public static final UniqueKey<DatabaseDocumentHistoryRecord> KEY_DATABASE_DOCUMENT_HISTORY_UK_CONNECTION_ID_VERSION = Internal.createUniqueKey(DatabaseDocumentHistory.DATABASE_DOCUMENT_HISTORY, DSL.name("KEY_database_document_history_uk_connection_id_version"), new TableField[] { DatabaseDocumentHistory.DATABASE_DOCUMENT_HISTORY.DATABASE_DOCUMENT_ID, DatabaseDocumentHistory.DATABASE_DOCUMENT_HISTORY.VERSION }, true);
public static final UniqueKey<DocumentRemarkRecord> KEY_DOCUMENT_REMARK_PRIMARY = Internal.createUniqueKey(DocumentRemark.DOCUMENT_REMARK, DSL.name("KEY_document_remark_PRIMARY"), new TableField[] { DocumentRemark.DOCUMENT_REMARK.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<GroupRecord> KEY_GROUP_UK_NAME = Internal.createUniqueKey(Group.GROUP, DSL.name("KEY_group_uk_name"), new TableField[] { Group.GROUP.NAME }, true);
public static final UniqueKey<LoginRecord> KEY_LOGIN_PRIMARY = Internal.createUniqueKey(Login.LOGIN, DSL.name("KEY_login_PRIMARY"), new TableField[] { Login.LOGIN.ID }, true);
public static final UniqueKey<LoginRecord> KEY_LOGIN_UK_USER_ID = Internal.createUniqueKey(Login.LOGIN, DSL.name("KEY_login_uk_user_id"), new TableField[] { Login.LOGIN.USER_ID }, true);
public static final UniqueKey<OperationLogRecord> KEY_OPERATION_LOG_PRIMARY = Internal.createUniqueKey(OperationLog.OPERATION_LOG, DSL.name("KEY_operation_log_PRIMARY"), new TableField[] { OperationLog.OPERATION_LOG.ID }, true);

7
dao/generated-src/jooq/main/java/com/databasir/dao/tables/Group.java

@ -9,8 +9,6 @@ import com.databasir.dao.Keys;
import com.databasir.dao.tables.records.GroupRecord;
import java.time.LocalDateTime;
import java.util.Arrays;
import java.util.List;
import org.jooq.Field;
import org.jooq.ForeignKey;
@ -127,11 +125,6 @@ public class Group extends TableImpl<GroupRecord> {
return Keys.KEY_GROUP_PRIMARY;
}
@Override
public List<UniqueKey<GroupRecord>> getUniqueKeys() {
return Arrays.asList(Keys.KEY_GROUP_UK_NAME);
}
@Override
public Group as(String alias) {
return new Group(DSL.name(alias), this);

4
dao/src/main/resources/db/migration/V1.2__operation_log.sql

@ -1,4 +1,4 @@
CREATE TABLE operation_log
CREATE TABLE IF NOT EXISTS operation_log
(
id BIGINT PRIMARY KEY AUTO_INCREMENT NOT NULL,
@ -16,3 +16,5 @@ CREATE TABLE operation_log
create_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP
) CHARSET utf8mb4
COLLATE utf8mb4_unicode_ci;
DROP INDEX uk_name ON `group`;
Loading…
Cancel
Save