/magstudentportal/trunk

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/magstudentportal/trunk
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
72
73
74
==__  __==========_____=========================================================
 |  \/  |   /\   / ____|
 | \  / |  /  \ | |  __
 | |\/| | / /\ \| | |_ |
 | |  | |/ ____ \ |__| |
 |_|__|_/_/    \_\_____|            _     _____           _        _ 
  / ____| |           | |          | |   |  __ \         | |      | |
 | (___ | |_ _   _  __| | ___ _ __ | |_  | |__) |__  _ __| |_ __ _| |
  \___ \| __| | | |/ _` |/ _ \ '_ \| __| |  ___/ _ \| '__| __/ _` | |
  ____) | |_| |_| | (_| |  __/ | | | |_  | |  | (_) | |  | || (_| | |
 |_____/ \__|\__,_|\__,_|\___|_| |_|\__| |_|   \___/|_|   \__\__,_|_|
================================================================================
Mahmood & Amir & Gustav Student Portal
================================================================================

Authors:
Gustav Hartvigsson

INDEX --------------------------------------------------------------------------

* General Information
* Setup
* Initialising Database


General Information ------------------------------------------------------------

TODO

Setup --------------------------------------------------------------------------

TODO

Initialising Database ----------------------------------------------------------

  Here follows a description of how to initialise the database in different
different database engines/managers/thingies.

  The .sql files are located in ./src/main/resources/

Initialising Database: PostreSQL -----------------------------------------------

  In postgres you need to start psql from the terminal:
$ psql -h localhost -U postgres -a -f ./src/main/resources/create_db.sql
  If the your database username is "postgres", you should use that. press enter
and enter the password fot the database user.

  you should be something like this if it has been created correctly:
---------- snip ----------
Password for user postgres:
/*
  This should be used to create the database.

  How to do this depends on the DB.
*/

CREATE DATABASE mag_studentportal
      ENCODING = 'UTF8'
      CONNECTION LIMIT = -1;
CREATE DATABASE
---------- end snip ----------

  Now that you have created the database you need to initialise the tables, to
do this you need to run the following:
$ psql -h localhost -U postgres -d mag_studentportal \
  -a -f ./src/main/resources/create_tables.sql
  That should run without any errors.

  Congratulations! The database is now initialised!

  
Initialising Database: MariaDB/MySql -------------------------------------------

TODO