-
-
Notifications
You must be signed in to change notification settings - Fork 499
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Output: GP8XXX (8403) 2-Channel DAC (0-10 VDC) (#1354)
- Loading branch information
Showing
39 changed files
with
500 additions
and
202 deletions.
There are no files selected for viewing
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
62 changes: 62 additions & 0 deletions
62
alembic_db/alembic/versions/d6b624da47f4_add_brand_config_options.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,62 @@ | ||
"""Add brand config options | ||
Revision ID: d6b624da47f4 | ||
Revises: a338ed3dce74 | ||
Create Date: 2024-03-29 20:13:51.807396 | ||
""" | ||
import sys | ||
import os | ||
|
||
sys.path.append(os.path.abspath(os.path.join(__file__, "../../../.."))) | ||
|
||
from alembic_db.alembic_post_utils import write_revision_post_alembic | ||
|
||
from alembic import op | ||
import sqlalchemy as sa | ||
|
||
|
||
# revision identifiers, used by Alembic. | ||
revision = 'd6b624da47f4' | ||
down_revision = 'a338ed3dce74' | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade(): | ||
# write_revision_post_alembic(revision) | ||
|
||
with op.batch_alter_table("misc") as batch_op: | ||
batch_op.add_column(sa.Column('brand_display', sa.Text)) | ||
batch_op.add_column(sa.Column('title_display', sa.Text)) | ||
batch_op.add_column(sa.Column('brand_image', sa.BLOB)) | ||
batch_op.add_column(sa.Column('brand_image_height', sa.Integer)) | ||
|
||
op.execute( | ||
''' | ||
UPDATE misc | ||
SET brand_display='hostname' | ||
''' | ||
) | ||
|
||
op.execute( | ||
''' | ||
UPDATE misc | ||
SET title_display='hostname' | ||
''' | ||
) | ||
|
||
op.execute( | ||
''' | ||
UPDATE misc | ||
SET brand_image_height=55 | ||
''' | ||
) | ||
|
||
|
||
def downgrade(): | ||
with op.batch_alter_table("misc") as batch_op: | ||
batch_op.drop_column('brand_display') | ||
batch_op.drop_column('title_display') | ||
batch_op.drop_column('brand_image') | ||
batch_op.drop_column('brand_image_height') |
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
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
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
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
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
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
Oops, something went wrong.