Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Database Schemas #20

Merged
merged 7 commits into from
Jul 4, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/backend/app/db/db_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ class DbProject(Base):
organisation = relationship(DbOrganisation, backref="projects")

# flight params
overlap = cast(float, Column(Float, nullable=True)) # in cm_px
gsd = cast(float, Column(Float, nullable=True)) # in cm_px
nrjadkry marked this conversation as resolved.
Show resolved Hide resolved
camera_bearings = cast(list[int], Column(ARRAY(SmallInteger), nullable=True))
gimble_angles = cast(list, Column(ARRAY(SmallInteger), nullable=True)) # degrees
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
"""add overlap in projects table

Revision ID: 1ebfe5e4cf1c
Revises: 4b1534031978
Create Date: 2024-07-03 08:13:33.354101

"""
from typing import Sequence, Union

from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision: str = "1ebfe5e4cf1c"
down_revision: Union[str, None] = "4b1534031978"
branch_labels: Union[str, Sequence[str], None] = None
depends_on: Union[str, Sequence[str], None] = None


def upgrade() -> None:
# ### commands auto generated by Alembic - please adjust! ###
op.add_column("projects", sa.Column("overlap", sa.Float(), nullable=True))
# ### end Alembic commands ###


def downgrade() -> None:
# ### commands auto generated by Alembic - please adjust! ###
op.drop_column("projects", "overlap")
# ### end Alembic commands ###