/magstudentportal/trunk

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/magstudentportal/trunk
15.1.2 by Gustav Hartvigsson
* Started work on the README
1
==__  __==========_____=========================================================
2
 |  \/  |   /\   / ____|
3
 | \  / |  /  \ | |  __
4
 | |\/| | / /\ \| | |_ |
5
 | |  | |/ ____ \ |__| |
6
 |_|__|_/_/    \_\_____|            _     _____           _        _ 
7
  / ____| |           | |          | |   |  __ \         | |      | |
8
 | (___ | |_ _   _  __| | ___ _ __ | |_  | |__) |__  _ __| |_ __ _| |
9
  \___ \| __| | | |/ _` |/ _ \ '_ \| __| |  ___/ _ \| '__| __/ _` | |
10
  ____) | |_| |_| | (_| |  __/ | | | |_  | |  | (_) | |  | || (_| | |
11
 |_____/ \__|\__,_|\__,_|\___|_| |_|\__| |_|   \___/|_|   \__\__,_|_|
12
================================================================================
13
Mahmood & Amir & Gustav Student Portal
14
================================================================================
15
16
Authors:
17
Gustav Hartvigsson
18
19
INDEX --------------------------------------------------------------------------
20
21
* General Information
22
* Setup
23
* Initialising Database
24
25
26
General Information ------------------------------------------------------------
27
28
TODO
29
30
Setup --------------------------------------------------------------------------
31
32
TODO
33
34
Initialising Database ----------------------------------------------------------
35
15.1.3 by Gustav Hartvigsson
Generated classes from tables and added them.
36
  Here follows a description of how to initialise the database in different
15.1.2 by Gustav Hartvigsson
* Started work on the README
37
different database engines/managers/thingies.
38
39
  The .sql files are located in ./src/main/resources/
40
41
Initialising Database: PostreSQL -----------------------------------------------
42
43
  In postgres you need to start psql from the terminal:
44
$ psql -U <username> -a -f ./src/main/resources/create_db.sql
45
  If the your database username is "postgres", you should use that. press enter
46
and enter the password fot the database user.
47
48
  you should be something like this if it has been created correctly:
49
---------- snip ----------
50
Password for user postgres:
51
/*
52
  This should be used to create the database.
53
54
  How to do this depends on the DB.
55
*/
56
57
CREATE DATABASE mag_studentportal
58
      ENCODING = 'UTF8'
59
      CONNECTION LIMIT = -1;
60
CREATE DATABASE
61
---------- end snip ----------
62
63
  Now that you have created the database you need to initialise the tables, to
64
do this you need to run the following:
65
$ psql -U <username> -d mag_studentportal \
66
  -a -f ./src/main/resources/create_tables.sql
15.1.3 by Gustav Hartvigsson
Generated classes from tables and added them.
67
  That should run without any errors.
15.1.2 by Gustav Hartvigsson
* Started work on the README
68
69
  Congratulations! The database is now initialised!
70
71
  
72
Initialising Database: MariaDB/MySql -------------------------------------------
73
74
TODO