@@ -303,6 +303,7 @@ pub async fn cmd_revision(message: String, fill_with_args: Vec<String>) -> Resul
303303 prompt_enum_value,
304304 ) ?;
305305
306+ plan. id = uuid:: Uuid :: new_v4 ( ) . to_string ( ) ;
306307 plan. comment = Some ( message) ;
307308 if plan. created_at . is_none ( ) {
308309 // Record creation time in RFC3339 (UTC).
@@ -521,6 +522,7 @@ mod tests {
521522 fn check_non_nullable_fk_add_column_fails ( ) {
522523 use vespertide_core:: { ColumnDef , ColumnType , SimpleColumnType } ;
523524 let plan = MigrationPlan {
525+ id : String :: new ( ) ,
524526 comment : None ,
525527 created_at : None ,
526528 version : 2 ,
@@ -567,6 +569,7 @@ mod tests {
567569 fn check_nullable_fk_add_column_ok ( ) {
568570 use vespertide_core:: { ColumnDef , ColumnType , SimpleColumnType } ;
569571 let plan = MigrationPlan {
572+ id : String :: new ( ) ,
570573 comment : None ,
571574 created_at : None ,
572575 version : 2 ,
@@ -607,6 +610,7 @@ mod tests {
607610 // Regular non-nullable column without FK should NOT be blocked
608611 use vespertide_core:: { ColumnDef , ColumnType , SimpleColumnType } ;
609612 let plan = MigrationPlan {
613+ id : String :: new ( ) ,
610614 comment : None ,
611615 created_at : None ,
612616 version : 2 ,
@@ -671,6 +675,7 @@ mod tests {
671675 use vespertide_core:: MigrationPlan ;
672676
673677 let mut plan = MigrationPlan {
678+ id : String :: new ( ) ,
674679 comment : None ,
675680 created_at : None ,
676681 version : 1 ,
@@ -712,6 +717,7 @@ mod tests {
712717 use vespertide_core:: MigrationPlan ;
713718
714719 let mut plan = MigrationPlan {
720+ id : String :: new ( ) ,
715721 comment : None ,
716722 created_at : None ,
717723 version : 1 ,
@@ -744,6 +750,7 @@ mod tests {
744750 use vespertide_core:: MigrationPlan ;
745751
746752 let mut plan = MigrationPlan {
753+ id : String :: new ( ) ,
747754 comment : None ,
748755 created_at : None ,
749756 version : 1 ,
@@ -786,6 +793,7 @@ mod tests {
786793 use vespertide_core:: MigrationPlan ;
787794
788795 let mut plan = MigrationPlan {
796+ id : String :: new ( ) ,
789797 comment : None ,
790798 created_at : None ,
791799 version : 1 ,
@@ -828,6 +836,7 @@ mod tests {
828836 use vespertide_core:: MigrationPlan ;
829837
830838 let mut plan = MigrationPlan {
839+ id : String :: new ( ) ,
831840 comment : None ,
832841 created_at : None ,
833842 version : 1 ,
@@ -888,6 +897,7 @@ mod tests {
888897 use vespertide_core:: MigrationPlan ;
889898
890899 let mut plan = MigrationPlan {
900+ id : String :: new ( ) ,
891901 comment : None ,
892902 created_at : None ,
893903 version : 1 ,
@@ -1149,6 +1159,7 @@ mod tests {
11491159 use vespertide_core:: MigrationPlan ;
11501160
11511161 let mut plan = MigrationPlan {
1162+ id : String :: new ( ) ,
11521163 comment : None ,
11531164 created_at : None ,
11541165 version : 1 ,
@@ -1206,6 +1217,7 @@ mod tests {
12061217
12071218 // Plan with no missing fill_with values (nullable column)
12081219 let mut plan = MigrationPlan {
1220+ id : String :: new ( ) ,
12091221 comment : None ,
12101222 created_at : None ,
12111223 version : 1 ,
@@ -1249,6 +1261,7 @@ mod tests {
12491261 use vespertide_core:: MigrationPlan ;
12501262
12511263 let mut plan = MigrationPlan {
1264+ id : String :: new ( ) ,
12521265 comment : None ,
12531266 created_at : None ,
12541267 version : 1 ,
@@ -1299,6 +1312,7 @@ mod tests {
12991312 use vespertide_core:: MigrationPlan ;
13001313
13011314 let mut plan = MigrationPlan {
1315+ id : String :: new ( ) ,
13021316 comment : None ,
13031317 created_at : None ,
13041318 version : 1 ,
0 commit comments