File: README.sql

package info (click to toggle)
planner 0.14.92-1.1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 13,676 kB
  • sloc: ansic: 68,177; xml: 6,112; sql: 890; makefile: 43; sh: 42; python: 26
file content (71 lines) | stat: -rw-r--r-- 1,694 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
As of planner 0.14.6, this file is in stale state.

Up to date information can be found in the 'Configuring a Planner database'
section of the user guide.

----

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.