final class CreateTableMutation
    implements ShadowMutation

Applies CREATE TABLE operation to the virtual schema. This mutation registers a new table in the TableDefinitionRegistry.

Methods§

public function __construct(
    string $tableName,
    TableDefinition|null $definition,
    TableDefinitionRegistry $registry,
    string $sourceSql,
    bool $ifNotExists = false,
)

Parameters

$tableNamestringThe name of the table to create.
$definitionTableDefinition|nullThe parsed table definition.
$registryTableDefinitionRegistryThe registry to register the table.
$sourceSqlstringThe source statement supplied by the database package.
$ifNotExistsboolWhether to skip if table exists.
Test cases 6
public function tableName(): string

{@inheritDoc}

Returns

string
Test cases 1

Private surface 5§

Implementation details, listed for orientation only.

private string $tableName
private ?TableDefinition $definition
private TableDefinitionRegistry $registry
private string $sourceSql
private bool $ifNotExists

Test cases 9§

Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.

Dedicated tests 6
Other tests reaching this symbol 3

Relations§

Constant reads 1