Dead code cleanup.

This commit is contained in:
Dave Page 2017-09-28 10:16:49 +01:00
parent f855ed88ce
commit 739d8e2f1f
6 changed files with 11 additions and 35 deletions

View File

@ -15,12 +15,11 @@ Create Date: 2017-03-13 12:27:30.543908
"""
import base64
import sys
from alembic import op
from pgadmin.model import db, Server
import config
import os
import sys
import config
from pgadmin.model import db, Server
from pgadmin.setup import get_version
# revision identifiers, used by Alembic.

View File

@ -6,15 +6,8 @@ Revises: 09d53fca90c7
Create Date: 2017-06-13 17:05:30.671859
"""
import base64
import sys
from alembic import op
from pgadmin.model import db, Server
import config
import os
from pgadmin.setup import get_version
from pgadmin.model import db
# revision identifiers, used by Alembic.
revision = '3c1e4b6eda55'
@ -24,8 +17,6 @@ depends_on = None
def upgrade():
verison = get_version()
db.engine.execute(
'ALTER TABLE server ADD COLUMN hostaddr TEXT(1024)'
)

View File

@ -6,8 +6,6 @@ Revises: 3c1e4b6eda55
Create Date: 2017-07-07 16:03:23.842734
"""
from alembic import op
import sqlalchemy as sa
from pgadmin.model import db

View File

@ -6,13 +6,11 @@ Revises: 3c1e4b6eda55
Create Date: 2017-06-15 17:18:50.667139
"""
import config
from flask import current_app
from flask_security import Security, SQLAlchemyUserDatastore
from flask_security.utils import verify_and_update_password
from pgadmin.model import Keys, db, User, Role
import config
# revision identifiers, used by Alembic.
revision = 'f195f9a4923d'

View File

@ -14,18 +14,17 @@ Revises:
Create Date: 2017-03-13 11:15:16.401139
"""
from alembic import op
import base64
import os
import config
import sqlalchemy as sa
from alembic import op
from flask import current_app
from flask_security import Security, SQLAlchemyUserDatastore
from flask_security.utils import encrypt_password
import os
import sqlalchemy as sa
import config
from pgadmin.model import db, User, Role
from pgadmin.setup import get_version
from pgadmin.setup import user_info
# revision identifiers, used by Alembic.

View File

@ -8,8 +8,6 @@
##########################################################################
from pgadmin.model import Version
import config
import sys
def get_version():
@ -18,11 +16,4 @@ def get_version():
except Exception:
return -1
if int(version.value) > int(config.SETTINGS_SCHEMA_VERSION):
print(u"""
The database schema version is {0}, whilst the version required by the \
software is {1}.
Exiting...""".format(version.value, config.SETTINGS_SCHEMA_VERSION))
sys.exit(1)
return version.value