修改授权表,去掉外键
This commit is contained in:
@@ -25,7 +25,7 @@ class UserOAuth(Base, TimestampMixin, SoftDeleteMixin):
|
||||
String(128), nullable=True, comment="授权账户登录账号"
|
||||
)
|
||||
user_id: Mapped[str] = mapped_column(
|
||||
String(32), ForeignKey("users.id", ondelete="CASCADE"), nullable=False, index=True,
|
||||
String(32), nullable=False, index=True,
|
||||
comment="用户id"
|
||||
)
|
||||
open_type: Mapped[int] = mapped_column(
|
||||
|
||||
@@ -11,7 +11,7 @@ class UserOAuthAccount(Base, TimestampMixin, SoftDeleteMixin):
|
||||
String(32), primary_key=True, comment="主键"
|
||||
)
|
||||
account_id: Mapped[str] = mapped_column(
|
||||
String(64), ForeignKey("user_oauth.account_id", ondelete="CASCADE"),
|
||||
String(64),
|
||||
nullable=False, index=True, comment="授权账户id(user_oauth表中同一个)"
|
||||
)
|
||||
advertiser_id: Mapped[str | None] = mapped_column(
|
||||
|
||||
@@ -23,5 +23,5 @@ class UserOAuthApp(Base, TimestampMixin, SoftDeleteMixin):
|
||||
BigInteger, nullable=False, index=True, comment="开户方式(1=千川,2=广告,3=本地推,4=星图,5=快手代理商,6=巨量星图,7=巨量服务单,8=腾讯服务单,9=腾讯营销K2,10=腾讯营销K3)"
|
||||
)
|
||||
create_by: Mapped[str | None] = mapped_column(
|
||||
String(32), ForeignKey("users.id", ondelete="SET NULL"), nullable=True, comment="创建者"
|
||||
String(32), nullable=True, comment="创建者"
|
||||
)
|
||||
Reference in New Issue
Block a user