mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-04-09 09:58:20 -05:00
Documents some issues and the required manual fixes for MariaDB
This commit is contained in:
parent
c0d4248021
commit
54f20b381e
@ -424,3 +424,24 @@ For example, using Docker Compose:
|
|||||||
# ...
|
# ...
|
||||||
volumes:
|
volumes:
|
||||||
- /path/to/my/scripts:/custom-cont-init.d:ro
|
- /path/to/my/scripts:/custom-cont-init.d:ro
|
||||||
|
|
||||||
|
.. _advanced-mysql-caveats:
|
||||||
|
|
||||||
|
MySQL Caveats
|
||||||
|
#############
|
||||||
|
|
||||||
|
Case Sensitivity
|
||||||
|
================
|
||||||
|
|
||||||
|
The database interface does not provide a method to configure a MySQL database to
|
||||||
|
be case sensitive. This would prevent a user from creating a tag ``Name`` and ``NAME``
|
||||||
|
as they are considered the same.
|
||||||
|
|
||||||
|
Per Django documentation, to enable this requires manual intervention. To enable
|
||||||
|
case sensetive tables, you can execute the following command against each table:
|
||||||
|
|
||||||
|
``ALTER TABLE <table_name> CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_bin;``
|
||||||
|
|
||||||
|
You can also set the default for new tables (this does NOT affect existing tables) with:
|
||||||
|
|
||||||
|
``ALTER DATABASE <db_name> CHARACTER SET utf8mb4 COLLATE utf8mb4_bin;``
|
||||||
|
@ -38,8 +38,14 @@ PAPERLESS_REDIS=<url>
|
|||||||
PAPERLESS_DBENGINE=<engine_name>
|
PAPERLESS_DBENGINE=<engine_name>
|
||||||
Optional, gives the ability to choose Postgres or MariaDB for database engine.
|
Optional, gives the ability to choose Postgres or MariaDB for database engine.
|
||||||
Available options are `postgresql` and `mariadb`.
|
Available options are `postgresql` and `mariadb`.
|
||||||
|
|
||||||
Default is `postgresql`.
|
Default is `postgresql`.
|
||||||
|
|
||||||
|
.. warning::
|
||||||
|
|
||||||
|
Using MariaDB comes with some caveats. See :ref:`advanced-mysql-caveats` for details.
|
||||||
|
|
||||||
|
|
||||||
PAPERLESS_DBHOST=<hostname>
|
PAPERLESS_DBHOST=<hostname>
|
||||||
By default, sqlite is used as the database backend. This can be changed here.
|
By default, sqlite is used as the database backend. This can be changed here.
|
||||||
|
|
||||||
|
@ -649,7 +649,7 @@ Migration to paperless-ngx is then performed in a few simple steps:
|
|||||||
|
|
||||||
|
|
||||||
Migrating from LinuxServer.io Docker Image
|
Migrating from LinuxServer.io Docker Image
|
||||||
========================
|
==========================================
|
||||||
|
|
||||||
As with any upgrades and large changes, it is highly recommended to create a backup before
|
As with any upgrades and large changes, it is highly recommended to create a backup before
|
||||||
starting. This assumes the image was running using Docker Compose, but the instructions
|
starting. This assumes the image was running using Docker Compose, but the instructions
|
||||||
@ -663,7 +663,7 @@ are translatable to Docker commands as well.
|
|||||||
to step 4.
|
to step 4.
|
||||||
b) Otherwise, in the ``docker-compose.yml`` add a new service for Redis,
|
b) Otherwise, in the ``docker-compose.yml`` add a new service for Redis,
|
||||||
following `the example compose files <https://github.com/paperless-ngx/paperless-ngx/tree/main/docker/compose>`_
|
following `the example compose files <https://github.com/paperless-ngx/paperless-ngx/tree/main/docker/compose>`_
|
||||||
b) Set the environment variable ``PAPERLESS_REDIS`` so it points to the new Redis container
|
c) Set the environment variable ``PAPERLESS_REDIS`` so it points to the new Redis container
|
||||||
|
|
||||||
4. Update user mapping
|
4. Update user mapping
|
||||||
|
|
||||||
@ -692,11 +692,12 @@ are translatable to Docker commands as well.
|
|||||||
|
|
||||||
.. _setup-sqlite_to_psql:
|
.. _setup-sqlite_to_psql:
|
||||||
|
|
||||||
Moving data from SQLite to PostgreSQL
|
Moving data from SQLite to PostgreSQL or MySQL/MariaDB
|
||||||
=====================================
|
======================================================
|
||||||
|
|
||||||
Moving your data from SQLite to PostgreSQL is done via executing a series of django
|
Moving your data from SQLite to PostgreSQL or MySQL/MariaDB is done via executing a series of django
|
||||||
management commands as below.
|
management commands as below. The commands below use PostgreSQL, but are applicable to MySQL/MariaDB
|
||||||
|
with the
|
||||||
|
|
||||||
.. caution::
|
.. caution::
|
||||||
|
|
||||||
@ -713,6 +714,11 @@ management commands as below.
|
|||||||
and filenames (1024 characters). If you have data in these fields that surpasses these
|
and filenames (1024 characters). If you have data in these fields that surpasses these
|
||||||
limits, migration to PostgreSQL is not possible and will fail with an error.
|
limits, migration to PostgreSQL is not possible and will fail with an error.
|
||||||
|
|
||||||
|
.. warning::
|
||||||
|
|
||||||
|
MySQL is case insensitive by default, treating values like "Name" and "NAME" as identical.
|
||||||
|
See :ref:`advanced-mysql-caveats` for details.
|
||||||
|
|
||||||
|
|
||||||
1. Stop paperless, if it is running.
|
1. Stop paperless, if it is running.
|
||||||
2. Tell paperless to use PostgreSQL:
|
2. Tell paperless to use PostgreSQL:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user