source/Spiral/ORM/Schemas/Relations/Traits/MorphedTrait.php
protected function verifyOuter(SchemaBuilder $builder, AbstractColumn $column)
    {
        foreach ($this->findTargets($builder) as $schema) {
            $outerTable = $builder->requestTable($schema->getTable(), $schema->getDatabase());

            if (!$outerTable->hasColumn($column->getName())) {
                //Column is missing
                throw new RelationSchemaException(
                    "Unable to build morphed relation, outer key '{$column->getName()}' "
                    . "is missing in '{$outerTable->getName()}'"
                );
            }

            if ($outerTable->column($column->getName())->phpType() != $column->phpType()) {
                //Inconsistent type
                throw new RelationSchemaException(
                    "Unable to build morphed relation, outer key '{$column->getName()}' "
                    . "has different type in '{$outerTable->getName()}'"
                );
            }
        }
    }
protected function verifyOuter(SchemaBuilder $builder, AbstractColumn $column)
    {
        foreach ($this->findTargets($builder) as $schema) {
            $outerTable = $builder->requestTable($schema->getTable(), $schema->getDatabase());

            if (!$outerTable->hasColumn($column->getName())) {
                //Column is missing
                throw new RelationSchemaException(
                    "Unable to build morphed relation, outer key '{$column->getName()}' "
                    . "is missing in '{$outerTable->getName()}'"
                );
            }

            if ($outerTable->column($column->getName())->phpType() != $column->phpType()) {
                //Inconsistent type
                throw new RelationSchemaException(
                    "Unable to build morphed relation, outer key '{$column->getName()}' "
                    . "has different type in '{$outerTable->getName()}'"
                );
            }
        }
    }
protected function verifyOuter ( SchemaBuilder $ builder , AbstractColumn $ column ) { foreach ( $ this -> findTargets ( $ builder ) as $ schema ) { $ outerTable = $ builder -> requestTable ( $ schema -> getTable ( ) , $ schema -> getDatabase ( ) ) ; if ( ! $ outerTable -> hasColumn ( $ column -> getName ( ) ) ) { //Column is missing throw new RelationSchemaException ( "Unable to build morphed relation, outer key '{$column->getName()}' " . "is missing in '{$outerTable->getName()}'" ) ; } if ( $ outerTable -> column ( $ column -> getName ( ) ) -> phpType ( ) != $ column -> phpType ( ) ) { //Inconsistent type throw new RelationSchemaException ( "Unable to build morphed relation, outer key '{$column->getName()}' " . "has different type in '{$outerTable->getName()}'" ) ; } } }
Make sure all tables have same outer key.

@param \Spiral\ORM\Schemas\SchemaBuilder                  $builder
@param \Spiral\Database\Schemas\Prototypes\AbstractColumn $column

@throws RelationSchemaException
Make sure all tables have same outer key .