Skip to content

Commit 0f7f9d3

Browse files
committed
[DOP-25451] Fix connection.type column length
1 parent aab2126 commit 0f7f9d3

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

docs/reference/database/structure.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ Database structure
4646
* id: bigint
4747
----
4848
group_id: bigint
49-
type: varchar(23)
49+
type: varchar(32)
5050
name: varchar(123)
5151
description: varchar(512)
5252
data: json

syncmaster/db/migrations/versions/2023-11-23_0004_create_connection_table.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def upgrade():
3030
"connection",
3131
sa.Column("id", sa.BigInteger(), nullable=False),
3232
sa.Column("group_id", sa.BigInteger(), nullable=False),
33-
sa.Column("type", sa.String(length=23), nullable=False),
33+
sa.Column("type", sa.String(length=32), nullable=False),
3434
sa.Column("name", sa.String(length=128), nullable=False),
3535
sa.Column("description", sa.String(length=512), nullable=False),
3636
sa.Column("data", sa.JSON(), nullable=False),

syncmaster/db/models/connection.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class ConnectionType(StrEnum):
3232

3333

3434
class Connection(Base, ResourceMixin, TimestampMixin):
35-
type: Mapped[ConnectionType] = mapped_column(ChoiceType(ConnectionType, impl=String(23)), nullable=False)
35+
type: Mapped[ConnectionType] = mapped_column(ChoiceType(ConnectionType, impl=String(32)), nullable=False)
3636
data: Mapped[dict[str, Any]] = mapped_column(JSON, nullable=False, default={})
3737

3838
group: Mapped[Group] = relationship("Group")

0 commit comments

Comments
 (0)