예제 #1
0
 def stamp(self, args):
     """Instruct the triage results database to mark itself as updated to a known version without doing any upgrading.
     
     Use this if the database was created without an 'alembic_version' table. Uses the config version of your experiment to infer what database version is suitable.
     """
     revision = REVISION_MAPPING[args.configversion]
     print(f"Based on config version {args.configversion} "
           f"we think your results schema is version {revision} and are upgrading to it")
     stamp_db(revision, args.dbfile)
예제 #2
0
    def stamp(self, args):
        """Mark triage results database as updated to a known version without doing any upgrading.

        The revision can be anything alembic recognizes, such as a specific revision or 'head' (the most recent revision in the current codebase)

        This is most useful if the database was created without a 'results_schema_versions' table (i.e. old versions of triage that didn't enforce alembic use), but could also be useful after general database mangling.

        If you don't know what the right revision is, here are some database revisions that old experiment configs are associated with:
            - no config version: 8b3f167d0418
            - v1 or v2: 72ac5cbdca05
            - v3: 7d57d1cf3429
            - v4: 89a8ce240bae
            - v5: 2446a931de7a
        """
        stamp_db(revision=args.revision, dburl=self.root.db_url)