Allow 255 chars for Realname

This commit is contained in:
Archambault, Samuel 2017-06-19 12:19:30 -04:00
parent 6ee631d1eb
commit 18cea61121
4 changed files with 4 additions and 4 deletions

View File

@ -47,7 +47,7 @@ create table user (
# 11 bytes is reserved for marking the deleted users.
email varchar(255),
password varchar(40) NOT NULL,
realname varchar (20) NOT NULL,
realname varchar (255) NOT NULL,
comment varchar (30),
deleted tinyint (1) DEFAULT 0 NOT NULL,
reset_uuid varchar(40) DEFAULT NULL,

View File

@ -44,7 +44,7 @@ create table user (
*/
email varchar(255),
password varchar(40) NOT NULL,
realname varchar (20) NOT NULL,
realname varchar (255) NOT NULL,
comment varchar (30),
deleted tinyint (1) DEFAULT 0 NOT NULL,
reset_uuid varchar(40) DEFAULT NULL,

View File

@ -374,7 +374,7 @@ func commonValidate(user models.User) error {
return fmt.Errorf("Email can't be empty")
}
if isIllegalLength(user.Realname, 1, 20) {
if isIllegalLength(user.Realname, 1, 255) {
return fmt.Errorf("realname with illegal length")
}

View File

@ -15,7 +15,7 @@ class User(Base):
username = sa.Column(sa.String(15), unique=True)
email = sa.Column(sa.String(30), unique=True)
password = sa.Column(sa.String(40), nullable=False)
realname = sa.Column(sa.String(20), nullable=False)
realname = sa.Column(sa.String(255), nullable=False)
comment = sa.Column(sa.String(30))
deleted = sa.Column(sa.Integer, nullable=False, server_default=sa.text("'0'"))
reset_uuid = sa.Column(sa.String(40))