class schema_generator

The schema generator generates the schema based on the existing migrations

Traits

TopologicalSort

Properties

protected config $config
protected driver_interface $db
protected tools_interface $db_tools
protected array $class_names
protected string $table_prefix
protected string $phpbb_root_path
protected string $php_ext
protected array $tables
protected array $table_names

Methods

__construct(array $class_names, config $config, driver_interface $db, tools_interface $db_tools, string $phpbb_root_path, string $php_ext, string $table_prefix, array $tables)

Constructor

array
get_schema()

Loads all migrations and their application state from the database.

Details

at line 70
__construct(array $class_names, config $config, driver_interface $db, tools_interface $db_tools, string $phpbb_root_path, string $php_ext, string $table_prefix, array $tables)

Constructor

Parameters

array $class_names
config $config
driver_interface $db
tools_interface $db_tools
string $phpbb_root_path
string $php_ext
string $table_prefix
array $tables

at line 99
array get_schema()

Loads all migrations and their application state from the database.

Return Value

array

An array describing the database schema.

Exceptions

UnexpectedValueException

If a migration tries to use an undefined schema change.

UnexpectedValueException

If a dependency can't be resolved or there are circular dependencies between migrations.