Revision 8589
Added by Aaron Marcuse-Kubitza over 11 years ago
schemas/VegCore/VegCore.my.sql | ||
---|---|---|
26 | 26 |
CREATE TABLE IF NOT EXISTS `source` ( |
27 | 27 |
`id` TEXT NOT NULL , |
28 | 28 |
`parent` TEXT NOT NULL , |
29 |
`name` TEXT NOT NULL , |
|
29 | 30 |
`contact` TEXT NULL , |
30 | 31 |
`info` SET('hstore') NULL , |
31 | 32 |
PRIMARY KEY (`id`) , |
32 | 33 |
INDEX `fk_source1` (`parent` ASC) , |
33 | 34 |
INDEX `fk_source_party1` (`contact` ASC) , |
35 |
UNIQUE INDEX `source_unique` (`parent` ASC, `name` ASC) , |
|
34 | 36 |
CONSTRAINT `fk_source1` |
35 | 37 |
FOREIGN KEY (`parent` ) |
36 | 38 |
REFERENCES `source` (`id` ) |
... | ... | |
437 | 439 |
-- ----------------------------------------------------- |
438 | 440 |
CREATE TABLE IF NOT EXISTS `collection` ( |
439 | 441 |
`id` TEXT NOT NULL , |
440 |
`code` TEXT NULL ,
|
|
442 |
`name` TEXT NOT NULL ,
|
|
441 | 443 |
PRIMARY KEY (`id`) , |
442 | 444 |
CONSTRAINT `fk_collection_source1` |
443 | 445 |
FOREIGN KEY (`id` ) |
Also available in: Unified diff
schemas/VegCore/VegCore.ERD.mwb: collection: renamed code to name because the collection code is often the full name of the collection, rather than just an abbreviation. made name required.