Fix password field type length

This commit is contained in:
Ben 2019-04-27 00:12:55 +01:00
parent fcff0cd405
commit e50e38b78d
2 changed files with 2 additions and 2 deletions

View File

@ -7,7 +7,7 @@ class Penguin(db.Model):
ID = db.Column(db.Integer, primary_key=True, server_default=db.text("nextval('\"penguin_ID_seq\"'::regclass)")) ID = db.Column(db.Integer, primary_key=True, server_default=db.text("nextval('\"penguin_ID_seq\"'::regclass)"))
Username = db.Column(db.String(12), nullable=False, unique=True) Username = db.Column(db.String(12), nullable=False, unique=True)
Nickname = db.Column(db.String(30), nullable=False) Nickname = db.Column(db.String(30), nullable=False)
Password = db.Column(db.CHAR(255), nullable=False) Password = db.Column(db.CHAR(60), nullable=False)
Email = db.Column(db.String(255), nullable=False, index=True) Email = db.Column(db.String(255), nullable=False, index=True)
RegistrationDate = db.Column(db.DateTime, nullable=False, server_default=db.text("now()")) RegistrationDate = db.Column(db.DateTime, nullable=False, server_default=db.text("now()"))
Active = db.Column(db.Boolean, nullable=False, server_default=db.text("false")) Active = db.Column(db.Boolean, nullable=False, server_default=db.text("false"))

View File

@ -378,7 +378,7 @@ CREATE TABLE penguin (
"ID" SERIAL, "ID" SERIAL,
"Username" VARCHAR(12) NOT NULL, "Username" VARCHAR(12) NOT NULL,
"Nickname" VARCHAR(30) NOT NULL, "Nickname" VARCHAR(30) NOT NULL,
"Password" CHAR(255) NOT NULL, "Password" CHAR(60) NOT NULL,
"Email" VARCHAR(255) NOT NULL, "Email" VARCHAR(255) NOT NULL,
"RegistrationDate" TIMESTAMP NOT NULL, "RegistrationDate" TIMESTAMP NOT NULL,
"Active" BOOLEAN NOT NULL DEFAULT FALSE, "Active" BOOLEAN NOT NULL DEFAULT FALSE,