Skip to content

Commit

Permalink
Documentation: review Database Tables section
Browse files Browse the repository at this point in the history
- Add missing entry for $g_db_table_suffix
- Add missing entry for $g_db_table_plugin_prefix
- Add warning about identifier size (Oracle 30-char limit)
- Remove obsolete information
- Rewording

Fixes #22221
  • Loading branch information
dregad committed Jan 18, 2017
1 parent 74699db commit 03a36d9
Showing 1 changed file with 44 additions and 20 deletions.
64 changes: 44 additions & 20 deletions docbook/Admin_Guide/en-US/config/database.xml
Expand Up @@ -101,36 +101,60 @@
</varlistentry>
</variablelist>

<para>MantisBT enables users to configure a table prefix for all its
tables. This is useful to be able to have multiple MantisBT
installation in the same database. The advantage of that is for
users who are limited by their ISP to have one database.
<para>MantisBT allows administrators to configure a prefix and a suffix for
its tables. This is enables multiple MantisBT installation in the same
database or schema.
</para>

<variablelist>
<warning>
<para>Use of long strings for these configuration options may cause
issues on RDBMS restricting the size of its identifiers, such as
Oracle (which imposed a maximum size of 30 characters until version
12.1; starting with 12cR2 this
<ulink url="http://docs.oracle.com/database/122/SQLRF/Database-Object-Names-and-Qualifiers.htm#SQLRF51129">
limit has been increased to 128</ulink>).
</para>
</warning>

<variablelist>
<varlistentry>
<term>$g_db_table_prefix</term>
<listitem>
<para>Specifies the prefix to be use for all table names. The
default value is 'mantis'. If you override the default prefix, make
sure to update doc/db_generate.sql file before generating your
database. The other option is to import db_generate.sql as is, then
rename the tables to match the new prefix.
<para>Specifies the prefix to be used for all table names.
The default value is 'mantis'.
</para>
<para>The prefix can be used to help make sure table names are unique.
This is useful for users who are limited to a single database
or schema.
</para>
</listitem>
</varlistentry>

<para>The prefix is used to help make sure table names are unique.
<varlistentry>
<term>$g_db_table_suffix</term>
<listitem>
<para>Specifies the prefix to be appended to all table names.
The default value is 'table'.
</para>
<para>The suffix can be used to help make sure table names are unique.
This is useful for users who are limited to one database.
</para>
<note><para>
The table name for each of the tables is stored in a variable which
is calculated based on this configuration option. If you change the
prefix you have to make sure these variables are re-calculated (by
adding these calculation statements to config_inc.php after
assigning the new prefix). An example of these variables is:
$g_mantis_bug_file_table
</para>
</note>
</listitem>
</varlistentry>

<varlistentry>
<term>$g_db_table_plugin_prefix</term>
<listitem>
<para>Specifies the prefix to be used to differentiate tables
belonging to a plugin's schema from MantisBT's base tables.
The default value is 'plugin'.
</para>
<para>Plugin table names are built using the plugin's
<emphasis>basename</emphasis>, e.g. for a table named 'foo'
in the 'Example' plugin (with default values for prefixes
and suffix), the physical table name would be
<literal>mantis_plugin_Example_foo_table</literal>.
</para>
</listitem>
</varlistentry>
</variablelist>
Expand Down

0 comments on commit 03a36d9

Please sign in to comment.