Is it possible to update schema once created? #1498
Answered
by
voxofox
perfecto25
asked this question in
Questions
-
First Check
Commit to Help
Example Codeclass Xconnect(SQLModel, table=True):
id: int = Field(primary_key=True)
lvc: Optional[str] = Field(sa_column_kwargs={"unique": True})
customer: int = Field(foreign_key="customer.id")
region: int = Field(foreign_key="attr.id") DescriptionIm trying to see if I can update the exisitng generated table Xconnect without deleting and recreating it, for example, if I wantto make the Region field Optional, adding
will not update the existing schema bcs the table is already created. How can I update the existing schema? Do I need to use Alembic for this? Operating SystemLinux Operating System Detailslinux mint 19 SQLModel Version0.0.5 Python Version3.8 Additional ContextNo response |
Beta Was this translation helpful? Give feedback.
Answered by
voxofox
Mar 30, 2022
Replies: 1 comment
-
As you've mentioned, Alembic would be a good solve. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
YuriiMotov
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
As you've mentioned, Alembic would be a good solve.