Merge branch '185-database-encoding' into 'develop'

Resolve "Add a warning about required database encoding"

Closes #185

See merge request funkwhale/funkwhale!167
This commit is contained in:
Eliot Berriot 2018-04-28 11:06:53 +00:00
commit c57d252a95
2 changed files with 11 additions and 1 deletions

View File

@ -0,0 +1 @@
Document that the database should use an utf-8 encoding (#185)

View File

@ -32,13 +32,22 @@ Create the project database and user:
.. code-block:: shell .. code-block:: shell
CREATE DATABASE funkwhale; CREATE DATABASE "scratch"
WITH ENCODING 'utf8'
LC_COLLATE = 'en_US.utf8'
LC_CTYPE = 'en_US.utf8';
CREATE USER funkwhale; CREATE USER funkwhale;
GRANT ALL PRIVILEGES ON DATABASE funkwhale TO funkwhale; GRANT ALL PRIVILEGES ON DATABASE funkwhale TO funkwhale;
Assuming you already have :ref:`created your funkwhale user <create-funkwhale-user>`, Assuming you already have :ref:`created your funkwhale user <create-funkwhale-user>`,
you should now be able to open a postgresql shell: you should now be able to open a postgresql shell:
.. warning::
It's importing that you use utf-8 encoding for your database,
otherwise you'll end up with errors and crashes later on when dealing
with music metedata that contains non-ascii chars.
.. code-block:: shell .. code-block:: shell
sudo -u funkwhale -H psql sudo -u funkwhale -H psql