Skip to content
Snippets Groups Projects
Commit 8bdc5d65 authored by Herman Andersen Dyrkorn's avatar Herman Andersen Dyrkorn
Browse files

Merge branch '13-database-upgrade-new-table-for-length-and-weight' into 'master'

Resolve "database upgrade, new table for length and weight"

Closes #13

See merge request !16
parents c84e0a9a 60331f74
No related branches found
No related tags found
1 merge request!16Resolve "database upgrade, new table for length and weight"
No preview for this file type
......@@ -15,7 +15,6 @@ class Salamander(db.Model):
id = db.Column(db.Integer, primary_key=True, autoincrement=True)
sex = db.Column(db.String(255), nullable=False)
species = db.Column(db.String(255), nullable=False)
location = db.Column(db.String(255), nullable=False)
location_id = db.Column(db.Integer, db.ForeignKey('location.id'), nullable=False)
image_path = db.Column(db.String(255), nullable=False)
uid = db.Column(db.Integer, db.ForeignKey('user.id'), nullable=False)
......@@ -27,3 +26,11 @@ class Location(db.Model):
name = db.Column(db.String(255), nullable=False)
coordinates = db.Column(db.String(255), nullable=False)
radius = db.Column(db.Integer, nullable=False)
class SalamanderGrowth(db.Model):
id = db.Column(db.Integer, primary_key=True, autoincrement=True)
salamander_id = db.column(db.Integer, db.ForeignKey('salamander.id'))
date = db.Column(db.DateTime, default=datetime.now)
weight = db.Column(db.Float, nullable=False)
length = db.Column(db.Float, nullable=False)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment