word: writer page to edit database entries
[sheet.git] / tools / word.pg.sql
1 CREATE TABLE word (
2         form       text        NOT NULL,
3         lang       text        NOT NULL DEFAULT 'eng',
4         cat        integer              REFERENCES word (id),
5         ref        integer              REFERENCES word (id),
6         source     text,
7         thumb      text[],
8         wptitle    text,
9         created    timestamptz          DEFAULT now(),
10         id         serial      NOT NULL PRIMARY KEY
11 );
12
13 COMMENT ON COLUMN word.form       IS 'preferred textual representation';
14 COMMENT ON COLUMN word.lang       IS 'ISO 639-3 language code';
15 COMMENT ON COLUMN word.cat        IS 'hierarchical classification';
16 COMMENT ON COLUMN word.ref        IS 'reference to equivalent eng translation';
17 COMMENT ON COLUMN word.source     IS 'URI of downloaded image';
18 COMMENT ON COLUMN word.thumb      IS 'ImageMagick convert options to create thumbnail from source image';
19 COMMENT ON COLUMN word.wptitle    IS 'reference Wikipedia article';