Skip to content
Snippets Groups Projects

alter email in partner table and make it required

Merged Mohammad Torkashvand requested to merge refactor/NAT-472-add-partner-model into develop
Files
3
+ 6
5
@@ -33,18 +33,19 @@ class PartnerTable(BaseModel):
__tablename__ = "partners"
partner_id = mapped_column(String, server_default=text("uuid_generate_v4"), primary_key=True)
name = mapped_column(String, unique=True)
email = mapped_column(String, unique=True, nullable=True)
name = mapped_column(String, unique=True, nullable=True)
email = mapped_column(String, unique=True, nullable=False)
partner_type = mapped_column(Enum(PartnerType), nullable=False)
as_number = mapped_column(
String, unique=True
String, unique=True, nullable=True
) # the as_number and as_set are mutually exclusive. if you give me one I don't need the other
as_set = mapped_column(String)
as_set = mapped_column(String, nullable=True)
route_set = mapped_column(String, nullable=True)
black_listed_as_sets = mapped_column(ARRAY(String), nullable=True)
additional_routers = mapped_column(ARRAY(String), nullable=True)
additional_bgp_speakers = mapped_column(ARRAY(String), nullable=True)
partner_type = mapped_column(Enum(PartnerType), nullable=False)
created_at = mapped_column(UtcTimestamp, server_default=text("current_timestamp"), nullable=False)
updated_at = mapped_column(
UtcTimestamp, server_default=text("current_timestamp"), nullable=False, onupdate=text("current_timestamp")
Loading