@@ -42,24 +42,24 @@ class Database(FireboltBaseModel):
4242 _service : DatabaseService = PrivateAttr ()
4343
4444 # required
45- name : str = Field (min_length = 1 , max_length = 255 , regex = r"^[0-9a-zA-Z_]+$" )
45+ name : str = Field (min_length = 1 , max_length = 255 , pattern = r"^[0-9a-zA-Z_]+$" )
4646 compute_region_key : RegionKey = Field (alias = "compute_region_id" )
4747
4848 # optional
49- database_key : Optional [DatabaseKey ] = Field (None , alias = "id" )
50- description : Optional [str ] = Field (None , max_length = 255 )
51- emoji : Optional [str ] = Field (None , max_length = 255 )
52- current_status : Optional [str ]
53- health_status : Optional [str ]
54- data_size_full : Optional [int ]
55- data_size_compressed : Optional [int ]
56- is_system_database : Optional [bool ]
57- storage_bucket_name : Optional [str ]
58- create_time : Optional [datetime ]
59- create_actor : Optional [str ]
60- last_update_time : Optional [datetime ]
61- last_update_actor : Optional [str ]
62- desired_status : Optional [str ]
49+ database_key : Optional [DatabaseKey ] = Field (default = None , alias = "id" )
50+ description : Optional [str ] = Field (default = None , max_length = 255 )
51+ emoji : Optional [str ] = Field (default = None , max_length = 255 )
52+ current_status : Optional [str ] = None
53+ health_status : Optional [str ] = None
54+ data_size_full : Optional [int ] = None
55+ data_size_compressed : Optional [int ] = None
56+ is_system_database : Optional [bool ] = None
57+ storage_bucket_name : Optional [str ] = None
58+ create_time : Optional [datetime ] = None
59+ create_actor : Optional [str ] = None
60+ last_update_time : Optional [datetime ] = None
61+ last_update_actor : Optional [str ] = None
62+ desired_status : Optional [str ] = None
6363
6464 @classmethod
6565 def parse_obj_with_service (
@@ -142,6 +142,7 @@ class _DatabaseUpdateRequest(FireboltBaseModel):
142142
143143 self .description = description
144144
145+ assert self .database_id is not None , "Database must have database_id"
145146 logger .info (
146147 f"Updating Database (database_id={ self .database_id } , "
147148 f"name={ self .name } , description={ self .description } )"
0 commit comments