create table acs_modules (
module_key varchar(30) primary key,
pretty_name varchar(200) not null,
-- this is the directory where module public files are stored.
-- for the news module public_directory would be /news
public_directory varchar(200),
-- this is the directory where module admin files are stored
-- for the news module admin_directory would be /admin/news
admin_directory varchar(200),
-- this is the directory where system admin files are stored
-- notice that this is not always same as the admin_directory
-- e.g. ticket module has admin directory /ticket/admin and
-- site admin directory /admin/ticket
site_wide_admin_directory varchar(200),
-- if module_type=system, this module has all: public, admin and site_wide admin pages (e.g. faq, news)
-- notice that often admin and site_wide admin directory are merged together
-- if module_type=admin, this is admin module and has no public pages (e.g. display, content_sections)
-- notice that modules of this type have no public pages
-- if module_type=site_wide_admin, this is module for site wide administration of another module (e.g. news_admin, bboard_admin)
-- notice that having admin module for another module allows us to assign administration of modules to user groups
-- in this case public_directory will correspond to the directory where files for site wide administration of that
-- module are stored and admin_directory and site_wide_admin_directory are irrelevant
module_type varchar(20) not null check(module_type in ('system', 'admin', 'site_wide_admin')),
-- does module support scoping
supports_scoping_p char(1) default 'f' check(supports_scoping_p in ('t','f')),
-- this is short description describing what module is doing
description varchar(4000),
-- this is url of the html file containing module documentation
documentation_url varchar(200),
-- this is url of the file containing date model of the module
data_model_url varchar(200)
);