Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions backend/alembic/env.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,11 @@
# from apps.system.models.user import SQLModel # noqa
# from apps.settings.models.setting_models import SQLModel
# from apps.chat.models.chat_model import SQLModel
from apps.terminology.models.terminology_model import SQLModel
from apps.data_training.models.data_training_model import SQLModel
# from apps.terminology.models.terminology_model import SQLModel
# from apps.data_training.models.data_training_model import SQLModel
# from apps.dashboard.models.dashboard_model import SQLModel
from common.core.config import settings # noqa
from apps.datasource.models.datasource import SQLModel

target_metadata = SQLModel.metadata

Expand Down
6 changes: 3 additions & 3 deletions backend/apps/datasource/models/datasource.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

class CoreDatasource(SQLModel, table=True):
__tablename__ = "core_datasource"
id: int = Field(sa_column=Column(Integer, Identity(always=True), nullable=False, primary_key=True))
id: int = Field(sa_column=Column(BigInteger, Identity(always=True), nullable=False, primary_key=True))
name: str = Field(max_length=128, nullable=False)
description: str = Field(max_length=512, nullable=True)
type: str = Field(max_length=64)
Expand All @@ -23,7 +23,7 @@ class CoreDatasource(SQLModel, table=True):

class CoreTable(SQLModel, table=True):
__tablename__ = "core_table"
id: int = Field(sa_column=Column(Integer, Identity(always=True), nullable=False, primary_key=True))
id: int = Field(sa_column=Column(BigInteger, Identity(always=True), nullable=False, primary_key=True))
ds_id: int = Field(sa_column=Column(BigInteger()))
checked: bool = Field(default=True)
table_name: str = Field(sa_column=Column(Text))
Expand All @@ -33,7 +33,7 @@ class CoreTable(SQLModel, table=True):

class CoreField(SQLModel, table=True):
__tablename__ = "core_field"
id: int = Field(sa_column=Column(Integer, Identity(always=True), nullable=False, primary_key=True))
id: int = Field(sa_column=Column(BigInteger, Identity(always=True), nullable=False, primary_key=True))
ds_id: int = Field(sa_column=Column(BigInteger()))
table_id: int = Field(sa_column=Column(BigInteger()))
checked: bool = Field(default=True)
Expand Down