Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

1. Postgres updates.

2. add log-values for mysql and postgres when creating new database.
 CVS: ----------------------------------------------------------------------
  • Loading branch information...
commit be784d1a77a946e18dd96d355178e83ca0ae27e4 1 parent 5a2432d
authored September 20, 2004
4  mod/attendance/db/mysql.sql
@@ -30,3 +30,7 @@ CREATE TABLE prefix_attendance_roll (
30 30
   notes varchar(64) NOT NULL default '',
31 31
   PRIMARY KEY  (id)
32 32
 ) TYPE=MyISAM;
  33
+INSERT INTO prefix_log_display VALUES ('attendance', 'view', 'attendance', 'name');
  34
+INSERT INTO prefix_log_display VALUES ('attendance', 'view', 'attendance', 'name');
  35
+INSERT INTO prefix_log_display VALUES ('attendance', 'viewall', 'attendance', 'name');
  36
+
12  mod/attendance/db/postgres7.php
@@ -18,6 +18,18 @@ function attendance_upgrade($oldversion) {
18 18
         table_column("attendance", "", "autoattend", "integer", 2, "unsigned", "0", "not null");
19 19
     }
20 20
 
  21
+    if ($oldversion < 2004050301) {
  22
+
  23
+        modify_database("", "INSERT INTO {$CFG->prefix}log_display VALUES ('attendance', 'view', 'attendance', 'name');");
  24
+
  25
+        modify_database("", "INSERT INTO {$CFG->prefix}log_display VALUES ('attendance', 'viewall', 'attendance', 'name');");
  26
+
  27
+        modify_database("", "INSERT INTO {$CFG->prefix}log_display VALUES ('attendance', 'viewweek', 'attendance', 'name');");
  28
+
  29
+    }
  30
+
  31
+
  32
+
21 33
     return true;
22 34
 }
23 35
 
17  mod/attendance/db/postgres7.sql
@@ -3,14 +3,14 @@
3 3
 #
4 4
 
5 5
 CREATE TABLE prefix_attendance (
6  
-  id SERIAL,
  6
+  id SERIAL8,
7 7
   name varchar(255) NOT NULL default '',
8  
-  course int4 NOT NULL default '0',
9  
-  day int4 NOT NULL default '0',
  8
+  course int8 NOT NULL default '0',
  9
+  day int8 NOT NULL default '0',
10 10
   hours int2 NOT NULL default '0',
11 11
   roll int2 NOT NULL default '0',
12 12
   notes varchar(64) NOT NULL default '',
13  
-  timemodified int4 NOT NULL default '0',
  13
+  timemodified int8 NOT NULL default '0',
14 14
   dynsection int2 NOT NULL default '0',
15 15
   edited int2 NOT NULL default '0',
16 16
   autoattend int2 NOT NULL default '0',
@@ -22,11 +22,16 @@ CREATE TABLE prefix_attendance (
22 22
 #
23 23
 
24 24
 CREATE TABLE prefix_attendance_roll (
25  
-  id SERIAL,
  25
+  id SERIAL8,
26 26
   dayid int4 NOT NULL default '0',
27  
-  userid int4 NOT NULL default '0',
  27
+  userid int8 NOT NULL default '0',
28 28
   hour int2 NOT NULL default '0',
29 29
   status int4 NOT NULL default '0',
30 30
   notes varchar(64) NOT NULL default '',
31 31
   PRIMARY KEY  (id)
32 32
 );
  33
+
  34
+INSERT INTO prefix_log_display VALUES ('attendance', 'view', 'attendance', 'name');
  35
+INSERT INTO prefix_log_display VALUES ('attendance', 'view', 'attendance', 'name');
  36
+INSERT INTO prefix_log_display VALUES ('attendance', 'viewall', 'attendance', 'name');
  37
+

0 notes on commit be784d1

Please sign in to comment.
Something went wrong with that request. Please try again.