2018-05-04 05:27:27 -05:00
|
|
|
|
|
|
|
"""Added columns for SSH tunneling
|
|
|
|
|
|
|
|
Revision ID: a68b374fe373
|
|
|
|
Revises: 50aad68f99c2
|
|
|
|
Create Date: 2018-04-05 13:59:57.588355
|
|
|
|
|
|
|
|
"""
|
|
|
|
from alembic import op
|
|
|
|
import sqlalchemy as sa
|
|
|
|
from pgadmin.model import db
|
|
|
|
|
|
|
|
# revision identifiers, used by Alembic.
|
|
|
|
revision = 'a68b374fe373'
|
|
|
|
down_revision = '50aad68f99c2'
|
|
|
|
branch_labels = None
|
|
|
|
depends_on = None
|
|
|
|
|
|
|
|
|
|
|
|
def upgrade():
|
|
|
|
db.engine.execute(
|
|
|
|
'ALTER TABLE server ADD COLUMN use_ssh_tunnel INTEGER DEFAULT 0'
|
|
|
|
)
|
|
|
|
db.engine.execute(
|
|
|
|
'ALTER TABLE server ADD COLUMN tunnel_host TEXT'
|
|
|
|
)
|
|
|
|
db.engine.execute(
|
|
|
|
'ALTER TABLE server ADD COLUMN tunnel_port TEXT'
|
|
|
|
)
|
|
|
|
db.engine.execute(
|
|
|
|
'ALTER TABLE server ADD COLUMN tunnel_username TEXT'
|
|
|
|
)
|
|
|
|
db.engine.execute(
|
|
|
|
'ALTER TABLE server ADD COLUMN tunnel_authentication INTEGER DEFAULT 0'
|
|
|
|
)
|
|
|
|
db.engine.execute(
|
|
|
|
'ALTER TABLE server ADD COLUMN tunnel_identity_file TEXT'
|
|
|
|
)
|
|
|
|
|
2020-07-24 01:16:30 -05:00
|
|
|
|
2018-05-04 05:27:27 -05:00
|
|
|
def downgrade():
|
2020-07-24 01:16:30 -05:00
|
|
|
# pgAdmin only upgrades, downgrade not implemented.
|
2018-05-04 05:27:27 -05:00
|
|
|
pass
|