From 9aac4d97f159b2507c2a69ce1a31d9ab9d680795 Mon Sep 17 00:00:00 2001 From: Bas Kamer Date: Sat, 14 Apr 2018 14:09:59 +0200 Subject: [PATCH] notes --- README.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/README.md b/README.md index 129bf29..e4fe11e 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,22 @@ PDO implementation of snapshot store You can install prooph/pdo-snapshot-store via composer by adding `"prooph/pdo-snapshot-store": "^1.0"` as requirement to your composer.json. +## Upgrade + +If you come from version 1.4.0 you are advised to manually update the table schema to fix an omitted primary key. You can issue the following statements or drop the snapshot table, recreate them from the provided scripts and restart projections. + +MySql + +```sql +ALTER TABLE `snapshots` DROP INDEX `ix_aggregate_id`, ADD PRIMARY KEY(`aggregate_id`); +``` + +Postgres + +```sql +ALTER TABLE "snapshots" DROP CONSTRAINT "snapshots_aggregate_id_key", ADD PRIMARY KEY ("aggregate_id"); +``` + ## Support - Ask questions on Stack Overflow tagged with [#prooph](https://stackoverflow.com/questions/tagged/prooph).