(self)
creates the py4web_error table in the service database
creates the py4web_error table in the service database
creates the py4web_error table in the service database
def __init__(self):
        """creates the py4web_error table in the service database"""
        uri = os.environ["PY4WEB_SERVICE_DB_URI"]
        folder = os.environ["PY4WEB_SERVICE_FOLDER"]
        self.db = DAL(uri, folder=folder)
        self.db.define_table(
            "py4web_error",
            Field("uuid"),
            Field("app_name"),
            Field("method"),
            Field("path", "string"),
            Field("timestamp", "datetime"),
            Field("client_ip", "string"),
            Field("error", "string"),
            Field("snapshot", "json"),
        )
        self.db.commit()
def __init__ ( self ) : uri = os . environ [ "PY4WEB_SERVICE_DB_URI" ] folder = os . environ [ "PY4WEB_SERVICE_FOLDER" ] self . db = DAL ( uri , folder = folder ) self . db . define_table ( "py4web_error" , Field ( "uuid" ) , Field ( "app_name" ) , Field ( "method" ) , Field ( "path" , "string" ) , Field ( "timestamp" , "datetime" ) , Field ( "client_ip" , "string" ) , Field ( "error" , "string" ) , Field ( "snapshot" , "json" ) , ) self . db . commit ( )