diff options
| -rw-r--r-- | docs/database-installation.md | 2 | ||||
| -rw-r--r-- | docs/database-keeping-the-server-up-to-date.md | 2 | ||||
| -rw-r--r-- | docs/documentation_index.md | 1 | ||||
| -rw-r--r-- | docs/sql-directory.md | 53 |
4 files changed, 58 insertions, 0 deletions
diff --git a/docs/database-installation.md b/docs/database-installation.md index 619d8f0..ff39a80 100644 --- a/docs/database-installation.md +++ b/docs/database-installation.md @@ -25,6 +25,8 @@ You can choose to populate the database in two ways: - Automatic Database Updater (default, recommended) - DB Assambler tool +If you want to know how the SQL directory works or plan to have custom changes we recommend you read [this](sql-directory). + ### Automatic Database Updater (default, recommended) By default the Worldserver and Authserver will check for, and import all new files into the database you specified in the config. diff --git a/docs/database-keeping-the-server-up-to-date.md b/docs/database-keeping-the-server-up-to-date.md index 5e45e21..ad68e7b 100644 --- a/docs/database-keeping-the-server-up-to-date.md +++ b/docs/database-keeping-the-server-up-to-date.md @@ -7,6 +7,8 @@ 1. First make sure that your core is [up-to-date](keeping-the-server-up-to-date.md). +If you want to know how the SQL directory works or plan to have custom changes we recommend you read [this](sql-directory). + ## Automatic Database Updater (default, recommended) By default the Worldserver and Authserver will check for, and import all new files into the database you specified in the config. diff --git a/docs/documentation_index.md b/docs/documentation_index.md index b391e76..75d05ba 100644 --- a/docs/documentation_index.md +++ b/docs/documentation_index.md @@ -16,6 +16,7 @@ * [Logging Configuration](logging-configuration.md) * [MySQL types (C++)](mysqltypescpp.md) * [Project Versioning](project-versioning.md) +* [SQL Directory](sql-directory.md) * [SQL Versioning](sql-versioning.md) ## Database diff --git a/docs/sql-directory.md b/docs/sql-directory.md new file mode 100644 index 0000000..0fdf721 --- /dev/null +++ b/docs/sql-directory.md @@ -0,0 +1,53 @@ +# SQL Directory + +$ is relative to the source directory. + +## Create and drop files + +All create and drop files are found in $\data\sql\create\ directory. + +create_mysql.sql contains the queries to create the acore user and the databases. + +drop_mysql.sql revokes all permissions and drops the acore user and drops all databases. This is used for MySQL 5.7. + +drop_mysql_8.sql drops the acore user and drops all databases. This is used for MySQL 8.0 or newer. + +## Base files + +All base files are found in the $\data\sql\base\ directory. + +These files contain the all the data from the latest squashed update files. + +Files from this directory are automatically imported with the [Automatic Database Updater](database-installation#automatic-database-updater-default-recommended). + +## Update files + +All update files are found in the $\data\sql\updates\ directory. + +These files contain all the new updates to the database since the last squash. + +Files from this directory are automatically imported with the [Automatic Database Updater](database-installation#automatic-database-updater-default-recommended). + +## Pending update files + +All pending update files are found in the $\data\sql\updates\pending_db_*\ directory. + +All SQL changes you make to fix an issue on AzerothCore go in here. + +You create the pending update file by running create_sql.sh script. + +## Custom files + +All custom files are found in the $\data\sql\custom\ directory. + +All custom updates you make to the database should be stored in SQL files within this directory to make sure that they are not lost when updating your server. + +Files from this directory are automatically imported with the [Automatic Database Updater](database-installation#automatic-database-updater-default-recommended). + +## Archived files + +$\data\sql\base\ directory. + +All archived update files from previous database squashes. + +These files serve no real purpose. |
