mirror of
https://github.com/grillazz/fastapi-sqlalchemy-asyncpg.git
synced 2025-08-26 16:40:40 +03:00
add schema to models
This commit is contained in:
parent
b63473f9e6
commit
d8ddc0bfc1
@ -11,7 +11,7 @@ from the_app.models.base import Base
|
||||
class Nonsense(Base):
|
||||
__tablename__ = "nonsense"
|
||||
__table_args__ = (
|
||||
{"schema": "the_others"},
|
||||
{"schema": "happy_hog"},
|
||||
)
|
||||
id = Column(UUID(as_uuid=True), unique=True, default=uuid.uuid4, autoincrement=True)
|
||||
name = Column(String, nullable=False, primary_key=True, unique=True)
|
||||
|
@ -11,7 +11,7 @@ from the_app.models.base import Base
|
||||
class Stuff(Base):
|
||||
__tablename__ = "stuff"
|
||||
__table_args__ = (
|
||||
{"schema": "the_others"},
|
||||
{"schema": "happy_hog"},
|
||||
)
|
||||
id = Column(UUID(as_uuid=True), unique=True, default=uuid.uuid4, autoincrement=True)
|
||||
name = Column(String, nullable=False, primary_key=True, unique=True)
|
||||
|
Loading…
x
Reference in New Issue
Block a user