neos / neos-development-collection

The unified repository containing the Neos core packages, used for Neos development.
https://www.neos.io/
GNU General Public License v3.0
260 stars 221 forks source link

Expose projection DBAL Schema #4991

Open bwaidelich opened 3 months ago

bwaidelich commented 3 months ago

Projections provide a setup() method that allows them to automatically create/update the storage schema. If used standalone it would be useful to leave that to the application, e.g. in order to provide users with an interactive experience ("do you want to create the following tables...").

Therefore we could introduce some interface like:

use Doctrine\DBAL\Schema\Schema;

interface ProvidesDbalSchema {
    public function getSchema(): Schema;
}

and implement that in our DBAL-based projections.

Related: #4227