Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

1. Postgres updates.

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

0 comments on commit be784d1

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