forked from kodorvan/stcs
The database has been converted to SQLite
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
from sqlalchemy.ext.declarative import declarative_base
|
||||
from sqlalchemy.ext.asyncio import AsyncAttrs
|
||||
from sqlalchemy import Column, ForeignKey, Integer, String, BigInteger, Float, Boolean, UniqueConstraint
|
||||
from sqlalchemy import Column, ForeignKey, Integer, String, Float, Boolean, UniqueConstraint
|
||||
from sqlalchemy.orm import relationship
|
||||
|
||||
Base = declarative_base(cls=AsyncAttrs)
|
||||
@@ -11,7 +11,7 @@ class User(Base):
|
||||
__tablename__ = "users"
|
||||
|
||||
id = Column(Integer, primary_key=True, autoincrement=True)
|
||||
tg_id = Column(BigInteger, nullable=False, unique=True)
|
||||
tg_id = Column(Integer, nullable=False, unique=True)
|
||||
username = Column(String, nullable=False)
|
||||
|
||||
user_api = relationship("UserApi",
|
||||
@@ -175,4 +175,4 @@ class UserAutoTrading(Base):
|
||||
fee = Column(Float, nullable=True)
|
||||
total_fee = Column(Float, nullable=True)
|
||||
|
||||
user = relationship("User", back_populates="user_auto_trading")
|
||||
user = relationship("User", back_populates="user_auto_trading")
|
||||
|
Reference in New Issue
Block a user