diff --git a/gemeinsamforschen/src/scripts/dbschema/fltrail.sql b/gemeinsamforschen/src/scripts/dbschema/fltrail.sql index 717dbcde085d2926a7c2abd9963a752edcdddd96..2c3636098252241845126356f4e2e6ecd826ee01 100644 --- a/gemeinsamforschen/src/scripts/dbschema/fltrail.sql +++ b/gemeinsamforschen/src/scripts/dbschema/fltrail.sql @@ -85,4 +85,5 @@ CREATE TABLE if not exists quiz correct tinyint(1) NOT NULL ) ENGINE = InnoDB - DEFAULT CHARSET = utf8; \ No newline at end of file + DEFAULT CHARSET = utf8; + diff --git a/gemeinsamforschen/src/scripts/dbschema/setup_gamification.sql b/gemeinsamforschen/src/scripts/dbschema/setup_gamification.sql new file mode 100644 index 0000000000000000000000000000000000000000..334349f1461a71d36467eb5d032ede7b88c2bfb7 --- /dev/null +++ b/gemeinsamforschen/src/scripts/dbschema/setup_gamification.sql @@ -0,0 +1,58 @@ +-- This script initializes tables to be used for gamification + +CREATE DATABASE IF NOT EXISTS `fltrail` + DEFAULT CHARACTER SET utf8 + COLLATE utf8_general_ci; +USE `fltrail`; + +---- events +-- events can be +-- * writing a comment +-- * taking a quiz +-- * creating a quiz +-- * adding a part of the journal +-- * completing the journal +-- * doing peer assessment (actively and passively) +CREATE TABLE if not exists events +( + eventId varchar(400) NOT NULL, + eventType varchar(400) NOT NULL, + studentId varchar(400) NOT NULL, + projectId varchar(400) NOT NULL, + title varchar(400) NOT NULL, + description varchar(400) NOT NULL +) + ENGINE = InnoDB + DEFAULT CHARSET = utf8; + +---- tasks +-- a task is something a student is obliged to do, such as +-- * uploading parts of the journal +-- * completing the journal +-- * giving at least one feedback to another student +-- * absolving peer assessment + +CREATE TABLE if not exists tasks +( + taskId varchar(400) NOT NULL, + taskType varchar(400) NOT NULL, + projectId varchar(400) NOT NULL, + title varchar(400) NOT NULL, + description varchar(400) NOT NULL, + state varchar(400) NOT NULL -- should be "open" or "closed" +) + ENGINE = InnoDB + DEFAULT CHARSET = utf8; + +--- achievements +CREATE TABLE if not exists achievements +( + author varchar(400) NOT NULL, + projectId varchar(400) NOT NULL, + question varchar(400) NOT NULL, + mcType varchar(400) NOT NULL, + answer varchar(400) NOT NULL, + correct tinyint(1) NOT NULL +) + ENGINE = InnoDB + DEFAULT CHARSET = utf8;