[Planner Dev] Changes and Test guide for database backend



Hi guys!

In order to have solid database support in Planner 0.13, I have been
testing it more. I have changed a test that was wrong in the database
creation code and have removed all the SQL group data from the database
creation data because user GROUP could only be created by the Postgres
admin user, normally different from the postgres user will be created to
use in Planner, so using GROUP puts some severe limitations in the goal
of doing all the database work transparent for the Planner user.

If you want to help please, follow the next 8 steps guide to test in
your environment the database backend.

Cheers

-- Alvaro


Testing the SQL backend:

The goal of this document is to simplify the testing for the
planner SQL backend in order more testers could check it.

1. You need Planner 0.13 (or 10102004 CVS) with database support:

acs acs:~/devel/gnome/planner$ ls -l
/usr/local/lib/planner/plugins/libsql-plugin.so
-rwxr-xr-x    1 root     staff      279734 2004-10-01 06:43
/usr/local/lib/planner/plugins/libsql-plugin.so

2. You need to install a fresh Postgres with only the default
installation
databases.

3. Start the Postgres database server:

acs:/home/acs/devel/gnome/planner# ps ax | grep postgre
 8288 ttyp3    S      0:00 /usr/lib/postgresql/bin/postmaster -D
/var/lib/postgres/data
 8292 ttyp3    S      0:00 postgres: stats buffer process
 8293 ttyp3    S      0:00 postgres: stats collector process

4. Create the user that we will use from Planner:

postgres acs:~$ createuser
Enter name of user to add: planner
Shall the new user be allowed to create databases? (y/n) y
Shall the new user be allowed to create more new users? (y/n) n
CREATE USER

5. Test that you can access the database with the postgres user you
have just created from the unix user you will use to launch planner:

acs acs:~/devel/gnome/planner$ psql -U planner template1

Maybe you need to modify "/etc/postgresql/pg_hba.conf" so you can
access from your local machine in trust mode:

# All other connections by UNIX sockets
local   all         all                                            
trust

This change is a security risk so if you are playing with a production
machine, isn't a good idea.

acs acs:~/devel/gnome/planner$ psql -U planner template1
Welcome to psql 7.4.5, the PostgreSQL interactive terminal.

6. Launch Planner, insert a few tasks and and save them in Database:

File->Export->Save to Database

Normally use "localhost" as Server, "plannerdb" (change it if you want)
as Database and fill "planner" as the Username.

You don't have "plannerdb" create so Planner will ask you if you
want to create it. Ask yes so Planner can create the database. 

If you don't receive any errors from Planner all data is now in the
database "plannerdb". You can check it:

plannerdb=> \dt;
                List of relations
 Schema |         Name         | Type  |  Owner
--------+----------------------+-------+---------
 public | allocation           | table | planner
 public | calendar             | table | planner
 public | day                  | table | planner
 public | day_interval         | table | planner
...
 public | task                 | table | planner
 public | task_to_property     | table | planner

7. You can load now the project from the database with:

File->Import->Open from Database

Your project will be the one with id "1" and revision "1".

8. Doing modifications from different Planner clients:

Several clients could now access the project data easily so
we use the field "revision" in order to check database changes.

Launch 2 different planner process: Pa and Pb.

From Pa open a project as in step 7.
Do the same form Pb.

Insert a new task and save the project from Pa.
Insert a new task and try now to save the project from Pb.

Pb will detect that the project has been changed and will
inform you with the user that changed the database, so there
is some groupware support.
 

Attachment: signature.asc
Description: Esta parte del mensaje =?ISO-8859-1?Q?est=E1?= firmada digitalmente



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]