~abompard/mailman/bug-1312884

« back to all changes in this revision

Viewing changes to src/mailman/database/alembic/script.py.mako

  • Committer: Barry Warsaw
  • Date: 2014-11-01 16:49:15 UTC
  • mfrom: (7251.1.38 abhilash)
  • Revision ID: barry@list.org-20141101164915-06wqfmya6wf47n6n
Database
--------
 * The ORM layer, previously implemented with Storm, has been replaced by
   SQLAlchemy, thanks to the fantastic work by Abhilash Raj and Aurélien
   Bompard.  Alembic is now used for all database schema migrations.
 * The new logger `mailman.database` logs any errors at the database layer.

API
---
 * Several changes to the internal API:
   - `IListManager.mailing_lists` is guaranteed to be sorted in List-ID order.
   - `IDomains.mailing_lists` is guaranteed to be sorted in List-ID order.
   - Iteration over domains via the `IDomainManager` is guaranteed to be sorted
     by `IDomain.mail_host` order.
   - `ITemporaryDatabase` interface and all implementations are removed.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
"""${message}
 
2
 
 
3
Revision ID: ${up_revision}
 
4
Revises: ${down_revision}
 
5
Create Date: ${create_date}
 
6
 
 
7
"""
 
8
 
 
9
# revision identifiers, used by Alembic.
 
10
revision = ${repr(up_revision)}
 
11
down_revision = ${repr(down_revision)}
 
12
 
 
13
from alembic import op
 
14
import sqlalchemy as sa
 
15
${imports if imports else ""}
 
16
 
 
17
def upgrade():
 
18
    ${upgrades if upgrades else "pass"}
 
19
 
 
20
 
 
21
def downgrade():
 
22
    ${downgrades if downgrades else "pass"}