refactor: ColumnSpec / AddColumn carry constraint fields (ADR-0029 scaffolding)
Expand ColumnSpec and Command::AddColumn with the four ADR-0029 constraint slots (not_null, unique, default, check), all defaulting off; `Database::add_column` now takes a ColumnSpec. No behaviour change — the grammar to set the fields and the DDL to enforce them land in the following commits. Isolated here so those commits stay readable. Adds ColumnSpec::new for the unconstrained case; 110 call sites updated. 1172 tests pass; clippy clean.
This commit is contained in:
@@ -165,14 +165,8 @@ fn db_persists_across_open_close_cycles() {
|
||||
db.create_table(
|
||||
"Customers".to_string(),
|
||||
vec![
|
||||
rdbms_playground::dsl::ColumnSpec {
|
||||
name: "id".to_string(),
|
||||
ty: rdbms_playground::dsl::Type::Serial,
|
||||
},
|
||||
rdbms_playground::dsl::ColumnSpec {
|
||||
name: "Name".to_string(),
|
||||
ty: rdbms_playground::dsl::Type::Text,
|
||||
},
|
||||
rdbms_playground::dsl::ColumnSpec::new("id".to_string(), rdbms_playground::dsl::Type::Serial),
|
||||
rdbms_playground::dsl::ColumnSpec::new("Name".to_string(), rdbms_playground::dsl::Type::Text),
|
||||
],
|
||||
vec!["id".to_string()],
|
||||
None)
|
||||
|
||||
Reference in New Issue
Block a user