Compare schema for Index on longtext

26 views
Skip to first unread message

Sarvjeet Madhukar

unread,
Aug 25, 2022, 10:36:18 AMAug 25
to DB Solo
The compare schema with new schema having new index on a longtext type column is generating wrong index statement.

Table:

CREATE TABLE `ROLE_PERMISSION` (
`id` varchar(255) NOT NULL,
`externalId` varchar(255) DEFAULT NULL,
`fdn` longtext,
`version` bigint(20) NOT NULL,
`createAccess` bit(1) DEFAULT NULL,
`cudChildren` bit(1) DEFAULT NULL,
`deleteAccess` bit(1) DEFAULT NULL,
`endPointType` varchar(255) NOT NULL,
`noAccess` bit(1) DEFAULT NULL,
`noAccessChildren` bit(1) DEFAULT NULL,
`readAccess` bit(1) DEFAULT NULL,
`readChildren` bit(1) DEFAULT NULL,
`updateAccess` bit(1) DEFAULT NULL,
`useAccess` bit(1) DEFAULT NULL,
`assocEntityId` varchar(255) DEFAULT NULL,
`assocEntityType` varchar(255) DEFAULT NULL,
`permissionMatchFdn` longtext,
`role_id` varchar(255) NOT NULL,
`role_entry_id` varchar(255) NOT NULL,
`group_id` varchar(255) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `group_id` (`group_id`,`assocEntityType`,`assocEntityId`,`endPointType`),
KEY `single_column_index` (`assocEntityId`),
KEY `FK9C6EC938D6B4EA8D` (`role_id`),
KEY `FK9C6EC9385CEC0D24` (`group_id`),
KEY `FK9C6EC9384EF4929A` (`role_entry_id`),
CONSTRAINT `FK9C6EC9384EF4929A` FOREIGN KEY (`role_entry_id`) REFERENCES `ROLE_ENTRY` (`id`),
CONSTRAINT `FK9C6EC9385CEC0D24` FOREIGN KEY (`group_id`) REFERENCES `ORG_GROUP` (`id`),
CONSTRAINT `FK9C6EC938D6B4EA8D` FOREIGN KEY (`role_id`) REFERENCES `ROLE` (`id`)
)

Index:
create index fdn_column_index on ROLE_PERMISSION (fdn(255));


Schema compare is generating:
CREATE INDEX fdn_column_index ON ROLE_PERMISSION (fdn ASC);

You can see the length attribute is missing in schema compare which is wrong SQL statement.

Any help on how to correct this?

DB Solo Admin

unread,
Aug 26, 2022, 1:37:02 AMAug 26
to DB Solo
Which DBMS product is this?

Marko

Sarvjeet Madhukar

unread,
Aug 26, 2022, 2:01:13 AMAug 26
to DB Solo
MySQL

Thanks
Madhukar

DB Solo Admin

unread,
Aug 26, 2022, 9:29:37 AMAug 26
to DB Solo
Ok this needs to be investigated further.

Marko

DB Solo Admin

unread,
Sep 19, 2022, 8:06:39 PM (13 days ago) Sep 19
to DB Solo
This should be fixed now. You can find the fixed version here



Marko

Reply all
Reply to author
Forward
0 new messages