schema_0_9_10
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revisionLast revisionBoth sides next revision | ||
schema_0_9_10 [2008/11/02 15:44] – created daniel | schema_0_9_10 [2008/11/02 18:20] – daniel | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | SQL script that creates the database: | + | Below is the SQL script |
+ | Before running it through psql, those preconditions should be met: | ||
+ | * The database should exist and have UTF8 encoding ('' | ||
+ | * The plpgsql language should be enabled ('' | ||
+ | * The current directory should contain the SQL files that are referenced at the end of the script. These are the definitions of plpgsql functions. | ||
- | The plpgsql language should exist (CREATE LANGUAGE plpgsql) | + | This script as well as all the SQL files are available in [[http:// |
<code sql> | <code sql> | ||
Line 176: | Line 180: | ||
); | ); | ||
CREATE UNIQUE INDEX runtime_info_pk ON runtime_info(rt_key); | CREATE UNIQUE INDEX runtime_info_pk ON runtime_info(rt_key); | ||
- | |||
- | INSERT INTO runtime_info(rt_key, | ||
- | |||
- | CREATE SEQUENCE seq_tag_id; | ||
- | CREATE SEQUENCE seq_mail_id; | ||
- | CREATE SEQUENCE seq_thread_id; | ||
- | CREATE SEQUENCE seq_addr_id; | ||
- | CREATE SEQUENCE seq_attachment_id; | ||
- | |||
- | \i triggers_on_mail.sql | ||
CREATE TABLE identities ( | CREATE TABLE identities ( | ||
Line 279: | Line 273: | ||
CREATE UNIQUE INDEX jobs_pk_idx ON jobs_queue(job_id); | CREATE UNIQUE INDEX jobs_pk_idx ON jobs_queue(job_id); | ||
+ | CREATE SEQUENCE seq_tag_id; | ||
+ | CREATE SEQUENCE seq_mail_id; | ||
+ | CREATE SEQUENCE seq_thread_id; | ||
+ | CREATE SEQUENCE seq_addr_id; | ||
+ | CREATE SEQUENCE seq_attachment_id; | ||
+ | |||
+ | \i triggers_on_mail.sql | ||
\i delete_msg.sql | \i delete_msg.sql | ||
\i delete_msg_set.sql | \i delete_msg_set.sql | ||
Line 284: | Line 285: | ||
\i trash_msg_set.sql | \i trash_msg_set.sql | ||
\i untrash_msg.sql | \i untrash_msg.sql | ||
+ | |||
+ | INSERT INTO runtime_info(rt_key, | ||
COMMIT; | COMMIT; | ||
</ | </ | ||
schema_0_9_10.txt · Last modified: 2008/11/02 22:30 by daniel