mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-12 21:34:25 +00:00
fix migration after test on real data
This commit is contained in:
parent
ab5ad7ae14
commit
3e3f20993d
@ -144,8 +144,9 @@ final class Version20230427102309 extends AbstractMigration
|
||||
|
||||
$this->addSql(<<<'SQL'
|
||||
INSERT INTO chill_person_accompanying_period_step_history (id, period_id, enddate, startdate, step, createdat, updatedat)
|
||||
SELECT nextval('chill_person_accompanying_period_step_history_id_seq'), accompanyingperiod_id, NULL, last_date + '2 years'::interval, 'CONFIRMED_INACTIVE_LONG', NOW(), NOW()
|
||||
FROM inactive_long;
|
||||
SELECT nextval('chill_person_accompanying_period_step_history_id_seq'), period_id, NULL, sq.g, 'CONFIRMED_INACTIVE_LONG', NOW(), NOW()
|
||||
FROM (SELECT GREATEST(MAX(startdate), MAX(enddate)) AS g, period_id FROM chill_person_accompanying_period_step_history GROUP BY period_id) AS sq
|
||||
JOIN inactive_long ON sq.period_id = inactive_long.accompanyingperiod_id
|
||||
SQL);
|
||||
|
||||
$this->addSql(<<<'SQL'
|
||||
@ -173,8 +174,9 @@ final class Version20230427102309 extends AbstractMigration
|
||||
|
||||
$this->addSql(<<<'SQL'
|
||||
INSERT INTO chill_person_accompanying_period_step_history (id, period_id, enddate, startdate, step, createdat, updatedat)
|
||||
SELECT nextval('chill_person_accompanying_period_step_history_id_seq'), accompanyingperiod_id, NULL, last_date + '6 months'::interval, 'CONFIRMED_INACTIVE_SHORT', NOW(), NOW()
|
||||
FROM inactive_long;
|
||||
SELECT nextval('chill_person_accompanying_period_step_history_id_seq'), period_id, NULL, sq.g, 'CONFIRMED_INACTIVE_SHORT', NOW(), NOW()
|
||||
FROM (SELECT GREATEST(MAX(startdate), MAX(enddate)) AS g, period_id FROM chill_person_accompanying_period_step_history GROUP BY period_id) AS sq
|
||||
JOIN inactive_long ON sq.period_id = inactive_long.accompanyingperiod_id
|
||||
SQL);
|
||||
|
||||
$this->addSql(<<<'SQL'
|
||||
|
Loading…
x
Reference in New Issue
Block a user