[Solved] Remove an unique index from split database

Discuss the database features
Post Reply
dreamquartz
Posts: 881
Joined: Mon May 30, 2011 4:02 am

[Solved] Remove an unique index from split database

Post by dreamquartz »

Hi All,

I need to remove an Unique Index from table tCity on City, but the database does not allow it.
See attached picture.
Screenshot from 2017-09-10 11-14-51.png
Update: went into the .script file, and this line creates the Index:

Code: Select all

CREATE UNIQUE INDEX "City" ON PUBLIC."tCity"("City")
.
After removal, however, this shows:
Screenshot from 2017-09-10 13-17-05.png
Any ideas what this means, and how to remove an index?

Dream
Last edited by dreamquartz on Sun Sep 10, 2017 10:41 pm, edited 1 time in total.
LO 7.x, HSQLDB 2.7.x & Ubuntu 22.04 LTS.
User avatar
Villeroy
Volunteer
Posts: 31279
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Remove an unique index from split database

Post by Villeroy »

Removing the CREATE statement from the script file might be a mistake. Restore the database and run DROP INDEX "City" in the Tools>SQL dialog. This will actually remove the index.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
dreamquartz
Posts: 881
Joined: Mon May 30, 2011 4:02 am

Re: Remove an unique index from split database

Post by dreamquartz »

Villeroy wrote:Removing the CREATE statement from the script file might be a mistake. Restore the database and run DROP INDEX "City" in the Tools>SQL dialog. This will actually remove the index.
Thank you so much.
My not so elegant way was to copy and paste the table. This causes the index to drop as well.
However it means that the Auto numbering of the PK must be re-initiated.

Dream
LO 7.x, HSQLDB 2.7.x & Ubuntu 22.04 LTS.
Post Reply