db/create_system_db.sql
author Volker Birk <vb@pep-project.org>
Sun, 21 Feb 2016 21:44:32 +0100
changeset 457 7802147af797
parent 364 605a4990915c
child 478 849930991fdc
permissions -rw-r--r--
redesign of system.db
vb@457
     1
-- DDL
vb@457
     2
vb@457
     3
CREATE TABLE i18n_language (
vb@457
     4
    lang text primary key,
vb@457
     5
    name text
vb@457
     6
);
vb@457
     7
vb@2
     8
CREATE TABLE wordlist (
vb@457
     9
    lang text
vb@457
    10
        references i18n_language (lang),
vb@457
    11
    id integer,
vb@457
    12
    word text,
vb@457
    13
    entropy integer
vb@2
    14
);
vb@2
    15
vb@2
    16
CREATE UNIQUE INDEX wordlist_pk on wordlist (lang, id);
vb@251
    17
vb@457
    18
CREATE TABLE i18n_token (
vb@457
    19
    lang text
vb@457
    20
        references i18n_language (lang),
vb@457
    21
    id integer,
vb@251
    22
    phrase text
vb@251
    23
);
vb@251
    24
vb@457
    25
CREATE UNIQUE INDEX i18n_token_pk on i18n_token (lang, id);
vb@457
    26
vb@457
    27
-- DML
vb@457
    28
vb@457
    29
INSERT INTO i18n_language VALUES ('en', 'English');
vb@457
    30
INSERT INTO i18n_token VALUES ('en', 1, 'I want to have this conversation in English language');
vb@457
    31
vb@457
    32
INSERT INTO i18n_language VALUES ('de', 'Deutsch');
vb@457
    33
INSERT INTO i18n_token VALUES ('de', 1, 'Ich möchte dieses Gespräch auf Deutsch führen');
vb@457
    34
vb@364
    35
-- add more languages here
vb@457
    36