Project

General

Profile

PostgreSQL » History » Version 6

sph, 04/01/2009 10:00 PM

1 1 sph
h1. PostgreSQL
2 1 sph
3 1 sph
This article describes how you can use Quassel with the PostgreSQL database. It is written from a FreeBSD point of view, but the process should be very similar for any other system out there. 
4 1 sph
5 6 sph
For now, this is only supported in git builds.
6 6 sph
7 1 sph
Also make sure you have the qt4-pgsql plugin installed, otherwise Quassel will not support the PostgreSQL backend.
8 1 sph
9 1 sph
h2. Preparing the database
10 1 sph
11 1 sph
We will assume you installed PostgreSQL and properly ran the initdb script.
12 1 sph
13 1 sph
Login using the database account (in my case pgsql)
14 1 sph
> <pre># su pgsql</pre>
15 1 sph
16 1 sph
Now let's create the quassel database and assign an account.
17 2 EgS
> <pre>$ psql
18 2 EgS
postgres=# CREATE USER quassel ENCRYPTED PASSWORD 'somepassword';
19 2 EgS
CREATE ROLE
20 2 EgS
postgres=# CREATE DATABASE quassel WITH OWNER quassel ENCODING 'UTF8';
21 2 EgS
CREATE DATABASE
22 1 sph
</pre>
23 1 sph
24 1 sph
h2. Setting up the Quassel Core
25 1 sph
26 1 sph
Now that the database is running properly, we are going to tell Quassel to use the correct backend.
27 1 sph
Use one of the two steps below and you're done!
28 1 sph
29 1 sph
h3. For a new core
30 1 sph
31 2 EgS
Just connect to the core using a Quassel Client to launch the first run wizard. Select the PostgreSQL backend in the dropdown list and fill in the needed credentials to connect to the Postgres DB you just created.
32 1 sph
33 1 sph
h3. To migrate an existing core
34 1 sph
35 5 sph
Make sure the core is not running and then execute the following:
36 4 sph
37 3 EgS
> <pre>$ quasselcore --select-backend=PostgreSQL</pre>
38 1 sph
39 1 sph
An interactive script will request the necessary information to migrate successfully.