Skip to content

Commit 34862b0

Browse files
committed
Fix migrations
1 parent 247ad1b commit 34862b0

File tree

7 files changed

+8
-8
lines changed

7 files changed

+8
-8
lines changed

syncmaster/db/models/auth_data.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111

1212
class AuthData(Base, TimestampMixin):
13-
__table_name__ = "auth_data"
13+
__tablename__ = "auth_data"
1414

1515
connection_id: Mapped[int] = mapped_column(
1616
BigInteger,

syncmaster/db/models/connection.py

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

3434

3535
class Connection(Base, ResourceMixin, TimestampMixin):
36-
__table_name__ = "connection"
36+
__tablename__ = "connection"
3737
__table_args__ = (
3838
UniqueConstraint("name", "group_id"),
3939
Index("idx_connection_search_vector", "search_vector", postgresql_using="gin"),

syncmaster/db/models/group.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ def roles_at_least(cls, role: str | GroupMemberRole) -> list[str]:
6666

6767

6868
class Group(Base, TimestampMixin):
69-
__table_name__ = "group"
69+
__tablename__ = "group"
7070

7171
id: Mapped[int] = mapped_column(BigInteger, primary_key=True)
7272
name: Mapped[str] = mapped_column(String(128), nullable=False, unique=True)
@@ -101,7 +101,7 @@ def __repr__(self) -> str:
101101

102102

103103
class UserGroup(Base):
104-
__table_name__ = "user_group"
104+
__tablename__ = "user_group"
105105
__table_args__ = (PrimaryKeyConstraint("user_id", "group_id"),)
106106

107107
user_id: Mapped[int] = mapped_column(

syncmaster/db/models/queue.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313

1414
class Queue(Base, ResourceMixin, TimestampMixin):
15-
__table_name__ = "queue"
15+
__tablename__ = "queue"
1616

1717
name: Mapped[str] = mapped_column(String(128), nullable=False)
1818
slug: Mapped[str] = mapped_column(String(256), nullable=False, unique=True)

syncmaster/db/models/run.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class RunType(enum.StrEnum):
3030

3131

3232
class Run(Base, TimestampMixin):
33-
__table_name__ = "run"
33+
__tablename__ = "run"
3434

3535
id: Mapped[int] = mapped_column(
3636
BigInteger,

syncmaster/db/models/transfer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class Transfer(
2929
ResourceMixin,
3030
TimestampMixin,
3131
):
32-
__table_name__ = "transfer"
32+
__tablename__ = "transfer"
3333
__table_args__ = (
3434
UniqueConstraint("name", "group_id"),
3535
Index("idx_transfer_search_vector", "search_vector", postgresql_using="gin"),

syncmaster/db/models/user.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111

1212
class User(Base, TimestampMixin):
13-
__table_name__ = "user"
13+
__tablename__ = "user"
1414

1515
id: Mapped[int] = mapped_column(BigInteger, primary_key=True)
1616
username: Mapped[str] = mapped_column(String(256), nullable=False, unique=True, index=True)

0 commit comments

Comments
 (0)