Skip to content

Instantly share code, notes, and snippets.

@ThiefMaster
Created July 23, 2014 16:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ThiefMaster/65ca4896fe8a3bef3e7d to your computer and use it in GitHub Desktop.
Save ThiefMaster/65ca4896fe8a3bef3e7d to your computer and use it in GitHub Desktop.
def _index(self, name, tablename, columns, schema=None, **kw):
t = sa_schema.Table(tablename or 'no_table', sa_schema.MetaData(),
*[sa_schema.Column(n, NULLTYPE) for n in columns],
schema=schema
)
return sa_schema.Index(name, *[t.c[n] for n in columns], **kw)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment