Migration1625819412ChangeOrderCreatedByIdConstraint example



        $this->connection->executeStatement(' ALTER TABLE `order` ADD CONSTRAINT `fk.order.created_by_id` FOREIGN KEY (`created_by_id`) REFERENCES `user` (`id`) ON DELETE RESTRICT ON UPDATE CASCADE, ADD CONSTRAINT `fk.order.updated_by_id` FOREIGN KEY (`updated_by_id`) REFERENCES `user` (`id`) ON DELETE RESTRICT ON UPDATE CASCADE; ');

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

        $this->connection->beginTransaction();
    }

    public function testItChangesOrderCreatedByIdConstraint(): void
    {
        $context = Context::createDefaultContext();
        $userId = Uuid::randomHex();

        $userRepository = $this->createUserWithId($userId);

        
Home | Imprint | This part of the site doesn't use cookies.