refactor: moving more models to mapped_column
This commit is contained in:
parent
ea020d6edd
commit
75b2c1adf0
9 changed files with 272 additions and 94 deletions
|
@ -1,7 +1,11 @@
|
|||
from typing import Optional
|
||||
|
||||
from sqlalchemy.orm import Mapped, mapped_column
|
||||
|
||||
from app.extensions import db
|
||||
|
||||
|
||||
class TerraformState(db.Model): # type: ignore
|
||||
key = db.Column(db.String, primary_key=True)
|
||||
state = db.Column(db.String)
|
||||
lock = db.Column(db.String)
|
||||
key: Mapped[str] = mapped_column(db.String, primary_key=True)
|
||||
state: Mapped[str]
|
||||
lock: Mapped[Optional[str]]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue