From a46c779bf33cf558d287f8bcf11a5e483046bb17 Mon Sep 17 00:00:00 2001 From: Mart Raudsepp Date: Sun, 4 Dec 2016 07:24:45 +0200 Subject: models: Add Maintainer model As this is a new table, just re-doing "./manage.py init" should add it to db, while keeping old data. --- backend/lib/models.py | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'backend') diff --git a/backend/lib/models.py b/backend/lib/models.py index 57f3e64..bc6cd20 100644 --- a/backend/lib/models.py +++ b/backend/lib/models.py @@ -30,3 +30,14 @@ class PackageVersion(db.Model): def __repr__(self): return "" % (self.package.category.name, self.package.name, self.version) + +class Maintainer(db.Model): + id = db.Column(db.Integer, primary_key=True) + email = db.Column(db.Unicode(50), nullable=False, unique=True) + is_project = db.Column(db.Boolean, nullable=False, server_default='f', default=False) + name = db.Column(db.Unicode(128)) + url = db.Column(db.Unicode()) + description = db.Column(db.Unicode(500)) + + def __repr__(self): + return "" % ("project" if self.is_project else "individual", self.email) -- cgit v1.2.3-65-gdbad