mirror of
https://github.com/YunoHost-Apps/ihatemoney_ynh.git
synced 2024-09-03 19:26:15 +02:00
specified sizes for string columns for MySQL
This commit is contained in:
parent
42dd9d54a8
commit
2b598477b7
1 changed files with 5 additions and 5 deletions
|
@ -17,11 +17,11 @@ class Project(db.Model):
|
||||||
_to_serialize = ("id", "name", "password", "contact_email",
|
_to_serialize = ("id", "name", "password", "contact_email",
|
||||||
"members", "active_members", "balance")
|
"members", "active_members", "balance")
|
||||||
|
|
||||||
id = db.Column(db.String, primary_key=True)
|
id = db.Column(db.String(64), primary_key=True)
|
||||||
|
|
||||||
name = db.Column(db.UnicodeText)
|
name = db.Column(db.UnicodeText)
|
||||||
password = db.Column(db.String)
|
password = db.Column(db.String(128))
|
||||||
contact_email = db.Column(db.String)
|
contact_email = db.Column(db.String(128))
|
||||||
members = db.relationship("Person", backref="project")
|
members = db.relationship("Person", backref="project")
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
@ -155,7 +155,7 @@ class Person(db.Model):
|
||||||
_to_serialize = ("id", "name", "activated")
|
_to_serialize = ("id", "name", "activated")
|
||||||
|
|
||||||
id = db.Column(db.Integer, primary_key=True)
|
id = db.Column(db.Integer, primary_key=True)
|
||||||
project_id = db.Column(db.String, db.ForeignKey("project.id"))
|
project_id = db.Column(db.String(64), db.ForeignKey("project.id"))
|
||||||
bills = db.relationship("Bill", backref="payer")
|
bills = db.relationship("Bill", backref="payer")
|
||||||
|
|
||||||
name = db.Column(db.UnicodeText)
|
name = db.Column(db.UnicodeText)
|
||||||
|
@ -230,7 +230,7 @@ class Bill(db.Model):
|
||||||
|
|
||||||
class Archive(db.Model):
|
class Archive(db.Model):
|
||||||
id = db.Column(db.Integer, primary_key=True)
|
id = db.Column(db.Integer, primary_key=True)
|
||||||
project_id = db.Column(db.String, db.ForeignKey("project.id"))
|
project_id = db.Column(db.String(64), db.ForeignKey("project.id"))
|
||||||
name = db.Column(db.UnicodeText)
|
name = db.Column(db.UnicodeText)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
|
Loading…
Reference in a new issue