diff --git a/doc/20-Advanced-Topics.md b/doc/20-Advanced-Topics.md index 2329a623c..4f47e0250 100644 --- a/doc/20-Advanced-Topics.md +++ b/doc/20-Advanced-Topics.md @@ -183,7 +183,7 @@ CREATE DATABASE icingaweb2; GRANT SELECT, INSERT, UPDATE, DELETE, DROP, CREATE VIEW, INDEX, EXECUTE ON icingaweb2.* TO 'icingaweb2'@'localhost' IDENTIFIED BY 'icingaweb2'; quit -mysql -p icingaweb2 < /usr/share/doc/icingaweb2/schema/mysql.schema.sql +mysql -p icingaweb2 < /usr/share/icingaweb2/schema/mysql.schema.sql ``` @@ -318,7 +318,7 @@ and all the other steps described above first. 1. Install PHP dependencies: `php`, `php-intl`, `php-imagick`, `php-gd`, `php-mysql`, `php-curl`, `php-mbstring` used by Icinga Web 2. 2. Create a database for Icinga Web 2, i.e. `icingaweb2`. -3. Import the database schema: `mysql -D icingaweb2 < /usr/share/icingaweb2/etc/schema/mysql.schema.sql`. +3. Import the database schema: `mysql -D icingaweb2 < /usr/share/icingaweb2/schema/mysql.schema.sql`. 4. Insert administrator user in the `icingaweb2` database: `INSERT INTO icingaweb_user (name, active, password_hash) VALUES ('admin', 1, '')`, where `` is the output of `php -r 'echo password_hash("yourtopsecretpassword", PASSWORD_DEFAULT);'`. diff --git a/doc/80-Upgrading.md b/doc/80-Upgrading.md index a9f13f36f..ee3602d82 100644 --- a/doc/80-Upgrading.md +++ b/doc/80-Upgrading.md @@ -13,8 +13,9 @@ v2.6 to v2.8 requires to follow the instructions for v2.7 too. **Database Schema** * Please apply the `v2.11.0.sql` upgrade script depending on your database vendor. - In package installations this file can be found in `/usr/share/doc/icingaweb2/schema/*-upgrades/` - (Debian/Ubuntu: `/usr/share/icingaweb2/etc/schema/*-upgrades/`). + As of version `2.11.4`, upgrade scripts can be found at `/usr/share/icingaweb2/schema/*-upgrades/`. + Older versions install these files to `/usr/share/doc/icingaweb2/schema/*-upgrades/` for RPM-based systems + and `/usr/share/icingaweb2/etc/schema/*-upgrades/` for Debian or Ubuntu. **Breaking changes** diff --git a/modules/setup/library/Setup/WebWizard.php b/modules/setup/library/Setup/WebWizard.php index bb2cbb90b..f25be555a 100644 --- a/modules/setup/library/Setup/WebWizard.php +++ b/modules/setup/library/Setup/WebWizard.php @@ -445,7 +445,7 @@ class WebWizard extends Wizard implements SetupWizard ? $pageData['setup_auth_db_creation']['password'] : null, 'schemaPath' => Config::module('setup') - ->get('schema', 'path', Icinga::app()->getBaseDir('etc' . DIRECTORY_SEPARATOR . 'schema')) + ->get('schema', 'path', Icinga::app()->getBaseDir('schema')) )) ); } elseif (isset($pageData['setup_config_db_resource']) @@ -466,7 +466,7 @@ class WebWizard extends Wizard implements SetupWizard ? $pageData['setup_config_db_creation']['password'] : null, 'schemaPath' => Config::module('setup') - ->get('schema', 'path', Icinga::app()->getBaseDir('etc' . DIRECTORY_SEPARATOR . 'schema')) + ->get('schema', 'path', Icinga::app()->getBaseDir('schema')) )) ); } diff --git a/etc/schema/mysql-upgrades/2.0.0beta3-2.0.0rc1.sql b/schema/mysql-upgrades/2.0.0beta3-2.0.0rc1.sql similarity index 100% rename from etc/schema/mysql-upgrades/2.0.0beta3-2.0.0rc1.sql rename to schema/mysql-upgrades/2.0.0beta3-2.0.0rc1.sql diff --git a/etc/schema/mysql-upgrades/2.11.0.sql b/schema/mysql-upgrades/2.11.0.sql similarity index 100% rename from etc/schema/mysql-upgrades/2.11.0.sql rename to schema/mysql-upgrades/2.11.0.sql diff --git a/etc/schema/mysql-upgrades/2.5.0.sql b/schema/mysql-upgrades/2.5.0.sql similarity index 100% rename from etc/schema/mysql-upgrades/2.5.0.sql rename to schema/mysql-upgrades/2.5.0.sql diff --git a/etc/schema/mysql-upgrades/2.9.0.sql b/schema/mysql-upgrades/2.9.0.sql similarity index 100% rename from etc/schema/mysql-upgrades/2.9.0.sql rename to schema/mysql-upgrades/2.9.0.sql diff --git a/etc/schema/mysql-upgrades/2.9.1.sql b/schema/mysql-upgrades/2.9.1.sql similarity index 100% rename from etc/schema/mysql-upgrades/2.9.1.sql rename to schema/mysql-upgrades/2.9.1.sql diff --git a/etc/schema/mysql.schema.sql b/schema/mysql.schema.sql similarity index 100% rename from etc/schema/mysql.schema.sql rename to schema/mysql.schema.sql diff --git a/etc/schema/pgsql-upgrades/2.0.0beta3-2.0.0rc1.sql b/schema/pgsql-upgrades/2.0.0beta3-2.0.0rc1.sql similarity index 100% rename from etc/schema/pgsql-upgrades/2.0.0beta3-2.0.0rc1.sql rename to schema/pgsql-upgrades/2.0.0beta3-2.0.0rc1.sql diff --git a/etc/schema/pgsql-upgrades/2.11.0.sql b/schema/pgsql-upgrades/2.11.0.sql similarity index 100% rename from etc/schema/pgsql-upgrades/2.11.0.sql rename to schema/pgsql-upgrades/2.11.0.sql diff --git a/etc/schema/pgsql-upgrades/2.5.0.sql b/schema/pgsql-upgrades/2.5.0.sql similarity index 100% rename from etc/schema/pgsql-upgrades/2.5.0.sql rename to schema/pgsql-upgrades/2.5.0.sql diff --git a/etc/schema/pgsql-upgrades/2.9.0.sql b/schema/pgsql-upgrades/2.9.0.sql similarity index 100% rename from etc/schema/pgsql-upgrades/2.9.0.sql rename to schema/pgsql-upgrades/2.9.0.sql diff --git a/etc/schema/pgsql-upgrades/2.9.1.sql b/schema/pgsql-upgrades/2.9.1.sql similarity index 100% rename from etc/schema/pgsql-upgrades/2.9.1.sql rename to schema/pgsql-upgrades/2.9.1.sql diff --git a/etc/schema/pgsql.schema.sql b/schema/pgsql.schema.sql similarity index 100% rename from etc/schema/pgsql.schema.sql rename to schema/pgsql.schema.sql