[Planner Dev] [patch] update to sql readme



Here is a small update to the README.sql in docs/sql

[[[ 
Changed the README.sql so it is clearer who should do what to get a
working database setup.
Added a small description of what to do in planner to use the database. 
]]]

Is this the right way to send patches? Do you want commit a message?

minus
Index: docs/sql/README.sql
===================================================================
RCS file: /cvs/gnome/planner/docs/sql/README.sql,v
retrieving revision 1.2
diff -r1.2 README.sql
14a15,17
> 
> -- This is usualy done by a database administrator  
> 
19c22
< * Create a UNICODE database:
---
> * Create database group:
21c24
<   createdb -E UNICODE -U rhult plannerdb
---
>   echo 'CREATE GROUP planner WITH USER rhult;' | psql -e -d plannerdb
23c26,28
< * Create database group:
---
> -- This is done by the user
> 
> * Create a UNICODE database:
25c30
<   echo 'CREATE GROUP planner WITH USER rhult;' | psql -e -U rhult -d plannerdb
---
>   createdb -E UNICODE -U rhult plannerdb
41a47,48
> 
> -- How to start over
47a55,63
> 
> 
> -- And then...
> 
> Start planner
> Add some items to a project
> Export to a database
> 
> Import from the database next time you use planner.
This is a plugin that implements a backend for keeping project data in a
postgres SQL database.

A very brief getting started howto (change username etc to use...):


* Init database (WARNING: This is usually already done on a working system):

 initdb -D /tmp/test-db

* Start server (WARNING: This is usually already done on a working system):

  postmaster -D /tmp/test-db


-- This is usualy done by a database administrator  

* Enable access to another user than the default:

  echo 'CREATE USER rhult CREATEDB;' | psql -e template1

* Create database group:

  echo 'CREATE GROUP planner WITH USER rhult;' | psql -e -d plannerdb

-- This is done by the user

* Create a UNICODE database:

  createdb -E UNICODE -U rhult plannerdb

* Create tables from new. This depends upon the schema that you are up to 
  in your code. Use the highest versioned SQL file.

  e.g.
  cat database.sql | psql -e -U rhult -d plannerdb

  or e.g.
  cat database-0.11.sql | psql -e -U rhult -d plannerdb

* Update Tables (in existing database). If you already have a database then 
  just update this to the new schema. Use the appropriate upgrade file based
  on your old and new schema,
  
  e.g.
  cat upgrade-0.6.x-0.11.sql | psql -e -U rhult -d plannerdb

-- How to start over
  
* Drop database and group to start over:

  echo 'DROP GROUP planner;' | psql -e -U rhult -d plannerdb
  dropdb plannerdb
 


-- And then...

Start planner
Add some items to a project
Export to a database

Import from the database next time you use planner.



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