mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2024-11-30 12:33:52 -06:00
6283ef7f5e
based configuration file from one version to another, and also allows us to have a single path of creating the table instead of creating tables using SQLAlchemy or hand rolled SQL This allows us to run the migrations directly in the code, and it will avoid the error prone version numbering. Patched by: Sarah McAlear Revisions: Joao Pedro De Almeida Pereira, George Gelashvili. Reviewed by: Ashesh Vashi, Murtuza Zabuawala
29 lines
753 B
Python
29 lines
753 B
Python
##########################################################################
|
|
#
|
|
# pgAdmin 4 - PostgreSQL Tools
|
|
#
|
|
# Copyright (C) 2013 - 2017, The pgAdmin Development Team
|
|
# This software is released under the PostgreSQL Licence
|
|
#
|
|
##########################################################################
|
|
|
|
import os
|
|
import sys
|
|
|
|
root = os.path.dirname(os.path.realpath(__file__))
|
|
if sys.path[0] != root:
|
|
sys.path.insert(0, root)
|
|
|
|
import config
|
|
|
|
# When running it as a WSGI application, directory for the configuration file
|
|
# must present.
|
|
if not os.path.exists(os.path.dirname(config.SQLITE_PATH)):
|
|
raise Exception(
|
|
"""
|
|
Required configuration file is not present!
|
|
Please run setup.py first!"""
|
|
)
|
|
|
|
from pgAdmin4 import app as application
|