Refact: simplify model name

This commit is contained in:
Bertrand Benjamin 2022-12-21 06:53:27 +01:00
parent 309e9627e7
commit ba750989d8

View File

@ -1,11 +1,11 @@
from sqlalchemy import Column, MetaData, String, Table from sqlalchemy import Column, MetaData, String, Table
from sqlalchemy.orm import mapper from sqlalchemy.orm import mapper
from backend.model.tribe import Tribe as TribeModel from backend.model.tribe import Tribe
metadata = MetaData() metadata = MetaData()
tribes = Table( tribes_table = Table(
"tribes", "tribes",
metadata, metadata,
Column("name", String(255), primary_key=True), Column("name", String(255), primary_key=True),
@ -14,4 +14,4 @@ tribes = Table(
def start_mappers(): def start_mappers():
tribes_mapper = mapper(TribeModel, tribes) tribes_mapper = mapper(Tribe, tribes_table)