summaryrefslogtreecommitdiff
path: root/docs/sql-directory.md
diff options
context:
space:
mode:
authorKitzunu <24550914+Kitzunu@users.noreply.github.com>2021-07-07 06:53:58 +0200
committerGitHub <noreply@github.com>2021-07-07 06:53:58 +0200
commit7959f6e3c67ecbd6feb33f3903ce995aa6bc5027 (patch)
treebff60cce2022e634f8be6e8c9be9f8534b21e164 /docs/sql-directory.md
parent693b6336955ac7ab0ba8f5aa86071a5f423d5fd5 (diff)
downloadwiki-7959f6e3c67ecbd6feb33f3903ce995aa6bc5027.tar.gz
wiki-7959f6e3c67ecbd6feb33f3903ce995aa6bc5027.tar.bz2
wiki-7959f6e3c67ecbd6feb33f3903ce995aa6bc5027.zip
chore: sql-directory (#575)
Diffstat (limited to 'docs/sql-directory.md')
-rw-r--r--docs/sql-directory.md53
1 files changed, 53 insertions, 0 deletions
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.