bug #4675 phpMyAdmin should be able to work without 'examples' DIR - move SQL scripts to sql directory

Signed-off-by: Madhura Jayaratne <madhura.cj@gmail.com>
This commit is contained in:
Madhura Jayaratne 2014-12-30 22:55:33 +05:30
parent 7a34a1d8de
commit 1b87db5724
12 changed files with 22 additions and 16 deletions

View File

@ -25,7 +25,7 @@ env:
before_script:
- export PATH=~/.composer/vendor/bin/:$PATH
- mysql -uroot -e "CREATE DATABASE test"
- mysql -uroot < examples/create_tables.sql
- mysql -uroot < sql/create_tables.sql
- mysql -uroot -e "SET PASSWORD = PASSWORD('$TESTSUITE_PASSWORD')"
- composer install --dev --no-interaction
- if [ $TRAVIS_PHP_VERSION != "hhvm" ] ; then ./test/install-runkit ; fi

View File

@ -11,6 +11,7 @@ phpMyAdmin - ChangeLog
+ rfe #1579 Default to primary key when adding relation
+ rfe #1572 User prefs: Diff-friendly JSON for config
+ rfe #1567 Sever Variables Table UI Improvements
- bug #4675 phpMyAdmin should be able to work without 'examples' DIR - move SQL scripts to sql directory
4.3.5.0 (not yet released)
- bug Auto-configuration: tables were not created automatically

View File

@ -608,7 +608,7 @@ Server connection settings
transformation system to work. phpMyAdmin will upgrade it automatically
for you by analyzing your current column\_info table structure.
However, if something goes wrong with the auto-upgrade then you can
use the SQL script found in ``./examples/upgrade_column_info_4_3_0+.sql``
use the SQL script found in ``./sql/upgrade_column_info_4_3_0+.sql``
to upgrade it manually.
To allow the usage of this functionality:
@ -628,7 +628,7 @@ Server connection settings
ADD `transformation` VARCHAR( 255 ) NOT NULL,
ADD `transformation_options` VARCHAR( 255 ) NOT NULL;
* to update your PRE-4.3.0 Column\_info table manually use this
``./examples/upgrade_column_info_4_3_0+.sql`` SQL script.
``./sql/upgrade_column_info_4_3_0+.sql`` SQL script.
.. note::

View File

@ -262,25 +262,25 @@ in your own database, or in a central database for a multi-user installation
(this database would then be accessed by the controluser, so no other user
should have rights to it).
Please look at your ``./examples/`` directory, where you should find a
Please look at your ``./sql/`` directory, where you should find a
file called *create\_tables.sql*. (If you are using a Windows server,
pay special attention to :ref:`faq1_23`).
If you already had this infrastructure and:
* upgraded to MySQL 4.1.2 or newer, please use
:file:`examples/upgrade_tables_mysql_4_1_2+.sql`.
:file:`sql/upgrade_tables_mysql_4_1_2+.sql`.
* upgraded to phpMyAdmin 4.3.0 or newer from 2.5.0 or newer (<= 4.2.x),
please use :file:`examples/upgrade_column_info_4_3_0+.sql`.
please use :file:`sql/upgrade_column_info_4_3_0+.sql`.
and then create new tables by importing :file:`examples/create_tables.sql`.
and then create new tables by importing :file:`sql/create_tables.sql`.
You can use your phpMyAdmin to create the tables for you. Please be
aware that you may need special (administrator) privileges to create
the database and tables, and that the script may need some tuning,
depending on the database name.
After having imported the :file:`examples/create_tables.sql` file, you
After having imported the :file:`sql/create_tables.sql` file, you
should specify the table names in your :file:`config.inc.php` file. The
directives used for that can be found in the :ref:`config`.
@ -313,12 +313,12 @@ specific.
If you have upgraded your MySQL server from a version previous to 4.1.2 to
version 5.x or newer and if you use the phpMyAdmin configuration storage, you
should run the :term:`SQL` script found in
:file:`examples/upgrade_tables_mysql_4_1_2+.sql`.
:file:`sql/upgrade_tables_mysql_4_1_2+.sql`.
If you have upgraded your phpMyAdmin to 4.3.0 or newer from 2.5.0 or
newer (<= 4.2.x) and if you use the phpMyAdmin configuration storage, you
should run the :term:`SQL` script found in
:file:`examples/upgrade_column_info_4_3_0+.sql`.
:file:`sql/upgrade_column_info_4_3_0+.sql`.
.. index:: Authentication mode

View File

@ -325,7 +325,7 @@ $cfg['ZeroConf'] = true;
/**
* Database used for Relation, Bookmark and PDF Features
* (see examples/create_tables.sql)
* (see sql/create_tables.sql)
* - leave blank for no support
* SUGGESTED: 'phpmyadmin'
*

View File

@ -310,7 +310,7 @@ function PMA_getRelationsParamDiagnostic($cfgRelation)
'Create the needed tables with the '
. '<code>%screate_tables.sql</code>.'
),
htmlspecialchars(EXAMPLES_DIR)
htmlspecialchars(SQL_DIR)
);
$retval .= ' ' . PMA_Util::showDocu('setup', 'linked-tables');
$retval .= '</li>';
@ -603,7 +603,7 @@ function PMA_tryUpgradeTransformations()
// try silent upgrade without disturbing the user
} else {
// read upgrade query file
$query = @file_get_contents(EXAMPLES_DIR . 'upgrade_column_info_4_3_0+.sql');
$query = @file_get_contents(SQL_DIR . 'upgrade_column_info_4_3_0+.sql');
// replace database name from query to with set in config.inc.php
$query = str_replace(
'`phpmyadmin`',
@ -1812,11 +1812,11 @@ function PMA_getDefaultPMATableNames()
$pma_tables = array();
if (PMA_DRIZZLE) {
$create_tables_file = file_get_contents(
EXAMPLES_DIR. 'create_tables_drizzle.sql'
SQL_DIR . 'create_tables_drizzle.sql'
);
} else {
$create_tables_file = file_get_contents(
EXAMPLES_DIR. 'create_tables.sql'
SQL_DIR . 'create_tables.sql'
);
}

View File

@ -42,6 +42,11 @@ define('SETUP_DIR_WRITABLE', true);
*/
define('EXAMPLES_DIR', './examples/');
/**
* Directory where SQL scripts to create/upgrade configuration storage reside.
*/
define('SQL_DIR', './sql/');
/**
* Directory where configuration files are stored.
* It is not used directly in code, just a convenient

View File

@ -163,7 +163,7 @@ for kit in $KITS ; do
# Cleanup translations
cd phpMyAdmin-$version-$kit
scripts/lang-cleanup.sh $kit
if [ -f examples/create_tables.sql ] ; then
if [ -f sql/create_tables.sql ] ; then
# 3.5 and newer
rm -rf scripts
else