Example #1
0
 def connect(self, *args):
     self.setConnectOptions("%sapplication_name=openmolar-admin;" %
                            self.connectOptions())
     OpenmolarDatabase.connect(self, *args)
     if self.schema_version not in SETTINGS.schema_versions:
         raise self.SchemaVersionError, (
             "Schema version mismatch schema is at '%s', allowed versions '%s'"
             % (self.schema_version, SETTINGS.schema_versions))
Example #2
0
 def connect(self, *args):
     self.setConnectOptions("%sapplication_name=openmolar-admin;"%
         self.connectOptions())
     OpenmolarDatabase.connect(self, *args)
     if self.schema_version not in SETTINGS.schema_versions:
         raise self.SchemaVersionError, (
     "Schema version mismatch schema is at '%s', allowed versions '%s'"% (
         self.schema_version, SETTINGS.schema_versions))
Example #3
0
    def connect(self):
        SETTINGS.psql_conn = None
        self.setConnectOptions("%sapplication_name=openmolar-client;"%
            self.connectOptions())
        OpenmolarDatabase.connect(self)
        if self.schema_version not in SETTINGS.schema_versions:
            raise self.SchemaVersionError, (
        "Schema version mismatch schema is at '%s', allowed versions '%s'"% (
            self.schema_version, SETTINGS.schema_versions))

        SETTINGS.psql_conn = self