
from sqlalchemy import Column, String, DateTime, Binary
from sqlalchemy.ext.declarative import declarative_base

SessionBase = declarative_base()

class Session(SessionBase):
    __tablename__  = 'Sessions'

    sess_id         = Column(String(100), primary_key = True)
    session_pool_id = Column(String(100), nullable = False)
    start_date      = Column(DateTime(),  nullable = False)
    latest_access   = Column(DateTime())
    latest_change   = Column(DateTime())
    session_obj     = Column(Binary(), nullable = False)

    def __init__(self, sess_id, session_pool_id, start_date, session_obj):
        self.sess_id         = sess_id
        self.session_pool_id = session_pool_id
        self.start_date      = start_date
        self.session_obj     = session_obj



from sqlalchemy import Column, String, DateTime, LargeBinary
from sqlalchemy.ext.declarative import declarative_base

SessionBase = declarative_base()

class Session(SessionBase):
    __tablename__  = 'Sessions'

    sess_id         = Column(String(100), primary_key = True)
    session_pool_id = Column(String(100), nullable = False)
    start_date      = Column(DateTime(),  nullable = False)
    latest_access   = Column(DateTime())
    latest_change   = Column(DateTime())
    session_obj     = Column(LargeBinary(), nullable = False)

    def __init__(self, sess_id, session_pool_id, start_date, session_obj):
        self.sess_id         = sess_id
        self.session_pool_id = session_pool_id
        self.start_date      = start_date
        self.session_obj     = session_obj


Remove sqlalchemy 0.7 warning (Binary => LargeBinary)
Remove sqlalchemy 0.7 warning (Binary => LargeBinary)

  
- from sqlalchemy import Column, String, DateTime, Binary
+ from sqlalchemy import Column, String, DateTime, LargeBinary
  from sqlalchemy.ext.declarative import declarative_base
  
  SessionBase = declarative_base()
  
  class Session(SessionBase):
      __tablename__  = 'Sessions'
  
      sess_id         = Column(String(100), primary_key = True)
      session_pool_id = Column(String(100), nullable = False)
      start_date      = Column(DateTime(),  nullable = False)
      latest_access   = Column(DateTime())
      latest_change   = Column(DateTime())
-     session_obj     = Column(Binary(), nullable = False)
+     session_obj     = Column(LargeBinary(), nullable = False)
  
      def __init__(self, sess_id, session_pool_id, start_date, session_obj):
          self.sess_id         = sess_id
          self.session_pool_id = session_pool_id
          self.start_date      = start_date
          self.session_obj     = session_obj
  
  
Remove sqlalchemy 0.7 warning (Binary => LargeBinary)
## Code Before:

from sqlalchemy import Column, String, DateTime, Binary
from sqlalchemy.ext.declarative import declarative_base

SessionBase = declarative_base()

class Session(SessionBase):
    __tablename__  = 'Sessions'

    sess_id         = Column(String(100), primary_key = True)
    session_pool_id = Column(String(100), nullable = False)
    start_date      = Column(DateTime(),  nullable = False)
    latest_access   = Column(DateTime())
    latest_change   = Column(DateTime())
    session_obj     = Column(Binary(), nullable = False)

    def __init__(self, sess_id, session_pool_id, start_date, session_obj):
        self.sess_id         = sess_id
        self.session_pool_id = session_pool_id
        self.start_date      = start_date
        self.session_obj     = session_obj


## Instruction:
Remove sqlalchemy 0.7 warning (Binary => LargeBinary)
## Code After:

from sqlalchemy import Column, String, DateTime, LargeBinary
from sqlalchemy.ext.declarative import declarative_base

SessionBase = declarative_base()

class Session(SessionBase):
    __tablename__  = 'Sessions'

    sess_id         = Column(String(100), primary_key = True)
    session_pool_id = Column(String(100), nullable = False)
    start_date      = Column(DateTime(),  nullable = False)
    latest_access   = Column(DateTime())
    latest_change   = Column(DateTime())
    session_obj     = Column(LargeBinary(), nullable = False)

    def __init__(self, sess_id, session_pool_id, start_date, session_obj):
        self.sess_id         = sess_id
        self.session_pool_id = session_pool_id
        self.start_date      = start_date
        self.session_obj     = session_obj

