Add a Characters.contacts propety.
authorMatthijs Kooijman <matthijs@stdin.nl>
Tue, 13 Jan 2009 17:07:05 +0000 (18:07 +0100)
committerMatthijs Kooijman <matthijs@stdin.nl>
Tue, 13 Jan 2009 17:07:05 +0000 (18:07 +0100)
commit3b57264c77f8fc157a0129d406f4116c868c05b0
treef27ab9d89e86e43466aebca2fa91225f658c516b
parent3ebe90d3cef8c2136c17a1b3426e7989f2379427
Add a Characters.contacts propety.

This property lists all the other characters that are contacts of a
Character. The property is symmetrical, so if A is a contact of B, the
reverse is also automatically the case.

SQL: CREATE TABLE `influences_character_contacts` (
SQL:    `id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY,
SQL:    `from_character_id` integer NOT NULL,
SQL:    `to_character_id` integer NOT NULL,
SQL:    UNIQUE (`from_character_id`, `to_character_id`)
SQL: );
SQL: ALTER TABLE `influences_character_contacts` ADD
SQL:   CONSTRAINT from_character_id_refs_id_653bf18d29c7a4fa
SQL:   FOREIGN KEY (`from_character_id`)
SQL:   REFERENCES `influences_character` (`id`);
SQL: ALTER TABLE `influences_character_contacts` ADD
SQL:   CONSTRAINT to_character_id_refs_id_653bf18d29c7a4fa
SQL:   FOREIGN KEY (`to_character_id`)
SQL:   REFERENCES `influences_character` (`id`);
influences/models.py