CREATE TABLE projects (
    id serial PRIMARY KEY,
    keys text[]
);

CREATE TABLE documents (
    id serial PRIMARY KEY,
    locale varchar(128),
    pairs hstore,
    project_id integer REFERENCES projects (id) ON DELETE CASCADE
);
CREATE TABLE projects (
    id serial PRIMARY KEY,
    keys text[]
);

CREATE TABLE documents (
    id serial PRIMARY KEY,
    locale varchar(128) NOT NULL CHECK (locale <> ''),
    pairs hstore,
    project_id integer REFERENCES projects (id) ON DELETE CASCADE
);
Add locale not empty contraint
Add locale not empty contraint
