Skip to content

Table is created without columns #330

Answered by roxblnfk
dompie asked this question in Q&A
Discussion options

You must be logged in to vote
$schemaArray = (new \Cycle\Schema\Compiler())->compile($registry);

To compile Registry to Schema you should use Compile Generators. For example:

use Cycle\Schema;

$schemaArray = (new Schema\Compiler())->compile(new Schema\Registry($dbal), [
    new Schema\Generator\GenerateRelations(),       // generate entity relations
    new Schema\Generator\GenerateModifiers(),       // generate changes from schema modifiers
    new Schema\Generator\ValidateEntities(),        // make sure all entity schemas are correct
    new Schema\Generator\RenderTables(),            // declare table schemas
    new Schema\Generator\RenderRelations(),         // declare relation keys and indexes
    new Schema\Gen…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@dompie
Comment options

Answer selected by dompie
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants