Project

General

Profile

PostgreSQL » History » Version 1

sph, 03/09/2009 07:21 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 1 sph
Also make sure you have the qt4-pgsql plugin installed, otherwise Quassel will not support the PostgreSQL backend.
6 1 sph
7 1 sph
h2. Preparing the database
8 1 sph
9 1 sph
We will assume you installed PostgreSQL and properly ran the initdb script.
10 1 sph
11 1 sph
Login using the database account (in my case pgsql)
12 1 sph
> <pre># su pgsql</pre>
13 1 sph
14 1 sph
Now let's create the quassel database and assign an account.
15 1 sph
> <pre>$ createdb quassel
16 1 sph
$ psql quassel
17 1 sph
quassel=# create role quassel with password 'somepassword';
18 1 sph
</pre>
19 1 sph
20 1 sph
h2. Setting up the Quassel Core
21 1 sph
22 1 sph
Now that the database is running properly, we are going to tell Quassel to use the correct backend.
23 1 sph
Use one of the two steps below and you're done!
24 1 sph
25 1 sph
h3. For a new core
26 1 sph
27 1 sph
> <pre>$ quasselcore --select-backend=PostgreSQL</pre>
28 1 sph
29 1 sph
h3. To migrate an existing core
30 1 sph
31 1 sph
> <pre>$ quasselcore --migrate-backend=PostgreSQL</pre>
32 1 sph
33 1 sph
An interactive script will request the necessary information to migrate successfully.