mirror of
https://codeberg.org/Mo8it/AdvLabDB.git
synced 2024-12-20 23:41:20 +00:00
Fixed weighting defaults
This commit is contained in:
parent
62c30001cd
commit
bd393796f5
1 changed files with 6 additions and 3 deletions
|
@ -192,12 +192,17 @@ class Experiment(db.Model):
|
||||||
active = db.Column(db.Boolean, default=True, nullable=False)
|
active = db.Column(db.Boolean, default=True, nullable=False)
|
||||||
|
|
||||||
oral_weighting = db.Column(
|
oral_weighting = db.Column(
|
||||||
db.Float, db.CheckConstraint("oral_weighting >= 0"), db.CheckConstraint("oral_weighting <= 1"), nullable=False
|
db.Float,
|
||||||
|
db.CheckConstraint("oral_weighting >= 0"),
|
||||||
|
db.CheckConstraint("oral_weighting <= 1"),
|
||||||
|
default=0.5,
|
||||||
|
nullable=False,
|
||||||
)
|
)
|
||||||
protocol_weighting = db.Column(
|
protocol_weighting = db.Column(
|
||||||
db.Float,
|
db.Float,
|
||||||
db.CheckConstraint("protocol_weighting >= 0"),
|
db.CheckConstraint("protocol_weighting >= 0"),
|
||||||
db.CheckConstraint("protocol_weighting <= 1"),
|
db.CheckConstraint("protocol_weighting <= 1"),
|
||||||
|
default=0.5,
|
||||||
nullable=False,
|
nullable=False,
|
||||||
)
|
)
|
||||||
final_weighting = db.Column(
|
final_weighting = db.Column(
|
||||||
|
@ -399,14 +404,12 @@ class ExperimentMark(db.Model):
|
||||||
db.Integer,
|
db.Integer,
|
||||||
db.CheckConstraint("oral_mark > -1"),
|
db.CheckConstraint("oral_mark > -1"),
|
||||||
db.CheckConstraint("oral_mark < 16"),
|
db.CheckConstraint("oral_mark < 16"),
|
||||||
default=0.5,
|
|
||||||
nullable=True,
|
nullable=True,
|
||||||
)
|
)
|
||||||
protocol_mark = db.Column(
|
protocol_mark = db.Column(
|
||||||
db.Integer,
|
db.Integer,
|
||||||
db.CheckConstraint("protocol_mark > -1"),
|
db.CheckConstraint("protocol_mark > -1"),
|
||||||
db.CheckConstraint("protocol_mark < 16"),
|
db.CheckConstraint("protocol_mark < 16"),
|
||||||
default=0.5,
|
|
||||||
nullable=True,
|
nullable=True,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue