Commit c3b97fdd239b516cbc0308762a130f103e7c2f1a

Fix db create error in MySQL

  - MySQL needs fixed lengths in VARCHAR datatypes. Fixing code to have that
    for MySQL.
dbsetup.py
(5 / 3)
  
2020
2121# Import all modules which represents a SQLAlchemy model;
2222# they have corresponding tables that are needed to be created
23from swtstore.classes.models import Sweet, Context, Client, AuthorizedClients
23from swtstore.classes.models import Sweet, Context, Client
2424from swtstore.classes.models.um import User, Group, Membership
2525
26# Create them!
27db.create_all()
26
27if __name__ == '__main__':
28 # Create them!
29 db.create_all()
  
2525 context_id = db.Column(db.Integer, db.ForeignKey('contexts.id'))
2626 what = db.relationship('Context')
2727
28 where = db.Column(db.String, nullable=False)
28 where = db.Column(db.UnicodeText, nullable=False)
2929
3030 how = db.Column(JSONType)
3131
  
1515 similarly, convert string to dict while loading from database
1616 """
1717
18 impl = types.Unicode
18 impl = types.UnicodeText
1919
2020 def process_bind_param(self, value, dialect):
2121 return json.dumps(value)