diff --git a/database.sql b/database.sql index 9a8c91a5..30992efe 100644 --- a/database.sql +++ b/database.sql @@ -32,10 +32,10 @@ CREATE TABLE odm_category ( # Dumping data for table 'odm_category' # -INSERT INTO odm_category VALUES (1,'SOP'); -INSERT INTO odm_category VALUES (2,'Training Manual'); -INSERT INTO odm_category VALUES (3,'Letter'); -INSERT INTO odm_category VALUES (4,'Presentation'); +INSERT INTO odm_category VALUES (NULL,'SOP'); +INSERT INTO odm_category VALUES (NULL,'Training Manual'); +INSERT INTO odm_category VALUES (NULL,'Letter'); +INSERT INTO odm_category VALUES (NULL,'Presentation'); # # Table structure for table 'odm_data' @@ -81,7 +81,7 @@ CREATE TABLE odm_department ( # Dumping data for table 'odm_department' # -INSERT INTO odm_department VALUES (1,'Information Systems'); +INSERT INTO odm_department VALUES (NULL,'Information Systems'); # # Table structure for table 'odm_dept_perms' @@ -176,7 +176,7 @@ CREATE TABLE odm_user ( # Dumping data for table 'odm_user' # -INSERT INTO odm_user VALUES (1,'admin','',1,'5555551212','admin@example.com','User','Admin',''); +INSERT INTO odm_user VALUES (NULL,'admin','',1,'5555551212','admin@example.com','User','Admin',''); # # Table structure for table 'odm_user_perms' @@ -224,5 +224,5 @@ CREATE TABLE IF NOT EXISTS odm_odmsys sys_value varchar(255) ) TYPE=MyISAM; -INSERT INTO odm_odmsys VALUES ('','version','1.2.6'); +INSERT INTO odm_odmsys VALUES (NULL,'version','1.2.6'); diff --git a/install/odm.php b/install/odm.php index 0b9dff78..fd46fb88 100644 --- a/install/odm.php +++ b/install/odm.php @@ -50,19 +50,19 @@ ") or die("
Could not create {$GLOBALS['CONFIG']['db_prefix']}category table. Error was:" . mysql_error()); $result = mysql_query(" -INSERT INTO {$GLOBALS['CONFIG']['db_prefix']}category VALUES (1,'SOP') +INSERT INTO {$GLOBALS['CONFIG']['db_prefix']}category VALUES (NULL,'SOP') ") or die("
Could not create {$GLOBALS['CONFIG']['db_prefix']}category. Error was:" . mysql_error()); $result = mysql_query(" - INSERT INTO {$GLOBALS['CONFIG']['db_prefix']}category VALUES (2,'Training Manual') + INSERT INTO {$GLOBALS['CONFIG']['db_prefix']}category VALUES (NULL,'Training Manual') ") or die("
Could not create {$GLOBALS['CONFIG']['db_prefix']}category. Error was:" . mysql_error()); $result = mysql_query(" - INSERT INTO {$GLOBALS['CONFIG']['db_prefix']}category VALUES (3,'Letter') + INSERT INTO {$GLOBALS['CONFIG']['db_prefix']}category VALUES (NULL,'Letter') ") or die("
Could not create {$GLOBALS['CONFIG']['db_prefix']}category. Error was:" . mysql_error()); $result = mysql_query(" - INSERT INTO {$GLOBALS['CONFIG']['db_prefix']}category VALUES (4,'Presentation') + INSERT INTO {$GLOBALS['CONFIG']['db_prefix']}category VALUES (NULL,'Presentation') ") or die("
Could not create {$GLOBALS['CONFIG']['db_prefix']}category. Error was:" . mysql_error()); // Data table @@ -108,7 +108,7 @@ ") or die("
Could not create {$GLOBALS['CONFIG']['db_prefix']}department table. Error was:" . mysql_error()); $result = mysql_query(" -INSERT INTO {$GLOBALS['CONFIG']['db_prefix']}department VALUES (1,'Information Systems') +INSERT INTO {$GLOBALS['CONFIG']['db_prefix']}department VALUES (NULL,'Information Systems') ") or die("
Could not {$GLOBALS['CONFIG']['db_prefix']}add department. Error was:" . mysql_error()); // Department Permissions table @@ -220,7 +220,7 @@ // Create admin user $result = mysql_query(" -INSERT INTO {$GLOBALS['CONFIG']['db_prefix']}user VALUES (1,'admin','','1','5555551212','admin@example.com','User','Admin','') +INSERT INTO {$GLOBALS['CONFIG']['db_prefix']}user VALUES (NULL,'admin','','1','5555551212','admin@example.com','User','Admin','') ") or die("
Could not add user. Error was:" . mysql_error()); // User permissions table @@ -260,5 +260,5 @@ // Create version number in db $result = mysql_query(" -INSERT INTO {$GLOBALS['CONFIG']['db_prefix']}odmsys VALUES ('version','1.2.6') +INSERT INTO {$GLOBALS['CONFIG']['db_prefix']}odmsys VALUES (NULL, 'version','1.2.6') ") or die("
Could not insert new version into {$GLOBALS['CONFIG']['db_prefix']}odmsys. Error was:" . mysql_error()); \ No newline at end of file diff --git a/install/upgrade_1252.php b/install/upgrade_1252.php index 35cbf75a..7f7cf0ba 100644 --- a/install/upgrade_1252.php +++ b/install/upgrade_1252.php @@ -78,5 +78,5 @@ // Create version number in db $result = mysql_query(" -INSERT INTO {$GLOBALS['CONFIG']['db_prefix']}odmsys VALUES ('','version','1.2.6') +INSERT INTO {$GLOBALS['CONFIG']['db_prefix']}odmsys VALUES (NULL,'version','1.2.6') ") or die("
Could insert new version into db user"); \ No newline at end of file