~sambuddhabasu1/mailman/fix_mailman_run_error

« back to all changes in this revision

Viewing changes to src/mailman/database/schema/sqlite_20130406000000_01.sql

  • 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
 
--
2
 
 
3
 
 
4
 
 
5
 
 
6
 
 
7
 
 
8
 
CREATE TABLE bounceevent_backup (
9
 
    id INTEGER NOT NULL,
10
 
    email TEXT,
11
 
    'timestamp' TIMESTAMP,
12
 
    message_id TEXT,
13
 
    context INTEGER,
14
 
    processed BOOLEAN,
15
 
    PRIMARY KEY (id)
16
 
    );
17
 
 
18
 
INSERT INTO bounceevent_backup SELECT
19
 
    id, email, "timestamp", message_id,
20
 
    context, processed
21
 
    FROM bounceevent;
22
 
 
23
 
ALTER TABLE bounceevent_backup ADD COLUMN list_id TEXT;
24
 
 
25
 
CREATE TABLE listarchiver (
26
 
    id INTEGER NOT NULL,
27
 
    mailing_list_id INTEGER NOT NULL,
28
 
    name TEXT NOT NULL,
29
 
    _is_enabled BOOLEAN,
30
 
    PRIMARY KEY (id)
31
 
    );
32
 
 
33
 
CREATE INDEX ix_listarchiver_mailing_list_id
34
 
    ON listarchiver(mailing_list_id);