PostgreSQL » History » Version 2
Version 1 (sph, 03/09/2009 07:21 PM) → Version 2/27 (EgS, 03/09/2009 08:13 PM)
h1. PostgreSQL
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.
Also make sure you have the qt4-pgsql plugin installed, otherwise Quassel will not support the PostgreSQL backend.
h2. Preparing the database
We will assume you installed PostgreSQL and properly ran the initdb script.
Login using the database account (in my case pgsql)
> <pre># su pgsql</pre>
Now let's create the quassel database and assign an account.
> <pre>$ createdb quassel
$ psql quassel
postgres=# CREATE USER quassel=# create role quassel ENCRYPTED PASSWORD with password 'somepassword';
CREATE ROLE
postgres=# CREATE DATABASE quassel WITH OWNER quassel ENCODING 'UTF8';
CREATE DATABASE
</pre>
h2. Setting up the Quassel Core
Now that the database is running properly, we are going to tell Quassel to use the correct backend.
Use one of the two steps below and you're done!
h3. For a new core
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. > <pre>$ quasselcore --select-backend=PostgreSQL</pre>
h3. To migrate an existing core
> <pre>$ quasselcore --migrate-backend=PostgreSQL</pre>
An interactive script will request the necessary information to migrate successfully.
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.
Also make sure you have the qt4-pgsql plugin installed, otherwise Quassel will not support the PostgreSQL backend.
h2. Preparing the database
We will assume you installed PostgreSQL and properly ran the initdb script.
Login using the database account (in my case pgsql)
> <pre># su pgsql</pre>
Now let's create the quassel database and assign an account.
> <pre>$ createdb quassel
$ psql quassel
postgres=# CREATE USER quassel=# create role quassel ENCRYPTED PASSWORD with password 'somepassword';
CREATE ROLE
postgres=# CREATE DATABASE quassel WITH OWNER quassel ENCODING 'UTF8';
CREATE DATABASE
</pre>
h2. Setting up the Quassel Core
Now that the database is running properly, we are going to tell Quassel to use the correct backend.
Use one of the two steps below and you're done!
h3. For a new core
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. > <pre>$ quasselcore --select-backend=PostgreSQL</pre>
h3. To migrate an existing core
> <pre>$ quasselcore --migrate-backend=PostgreSQL</pre>
An interactive script will request the necessary information to migrate successfully.