1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
//! Database-level schema definitions.
//!
//! This module represents what the database sees: tables, columns, indices,
//! primary keys, storage types, and migrations. It is the counterpart to the
//! application-level schema in [`super::app`], with the two layers connected
//! by the [`super::mapping`] module.
//!
//! # Key types
//!
//! | Type | Purpose |
//! |------|---------|
//! | [`Schema`] | Collection of all tables in a database |
//! | [`Table`] | A single database table with columns, indices, and a primary key |
//! | [`Column`] | A column within a table, including its name, type, and constraints |
//! | [`Index`] | A database index over one or more columns |
//! | [`Type`] | Database storage type (e.g. `Integer(4)`, `Text`, `VarChar(255)`) |
//! | [`PrimaryKey`] | The primary key definition for a table |
//! | [`Migration`] | A SQL migration generated from a schema diff |
//!
//! # Schema diffing
//!
//! The module provides diff types ([`SchemaDiff`], [`TablesDiff`], [`ColumnsDiff`],
//! [`IndicesDiff`]) that compare two schema versions and produce a list of
//! structural changes. [`RenameHints`] lets callers indicate which items were
//! renamed (rather than dropped and recreated).
pub use ;
pub use ;
pub use ;
pub use ;
pub use PrimaryKey;
pub use ;
pub use ;
pub use ;
pub use ;
pub use Type;