diff options
author | Madhura Jayaratne <madhura.cj@gmail.com> | 2014-12-30 20:25:33 +0300 |
---|---|---|
committer | Madhura Jayaratne <madhura.cj@gmail.com> | 2014-12-30 20:25:33 +0300 |
commit | 1b87db57245d9b6748191dbe7fa968b29f0c17dd (patch) | |
tree | c8b329e434b2b4ec29133718bd04479eac4ad6bf | |
parent | 7a34a1d8de86b0ac464f600021a0083062166e0d (diff) |
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>
-rw-r--r-- | .travis.yml | 2 | ||||
-rw-r--r-- | ChangeLog | 1 | ||||
-rw-r--r-- | doc/config.rst | 4 | ||||
-rw-r--r-- | doc/setup.rst | 14 | ||||
-rw-r--r-- | libraries/config.default.php | 2 | ||||
-rw-r--r-- | libraries/relation.lib.php | 8 | ||||
-rw-r--r-- | libraries/vendor_config.php | 5 | ||||
-rwxr-xr-x | scripts/create-release.sh | 2 | ||||
-rw-r--r-- | sql/create_tables.sql (renamed from examples/create_tables.sql) | 0 | ||||
-rw-r--r-- | sql/create_tables_drizzle.sql (renamed from examples/create_tables_drizzle.sql) | 0 | ||||
-rw-r--r-- | sql/upgrade_column_info_4_3_0+.sql (renamed from examples/upgrade_column_info_4_3_0+.sql) | 0 | ||||
-rw-r--r-- | sql/upgrade_tables_mysql_4_1_2+.sql (renamed from examples/upgrade_tables_mysql_4_1_2+.sql) | 0 |
12 files changed, 22 insertions, 16 deletions
diff --git a/.travis.yml b/.travis.yml index 56fffb919b..3844ab2953 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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 @@ -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 diff --git a/doc/config.rst b/doc/config.rst index d513521813..4a94e89b84 100644 --- a/doc/config.rst +++ b/doc/config.rst @@ -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:: diff --git a/doc/setup.rst b/doc/setup.rst index 68c7db7407..aaced18845 100644 --- a/doc/setup.rst +++ b/doc/setup.rst @@ -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 diff --git a/libraries/config.default.php b/libraries/config.default.php index e4f38be69a..be860b917d 100644 --- a/libraries/config.default.php +++ b/libraries/config.default.php @@ -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' * diff --git a/libraries/relation.lib.php b/libraries/relation.lib.php index 61076a3ff7..82dd1d22c5 100644 --- a/libraries/relation.lib.php +++ b/libraries/relation.lib.php @@ -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' ); } diff --git a/libraries/vendor_config.php b/libraries/vendor_config.php index 21fb7acbd7..056afb0aa2 100644 --- a/libraries/vendor_config.php +++ b/libraries/vendor_config.php @@ -43,6 +43,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 * define used further in this file. diff --git a/scripts/create-release.sh b/scripts/create-release.sh index b4a80c51e8..fec0a12da9 100755 --- a/scripts/create-release.sh +++ b/scripts/create-release.sh @@ -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 diff --git a/examples/create_tables.sql b/sql/create_tables.sql index e11bf019b6..e11bf019b6 100644 --- a/examples/create_tables.sql +++ b/sql/create_tables.sql diff --git a/examples/create_tables_drizzle.sql b/sql/create_tables_drizzle.sql index 4bce72f2d8..4bce72f2d8 100644 --- a/examples/create_tables_drizzle.sql +++ b/sql/create_tables_drizzle.sql diff --git a/examples/upgrade_column_info_4_3_0+.sql b/sql/upgrade_column_info_4_3_0+.sql index b5bdc0c1fe..b5bdc0c1fe 100644 --- a/examples/upgrade_column_info_4_3_0+.sql +++ b/sql/upgrade_column_info_4_3_0+.sql diff --git a/examples/upgrade_tables_mysql_4_1_2+.sql b/sql/upgrade_tables_mysql_4_1_2+.sql index df4046a497..df4046a497 100644 --- a/examples/upgrade_tables_mysql_4_1_2+.sql +++ b/sql/upgrade_tables_mysql_4_1_2+.sql |