Commits

nickmartin  committed c258ba9

Adding optional sequence for the id field in beaker_cache.

  • Participants
  • Parent commits cb7966a

Comments (0)

Files changed (1)

File beaker/ext/database.py

             meta = DatabaseNamespaceManager.metadatas.get(meta_key, make_meta)
             # Create the table object and cache it now
             cache = sa.Table(table_name, meta,
-                             sa.Column('id', types.Integer, primary_key=True),
+                             sa.Column('id', types.Integer, sa.Sequence('%s_seq' % table_name, optional=True), primary_key=True),
                              sa.Column('namespace', types.String(255), nullable=False),
                              sa.Column('accessed', types.DateTime, nullable=False),
                              sa.Column('created', types.DateTime, nullable=False),