How to use the emmett.orm.migrations.helpers.to_tuple function in emmett

To help you get started, we’ve selected a few emmett examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github emmett-framework / emmett / emmett / orm / migrations / revisions.py View on Github external
def _resolve_revision_number(self, rid):
        self._revision_map
        if rid == 'heads':
            return self._real_heads
        elif rid == 'head':
            current_head = self.get_current_head()
            if current_head:
                return (current_head, )
            return ()
        elif rid == 'base' or rid is None:
            return ()
        else:
            return to_tuple(rid, default=None)
github emmett-framework / emmett / emmett / orm / migrations / revisions.py View on Github external
def _all_down_revisions(self):
        return to_tuple(self.down_revision, default=())
        #+ self._resolved_dependencies
github emmett-framework / emmett / emmett / orm / migrations / revisions.py View on Github external
def _versioned_down_revisions(self):
        return to_tuple(self.down_revision, default=())