Skip to content

Instantly share code, notes, and snippets.

@mmahesh
Created October 22, 2013 10:31
Show Gist options
  • Save mmahesh/7098365 to your computer and use it in GitHub Desktop.
Save mmahesh/7098365 to your computer and use it in GitHub Desktop.
horus traceback2
#my user model
from datatime import datetime
class User(UserMixin, Base):
last_login_date = Column(DateTime,nullable=False)
registered_date = Column(DateTime, default=datetime.utcnow,nullable=False)
#traceback
sqlalchemy.exc.InternalError: (InternalError) (1071, 'Specified key was too long; max key length is 767 bytes') '\nCREATE TABLE user (\n\tlast_login_date DATETIME NOT NULL, \n\tregistered_date DATETIME NOT NULL, \n\temail VARCHAR(100) NOT NULL, \n\tpassword VARCHAR(256) NOT NULL, \n\tactivation_id INTEGER, \n\tstatus INTEGER, \n\tusername VARCHAR(30) NOT NULL, \n\tsalt VARCHAR(256) NOT NULL, \n\tsecurity_code VARCHAR(256), \n\tid INTEGER NOT NULL AUTO_INCREMENT, \n\tPRIMARY KEY (id), \n\tUNIQUE (email), \n\tFOREIGN KEY(activation_id) REFERENCES activation (id), \n\tUNIQUE (username), \n\tUNIQUE (security_code)\n)CHARSET=utf8 ENGINE=InnoDB\n\n' ()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment