-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ENH] Add price per kg for elements (#221)
* add price per kg data for elements * 🦆 * 💄 * update docs * add tests * add missing footnotemark
- Loading branch information
Showing
6 changed files
with
73 additions
and
12 deletions.
There are no files selected for viewing
25 changes: 25 additions & 0 deletions
25
alembic/versions/6b61728951ad_add_price_per_kg_column_to_elements.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
"""add price_per_kg column to elements | ||
Revision ID: 6b61728951ad | ||
Revises: c36c01e33842 | ||
Create Date: 2025-01-03 21:49:02.101851 | ||
""" | ||
|
||
# revision identifiers, used by Alembic. | ||
revision = '6b61728951ad' | ||
down_revision = 'c36c01e33842' | ||
branch_labels = None | ||
depends_on = None | ||
|
||
from alembic import op | ||
import sqlalchemy as sa | ||
|
||
|
||
def upgrade(): | ||
op.add_column("elements", sa.Column("price_per_kg", sa.Float, nullable=True)) | ||
|
||
|
||
def downgrade(): | ||
with op.batch_alter_table("elements") as batch_op: | ||
batch_op.drop_column("price_per_kg") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters