Skip to content

Commit

Permalink
migration for link suggestion and less verbose alembic-check
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobryas4 committed Sep 26, 2023
1 parent cc84ec3 commit 7a7169a
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/alembic-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,9 @@ jobs:
run: |
GCP_SSH_CMD="gcloud compute ssh cacti-bastion-server --zone us-east1-b --ssh-key-file /tmp/gcp/google_compute_engine --quiet --tunnel-through-iap --ssh-flag"
if [[ ${GITHUB_BASE_REF:-${GITHUB_REF#refs/heads/}} == 'master' ]]; then
$GCP_SSH_CMD '-vvv -fN -L 5432:${{ secrets.PROD_CHATDB_INTERNAL_IP }}'
$GCP_SSH_CMD '-fN -L 5432:${{ secrets.PROD_CHATDB_INTERNAL_IP }}'
else
$GCP_SSH_CMD '-vvv -fN -L 5432:${{ secrets.DEV_CHATDB_INTERNAL_IP }}'
$GCP_SSH_CMD '-fN -L 5432:${{ secrets.DEV_CHATDB_INTERNAL_IP }}'
fi
cd backend
Expand Down
44 changes: 44 additions & 0 deletions alembic/versions/b060d9ab3367_add_bar_table.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
"""Add Bar table
Revision ID: b060d9ab3367
Revises: 7cc8cbfe072d
Create Date: 2023-09-26 15:58:57.060974
"""
from alembic import op
import sqlalchemy as sa
import sqlalchemy_utils
from sqlalchemy.dialects import postgresql

# revision identifiers, used by Alembic.
revision = 'b060d9ab3367'
down_revision = '7cc8cbfe072d'
branch_labels = None
depends_on = None


def upgrade() -> None:
# ### commands auto generated by Alembic - please adjust! ###
op.drop_table('dapp')
# ### end Alembic commands ###


def downgrade() -> None:
# ### commands auto generated by Alembic - please adjust! ###
op.create_table('dapp',
sa.Column('created', postgresql.TIMESTAMP(), autoincrement=False, nullable=False),
sa.Column('updated', postgresql.TIMESTAMP(), autoincrement=False, nullable=False),
sa.Column('id', postgresql.UUID(), autoincrement=False, nullable=False),
sa.Column('description', sa.TEXT(), autoincrement=False, nullable=False),
sa.Column('name', sa.VARCHAR(length=255), autoincrement=False, nullable=False),
sa.Column('url', sa.VARCHAR(length=255), autoincrement=False, nullable=False),
sa.Column('twitter_handle', sa.VARCHAR(length=255), autoincrement=False, nullable=True),
sa.Column('blog_links', postgresql.ARRAY(sa.VARCHAR(length=255)), autoincrement=False, nullable=True),
sa.Column('discord', sa.VARCHAR(length=255), autoincrement=False, nullable=True),
sa.Column('facebook', sa.VARCHAR(length=255), autoincrement=False, nullable=True),
sa.Column('instagram', sa.VARCHAR(length=255), autoincrement=False, nullable=True),
sa.Column('telegram', sa.VARCHAR(length=255), autoincrement=False, nullable=True),
sa.PrimaryKeyConstraint('id', name='dapp_pkey'),
sa.UniqueConstraint('name', name='dapp_name_key')
)
# ### end Alembic commands ###

0 comments on commit 7a7169a

Please sign in to comment.