Fix bug where it wasn't possible to create more than one response record on SQLite and Postgres (#8664)

This commit is contained in:
Aleksander Machniak
2022-08-12 19:45:40 +02:00
parent 3053a1c5e4
commit c56d7342fe
13 changed files with 16 additions and 6 deletions

View File

@@ -13,6 +13,7 @@
- Fix bug where renamed options were removed from the config on installto.sh (update.sh) run (#8643)
- Fix favicon rewrite rule in .htaccess (#8654)
- Fix various PHP 8.2 warnings
- Fix bug where it wasn't possible to create more than one response record on SQLite and Postgres (#8664)
## Release 1.6.0

View File

@@ -486,6 +486,6 @@ CREATE TRIGGER [contact_delete_member] ON [dbo].[contacts]
WHERE [contact_id] IN (SELECT [contact_id] FROM deleted)
GO
INSERT INTO [dbo].[system] ([name], [value]) VALUES ('roundcube-version', '2021100300')
INSERT INTO [dbo].[system] ([name], [value]) VALUES ('roundcube-version', '2022081200')
GO

1
SQL/mssql/2022081200.sql Normal file
View File

@@ -0,0 +1 @@
-- SQLite/Postgres only

View File

@@ -260,4 +260,4 @@ CREATE TABLE `system` (
SET FOREIGN_KEY_CHECKS=1;
INSERT INTO `system` (`name`, `value`) VALUES ('roundcube-version', '2021100300');
INSERT INTO `system` (`name`, `value`) VALUES ('roundcube-version', '2022081200');

1
SQL/mysql/2022081200.sql Normal file
View File

@@ -0,0 +1 @@
-- SQLite/Postgres only

View File

@@ -285,4 +285,4 @@ CREATE TABLE "system" (
"value" long
);
INSERT INTO "system" ("name", "value") VALUES ('roundcube-version', '2021100300');
INSERT INTO "system" ("name", "value") VALUES ('roundcube-version', '2022081200');

View File

@@ -0,0 +1 @@
-- SQLite/Postgres only

View File

@@ -375,4 +375,4 @@ CREATE TABLE "system" (
value text
);
INSERT INTO "system" (name, value) VALUES ('roundcube-version', '2021100300');
INSERT INTO "system" (name, value) VALUES ('roundcube-version', '2022081200');

View File

@@ -1,4 +1,5 @@
ALTER TABLE "filestore" ADD COLUMN context varchar(32) NOT NULL;
ALTER TABLE "filestore" ADD COLUMN context varchar(32);
UPDATE "filestore" SET context = 'enigma';
ALTER TABLE "filestore" ALTER COLUMN context SET NOT NULL;
ALTER TABLE "filestore" DROP CONSTRAINT "filestore_user_id_filename";
ALTER TABLE "filestore" ADD CONSTRAINT "filestore_user_id_context_filename" UNIQUE (user_id, context, filename);

View File

@@ -1,3 +1,4 @@
CREATE SEQUENCE collected_addresses_seq
START WITH 1
INCREMENT BY 1

View File

@@ -0,0 +1,2 @@
DROP INDEX responses_user_id_idx;
CREATE INDEX responses_user_id_idx ON responses (user_id, del);

View File

@@ -260,4 +260,4 @@ CREATE TABLE system (
value text NOT NULL
);
INSERT INTO system (name, value) VALUES ('roundcube-version', '2021100300');
INSERT INTO system (name, value) VALUES ('roundcube-version', '2022081200');

View File

@@ -0,0 +1,2 @@
DROP INDEX ix_responses_user_id;
CREATE INDEX ix_responses_user_id ON responses(user_id, del);