From e5198b403976f2737f70b410b7ff35520402a347 Mon Sep 17 00:00:00 2001 From: Min RK Date: Fri, 21 May 2021 12:51:03 +0200 Subject: [PATCH] create boolean columns with create_constraint=False matches new default behavior in sqlalchemy 1.4 --- jupyterhub/orm.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jupyterhub/orm.py b/jupyterhub/orm.py index 8f6e2833..26219c72 100644 --- a/jupyterhub/orm.py +++ b/jupyterhub/orm.py @@ -274,7 +274,7 @@ class User(Base): def orm_spawners(self): return {s.name: s for s in self._orm_spawners} - admin = Column(Boolean, default=False) + admin = Column(Boolean(create_constraint=False), default=False) created = Column(DateTime, default=datetime.utcnow) last_activity = Column(DateTime, nullable=True) @@ -386,7 +386,7 @@ class Service(Base): # common user interface: name = Column(Unicode(255), unique=True) - admin = Column(Boolean, default=False) + admin = Column(Boolean(create_constraint=False), default=False) api_tokens = relationship( "APIToken", backref="service", cascade="all, delete-orphan"