/lenasys/trunk

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/lenasys/trunk

« back to all changes in this revision

Viewing changes to databas.sql

  • Committer: Gustav Hartvigsson
  • Date: 2013-05-08 18:11:13 UTC
  • mfrom: (57.1.1 lenasys)
  • Revision ID: gustav.hartvigsson@gmail.com-20130508181113-ageida78f8ct4s9d
Merge

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
  `passwd` CHAR(40) NULL ,
24
24
  `passwdHint` CHAR(100) NULL ,
25
25
  `ssn` CHAR(13) NULL COMMENT 'yyyymmdd-xxxx' ,
26
 
  `firstLogin` BIT NOT NULL DEFAULT 1, -- 1=true 0=false
 
26
  `firstLogin` BIT(1) NOT NULL DEFAULT 1, -- 1=true 0=false
27
27
  `activeCourse` VARCHAR(10) NULL,
28
28
  `email` VARCHAR(128) NULL,
29
29
  PRIMARY KEY (`userName`) ,
83
83
  `categoryName` VARCHAR(64) NOT NULL ,
84
84
  `courseID` VARCHAR(10) NOT NULL ,
85
85
  `quizData` VARCHAR(45) NULL ,
86
 
  `allowMultipleReplies` BIT NULL , -- 1=true and 0=false
87
 
  `autoCorrected` BIT NULL , -- if the quiz is corrected by auto or if the teacher needs to do it manually., 1=true and 0=false
 
86
  `allowMultipleReplies` BIT(1) NULL , -- 1=true and 0=false
 
87
  `autoCorrected` BIT(1) NULL , -- if the quiz is corrected by auto or if the teacher needs to do it manually., 1=true and 0=false
88
88
  `openingDate` DATETIME NULL ,  -- time for the student to do the quiz
89
89
  `closingDate` DATETIME NULL ,
90
 
  `updatedAt` TIMESTAMP ON UPDATE CURRENT_TIMESTAMP , 
 
90
  `updatedAt` TIMESTAMP ON UPDATE NOW() , 
91
91
  PRIMARY KEY (`quizNr`,  `subCategoryName`, `categoryName` , `courseID`) ,
92
92
    FOREIGN KEY (`subCategoryName`, `categoryName`, `courseID`)
93
93
    REFERENCES `lenasys`.`SubCategories` (`subCategoryName`, `categoryName`, `courseID` )ON UPDATE CASCADE ON DELETE CASCADE)
144
144
  `courseID` VARCHAR(10) NOT NULL ,
145
145
  `orderNr` INT NOT NULL , -- the order of the examples in the same category 
146
146
  `description` VARCHAR(200) NULL ,
147
 
  `updatedAt` TIMESTAMP ON UPDATE CURRENT_TIMESTAMP , 
 
147
  `updatedAt` TIMESTAMP ON UPDATE NOW() , 
148
148
  PRIMARY KEY (`exampleName`, `subCategoryName`, `categoryName`, `courseID`) ,
149
149
    FOREIGN KEY (`subCategoryName`, `categoryName`, `courseID` )
150
150
    REFERENCES `lenasys`.`SubCategories` (`subCategoryName`,`categoryName`, `courseID` )ON UPDATE CASCADE ON DELETE CASCADE)
158
158
  `fileType` ENUM('Text', 'Code', 'Video', 'Picture') DEFAULT 'text' ,  -- text=1, code=2, video=3 picture=4
159
159
  `codeLanguage` VARCHAR(10) NULL ,                                                                     -- example: javascript, html, m.m.
160
160
  `dataBlob` BLOB NULL ,                                                                                                -- This is where the binary file is stored. Searchable. 
161
 
  `updatedAt` TIMESTAMP ON UPDATE CURRENT_TIMESTAMP , 
 
161
  `updatedAt` TIMESTAMP ON UPDATE NOW() , 
162
162
  PRIMARY KEY (`fileName`))
163
163
ENGINE = InnoDB;
164
164
-- -----------------------------------------------------
172
172
  `subCategoryName` VARCHAR(64) NOT NULL ,
173
173
  `categoryName` VARCHAR(64) NOT NULL ,
174
174
  `courseID` VARCHAR(10) NOT NULL ,
175
 
  `executable` BIT , -- 1=true and 0=false
 
175
  `executable` BIT(1) , -- 1=true and 0=false
176
176
  PRIMARY KEY (`columnNr`, `orderNr`, `fileName`,`exampleName`,`subCategoryName`, `categoryName`, `courseID`) ,
177
177
    FOREIGN KEY (`fileName` )
178
178
    REFERENCES `lenasys`.`Files` (`fileName` )ON UPDATE CASCADE ON DELETE CASCADE,
223
223
  `userAgent` VARCHAR(200) NOT NULL , -- web browser and version
224
224
  `userIP` VARCHAR(20) NOT NULL , --  ip-number
225
225
  `browserID` VARCHAR(64) NOT NULL , -- autogenerated id for local-storage
226
 
  `loginTimeStamp` TIMESTAMP ON UPDATE CURRENT_TIMESTAMP  ,
227
 
  `success` BIT NOT NULL , -- 1=true and 0=false
 
226
  `loginTimeStamp` TIMESTAMP ON UPDATE NOW()  ,
 
227
  `success` BIT(1) NOT NULL , -- 1=true and 0=false
228
228
  PRIMARY KEY (`id`))
229
229
ENGINE = InnoDB;
230
230
-- -------------------------------------------------
336
336
dolor est id elit. Pellentesque eu tellus sed sem molestie fringilla. Integer auctor arcu nec nunc pharetra non 
337
337
consectetur augue viverra. Pellentesque lorem nisl, tristique sed lobortis et, tincidunt sit amet diam. Maecenas 
338
338
lacinia laoreet ligula, eget pretium libero venenatis malesuada. Suspendisse eu velit in arcu consectetur dictum a quis orci. 
339
 
Maecenas vulputate tincidunt odio sit amet interdum. Curabitur non ante tristique mi malesuada dictum at quis nunc. 
 
339
Maecenas vulputate tincidunt odio sit amet interdum. CuraBIT(1)ur non ante tristique mi malesuada dictum at quis nunc. 
340
340
Suspendisse ornare leo a elit egestas eu rutrum lorem cursus. Quisque sollicitudin, nisi eget consectetur auctor, 
341
341
leo risus blandit eros, id aliquet purus tortor a turpis. Donec venenatis blandit est quis imperdiet. Sed mauris eros, 
342
342
pharetra vitae tempus vel, pretium at purus.'),
343
343
 
344
 
('exempel fil2',1,'html','Donec sed turpis ante, et dapibus augue. Pellentesque habitant morbi tristique 
 
344
('exempel fil2',1,'html','Donec sed turpis ante, et dapibus augue. Pellentesque haBIT(1)ant morbi tristique 
345
345
senectus et netus et malesuada fames ac turpis egestas. Sed at tellus ante. Nunc non dolor ipsum, quis lacinia felis. 
346
346
Sed tristique, leo eu imperdiet laoreet, lacus lacus porta purus, quis laoreet nisi sem non orci. In non consequat enim. 
347
347
Donec lacinia auctor convallis. Nulla facilisi. Nulla tortor mi, accumsan vel cursus nec, porta nec ante.