Overview
Comment:Make sure we don't get sent reminders linked to no reminder (weird)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | dev
Files: files | file ages | folders
SHA1: 4bd0ced0d826ad4aaa766bc1087f85d6b3fe7a2d
User & Date: bohwaz on 2020-12-04 19:27:15
Other Links: branch diff | manifest | tags
Context
2020-12-04
20:24
Fix old services with wrong dates check-in: 9b1179a6fb user: bohwaz tags: dev, 1.0.0-rc5
19:27
Make sure we don't get sent reminders linked to no reminder (weird) check-in: 4bd0ced0d8 user: bohwaz tags: dev
19:25
Actually make sure preCheck returns a bool check-in: 7d61ab1cfc user: bohwaz tags: dev
Changes

Modified src/include/data/1.0.0_migration.sql from [ee5739a872] to [07aa571373].

148
149
150
151
152
153
154

155
156
157
158
159
160
161
	FROM cotisations_membres cm
	INNER JOIN cotisations c ON c.id = cm.id_cotisation;

INSERT INTO services_reminders SELECT * FROM rappels;
INSERT INTO services_reminders_sent SELECT id, id_membre, id_cotisation,
	CASE WHEN id_rappel IS NULL THEN (SELECT MAX(id) FROM rappels) ELSE id_rappel END, date
	FROM rappels_envoyes

	GROUP BY id_membre, id_cotisation, id_rappel;

DROP TABLE cotisations;
DROP TABLE cotisations_membres;
DROP TABLE rappels;
DROP TABLE rappels_envoyes;








>







148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
	FROM cotisations_membres cm
	INNER JOIN cotisations c ON c.id = cm.id_cotisation;

INSERT INTO services_reminders SELECT * FROM rappels;
INSERT INTO services_reminders_sent SELECT id, id_membre, id_cotisation,
	CASE WHEN id_rappel IS NULL THEN (SELECT MAX(id) FROM rappels) ELSE id_rappel END, date
	FROM rappels_envoyes
	WHERE id_rappel IS NOT NULL
	GROUP BY id_membre, id_cotisation, id_rappel;

DROP TABLE cotisations;
DROP TABLE cotisations_membres;
DROP TABLE rappels;
DROP TABLE rappels_envoyes;