Expand description
Build CREATE TABLE, CREATE TYPE, and related schema statements from
Entity definitions.
Use Schema::new with a DbBackend to get a helper, then call
Schema::builder for a fluent SchemaBuilder that emits sea_query
statements you can execute on a connection. With the entity-registry
and schema-sync feature flags enabled, db.get_schema_registry(prefix)
syncs all registered entities at once.
Structsยง
- Entity
Schema Info - Schema info for Entity. Can be used to re-create schema in database.
- Schema
- Helper that converts an
EntityTraitinto differentsea_querystatements (CREATE TABLE / CREATE TYPE / etc) for a givenDbBackend. - Schema
Builder - A schema builder that can take a registry of Entities and synchronize it with database.