RemoveNamespacedAssets
extends AbstractVisitor
in package
Removes assets from a schema that are not in the default namespace.
Some databases such as MySQL support cross databases joins, but don't allow to call DDLs to a database from another connected database. Before a schema is serialized into SQL this visitor can cleanup schemas with non default namespaces.
This visitor filters all these non-default namespaced tables and sequences and removes them from the Schema instance.
Tags
Table of Contents
Properties
Methods
- __construct() : mixed
- acceptColumn() : void
- acceptForeignKey() : void
- acceptIndex() : void
- acceptNamespace() : void
- Accepts a schema namespace name.
- acceptSchema() : void
- acceptSequence() : void
- acceptTable() : void
Properties
$schema
private
Schema|null
$schema
= null
Methods
__construct()
public
__construct() : mixed
acceptColumn()
public
acceptColumn(Table $table, Column $column) : void
Parameters
acceptForeignKey()
public
acceptForeignKey(Table $localTable, ForeignKeyConstraint $fkConstraint) : void
Parameters
- $localTable : Table
- $fkConstraint : ForeignKeyConstraint
acceptIndex()
public
acceptIndex(Table $table, Index $index) : void
Parameters
acceptNamespace()
Accepts a schema namespace name.
public
acceptNamespace(mixed $namespaceName) : void
Parameters
- $namespaceName : mixed
-
The schema namespace name to accept.
acceptSchema()
public
acceptSchema(Schema $schema) : void
Parameters
- $schema : Schema
acceptSequence()
public
acceptSequence(Sequence $sequence) : void
Parameters
- $sequence : Sequence
acceptTable()
public
acceptTable(Table $table) : void
Parameters
- $table : Table