fix: Allow open_registrations to be nullable

pull/39/head
db0 2023-09-26 17:15:06 +02:00
parent 95fdafb703
commit f6fc064440
2 changed files with 3 additions and 2 deletions

View File

@ -101,7 +101,7 @@ class Instance(db.Model):
updated = db.Column(db.DateTime, default=datetime.utcnow, nullable=False)
oprhan_since = db.Column(db.DateTime, nullable=True)
open_registrations = db.Column(db.Boolean, unique=False, nullable=False, index=True)
open_registrations = db.Column(db.Boolean, unique=False, nullable=True, index=True)
email_verify = db.Column(db.Boolean, unique=False, nullable=True, index=True)
approval_required = db.Column(db.Boolean, unique=False, nullable=True, index=True)
has_captcha = db.Column(db.Boolean, unique=False, nullable=True, index=True)

View File

@ -1 +1,2 @@
ALTER TYPE reporttype ADD VALUE 'FLAG';
ALTER TYPE reporttype ADD VALUE 'FLAG';
ALTER TABLE instances ALTER COLUMN open_registrations DROP NOT NULL;