@@ -1558,10 +1558,13 @@ impl RemoveModelBuilder {
15581558 }
15591559}
15601560
1561+ /// Returns a builder for an operation that alters a field in a model.
15611562pub const fn alter_field ( ) -> AlterFieldBuilder {
15621563 AlterFieldBuilder :: new ( )
15631564}
15641565
1566+ /// A builder for altering a field in a model.
1567+ #[ must_use]
15651568#[ derive( Debug , Copy , Clone ) ]
15661569pub struct AlterFieldBuilder {
15671570 table_name : Option < Identifier > ,
@@ -1578,21 +1581,26 @@ impl AlterFieldBuilder {
15781581 }
15791582 }
15801583
1584+ /// Sets the name of the table to alter the field in.
15811585 pub const fn table_name ( mut self , table_name : Identifier ) -> Self {
15821586 self . table_name = Some ( table_name) ;
15831587 self
15841588 }
15851589
1590+ /// Sets the old field definition.
15861591 pub const fn old_field ( mut self , field : Field ) -> Self {
15871592 self . old_field = Some ( field) ;
15881593 self
15891594 }
15901595
1596+ /// Sets the new field definition.
15911597 pub const fn new_field ( mut self , field : Field ) -> Self {
15921598 self . new_field = Some ( field) ;
15931599 self
15941600 }
15951601
1602+ /// Builds the operation.
1603+ #[ must_use]
15961604 pub const fn build ( self ) -> Operation {
15971605 Operation :: new ( OperationInner :: AlterField {
15981606 table_name : unwrap_builder_option ! ( self , table_name) ,
0 commit comments