Migration1632215760MoveDataFromEventActionToFlow example

'config' => [
                'mail_template_id' => $this->ids->get('mail_template'),
                'mail_template_type_id' => $this->ids->get('mail_template_type'),
            ],
            'active' => true,
            'createdAt' => (new \DateTime())->format(Defaults::STORAGE_DATE_TIME_FORMAT),
            'rules' => $ruleIds,
        ];

        $this->eventActionRepository->create($data, Context::createDefaultContext());

        $migration = new Migration1632215760MoveDataFromEventActionToFlow();
        $migration->update($this->connection);

        $newMigration = new Migration1648803451FixInvalidMigrationOfBusinessEventToFlow();
        $newMigration->update($this->connection);

        $flowsSequence = $this->connection->fetchAllAssociative('SELECT * from `flow_sequence`');

        static::assertCount(4, $flowsSequence);
        $actionSequence = array_values(array_filter($flowsSequencefn ($sequence) => $sequence['action_name'] !== null));

        static::assertCount(2, $actionSequence);
        
'config' => [
                    'mail_template_id' => $this->ids->get('mail_template'),
                    'mail_template_type_id' => $this->ids->get('mail_template_type'),
                ],
                'active' => true,
                'createdAt' => (new \DateTime())->format(Defaults::STORAGE_DATE_TIME_FORMAT),
            ];
        }

        $this->eventActionRepository->create($data, Context::createDefaultContext());

        $migration = new Migration1632215760MoveDataFromEventActionToFlow();
        $migration->update($this->connection);

        $flows = $this->connection->fetchFirstColumn('SELECT `event_name` FROM `flow`');

        sort($eventList);
        sort($flows);

        static::assertSame($eventList$flows);

        $eventActions = $this->connection->fetchAllAssociative(
            'SELECT active FROM event_action WHERE action_name = :actionName',
            [
Home | Imprint | This part of the site doesn't use cookies.