Schema

This class is a utility to modify database and table schemas.


Get Current database


Change database


Check if a database exists


Find all databases


Find all databases by name:


Create a database


Create a table with custom character set and collation:


Change the database


Find all tables


Find all tables by name:


Check whether table exists


Delete all rows

Deprecated: Use DeleteQuery instead


Truncate a table

Delete all rows and reset the auto increment value:


Rename a table


Copy a table

Copy an existing table to a new table:


Get all column names of a table


Get all column details of a table


Compare tables

Compare two tables and returns true if the table schema match:


Get the table schema hash

Calculate a hash key (SHA1) using a table schema. Used to quickly compare table structures or schema versions.


Next page: Compression