diff options
author | Aurélien Bompard <aurelien@bompard.org> | 2012-09-25 12:07:23 +0200 |
---|---|---|
committer | Aurélien Bompard <aurelien@bompard.org> | 2012-09-25 12:07:23 +0200 |
commit | d723e64bdb3a39a16e9416ba608ad76bc8390e95 (patch) | |
tree | 5957145f6bbc674ba76247903eaa22fc579d3f65 | |
parent | ffb9af409c8ebda208803cfdc2c20fe6ec68b76d (diff) | |
download | kittystore-d723e64bdb3a39a16e9416ba608ad76bc8390e95.tar.gz kittystore-d723e64bdb3a39a16e9416ba608ad76bc8390e95.tar.xz kittystore-d723e64bdb3a39a16e9416ba608ad76bc8390e95.zip |
Start implementing the attachments table
-rw-r--r-- | kittystore/storm/schema/__init__.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/kittystore/storm/schema/__init__.py b/kittystore/storm/schema/__init__.py index 3e23256..c301e88 100644 --- a/kittystore/storm/schema/__init__.py +++ b/kittystore/storm/schema/__init__.py @@ -22,6 +22,16 @@ CREATES = { "full" BLOB NOT NULL, archived_date DATETIME DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (list_name, message_id) + );""", """ + CREATE TABLE "attachment" ( + list_name VARCHAR(255) NOT NULL, + message_id VARCHAR(255) NOT NULL, + counter INTEGER NOT NULL, + content_type VARCHAR(255) NOT NULL, + name VARCHAR(255), + size INTEGER NOT NULL, + content BLOB NOT NULL, + PRIMARY KEY (list_name, message_id, counter) );""", 'CREATE INDEX "ix_email_list_name" ON "email" (list_name);', 'CREATE UNIQUE INDEX "ix_email_message_id" ON "email" (message_id);', |