tipus/deploy/language.sql

33 lines
848 B
MySQL
Raw Normal View History

-- Deploy tipus:language to pg
-- requires: roles
-- requires: schema_public
begin;
set search_path to public;
create table language
(
lang_tag text primary key check (length(lang_tag) < 36), -- RFC5646 recommends 35 at least
name text not null,
endonym text not null,
selectable boolean not null,
currency_pattern text not null
);
grant select on table language to guest;
grant select on table language to publisher;
grant select on table language to admin;
grant select on table language to authenticator;
comment on table language is
'Languages/locales available in Tipus';
comment on column language.lang_tag is
'BCP-47 language tag';
comment on column language.selectable is
'Whether the language should be a option in a user-facing select control.';
commit;