Creates complete tables schemas in the database based on the entity metadatas.
Steps how schema is being built:
Used to execute schema creation queries in a single connection.
Returns only entities that should be synced in the database.
Adds columns from metadata which does not exist in the table. Columns are created without keys.
Creates complete schemas for the given entity metadatas.
Creates composite uniques which are missing in db yet.
Creates foreign keys which does not exist in the table yet.
Creates composite indices which are missing in db yet.
Creates tables that do not exist in the database yet. New tables are created without foreign and primary keys. Primary key only can be created in conclusion with auto generated column.
Drops all composite indices, related to given column.
Drops all composite uniques, related to given column.
Drops all foreign keys where given column of the given table is being used.
Drops all (old) foreign keys that exist in the tables, but do not exist in the entity metadata.
Drops all columns that exist in the table, but does not exist in the metadata (left old). We drop their keys too, since it should be safe.
Executes schema sync operations in a proper order. Order of operations matter here.
Returns sql queries to be executed by schema builder.
Renames columns. Works if only one column per table was changed. Changes only column name. If something besides name was changed, these changes will be ignored.
Update all exist columns which metadata has changed. Still don't create keys. Also we don't touch foreign keys of the changed columns.
Updates composite primary keys.
Generated using TypeDoc