NTX-McGill/NeuroTechX-McGill-2021

Software (Backend): Add time fields to BCICollection class

Closed this issue · 3 comments

mlej8 commented

Add two fields to BCICollection class, first is the collection_start_time and second is collection_end_time.

Make sure that when openbci/<process_id>/stop route is called, we fill in the collection_end_time.

collection_start_time = db.Column(db.DateTime(
        timezone=True), default=datetime.utcnow, nullable=True)

collection_end_time = db.Column(db.DateTime(
        timezone=True), nullable=True)

Make sure to migrate the database using flask-migrate (https://flask-migrate.readthedocs.io/en/latest/).

flask db migrate -m "Update BCICollection model to add collect start and collect stop time."
flask db upgrade
mlej8 commented

@ablost33 please close this issue if the schema was fixed on the prod db

Yup just waiting on data team to confirm that it's working bug free

mlej8 commented

I just checked @ablost33 , everything looks fine, let's close this issue.