gitbucket / gitbucket-gist-plugin

A GitBucket plug-in which provides code snippet repository like Gist
http://gitbucket.herokuapp.com/gist
Apache License 2.0
69 stars 25 forks source link

Error duaring configurating with MariaDB 10.4.7: "Incorrect index name 'COMMENT_ID'" #60

Closed fsckyn3o2 closed 3 years ago

fsckyn3o2 commented 4 years ago
  1. This definition in liquibase XML is consider as a primary key by mariadb : <column name="COMMENT_ID" type="int" nullable="false" autoIncrement="true" unique="true"/>

  2. Add an index with "AddPrimaryKey" returns an error "Multi Primary key" with MariaDb : <addPrimaryKey constraintName="IDX_GIST_COMMENT_PK" tableName="GIST_COMMENT" columnNames="COMMENT_ID"/>

We have to choose between first or second method to set the index of primary key (if it is not composed and is set with "autoincrement" or "unique" attribute).

Same issue on gitbucket core : https://github.com/gitbucket/gitbucket/issues/2361

PR proposed to fix it in core : https://github.com/gitbucket/gitbucket/pull/2435

Can we take it after validation of this PR ?