SchemaUtils
Utility functions that assist with creating, altering, and dropping database schema objects.
Functions
Checks whether any of the tables have a sequence of foreign key constraints that cycle back to them.
Checks all tables for any that have more than one defined foreign key constraint and logs the findings. If found, this function also logs the SQL statements that can be used to drop these foreign key constraints.
Log Exposed table mappings <-> real database mapping problems and returns DDL Statements to fix them
Creates databases
Returns the SQL statements that create the provided ForeignKeyConstraint.
Returns the SQL statements that create the provided index.
This function should be used in cases when an easy-to-use auto-actualization of database schema is required. It creates any missing tables and, if possible, adds any missing columns for existing tables (for example, when columns are nullable or have default values).
Creates schemas
Creates the provided sequences, using a batch execution if inBatch is set to true
.
Returns the SQL statements that create all tables that do not already exist.
Drops databases
Drops schemas
Drops the provided sequences, using a batch execution if inBatch is set to true
.
Returns a list of all databases.
Retrieves a list of all table names in the current database.
Returns the SQL statements that need to be executed to make the existing database schema compatible with the table objects defined using Exposed.
Creates table with name "busy" (if not present) and single column to be used as "synchronization" point. Table wont be dropped after execution.