create table if not exists application ( id serial not null, name varchar(32) not null, type character varying[], app_key varchar(64) not null, app_secret varchar(64) not null, create_user_id integer not null, create_time timestamp not null, forbidden boolean default false not null, constraint application_pk primary key (id) ); comment on column application.type is 'web / app / wxapp / other'; create unique index if not exists application_id_uindex on application (id);