SiT! Bugs

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0001743SiT!otherpublic2011-12-07 23:012012-01-08 01:08
Reporterdipohl 
Assigned To 
PrioritynormalSeveritymajorReproducibilityalways
StatusconfirmedResolutionopen 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0001743: Inconsistencies in DB model
DescriptionI review the DB schema in development version 3.90 and am finding some issues with incompatible datatypes. The table definitions need correction.

>> USERID <<<

Table `users` (
  `id` smallint(6) NOT NULL auto_increment,

Foreign keys refering to users.id:

Table `files`
  `userid` int(11) NOT NULL default '0',

Table `escalationpaths`
  `createdby` INT NULL ,
  `modifiedby` INT NULL ,

Table `emailsig`
  `modifiedby` INT NULL ,

TABLE `updates`
  `currentowner` tinyint(4) NOT NULL default '0',

------------

>>> USERSTATUS <<<

CREATE TABLE IF NOT EXISTS `userstatus` (
  `id` int(11) NOT NULL,

CREATE TABLE IF NOT EXISTS `tempassigns` (
  `userstatus` tinyint(4) NOT NULL default '1',

------------

>>> ROLEID <<<

CREATE TABLE IF NOT EXISTS `roles` (
`id` INT( 5 ) NOT NULL AUTO_INCREMENT ,

CREATE TABLE IF NOT EXISTS `rolepermissions` (
  `roleid` tinyint( 4 ) NOT NULL default '0',

------------

>>> PRIORITY <<<
Question: Which fields called "priority" refer to records in table priority?

CREATE TABLE IF NOT EXISTS `priority` (
  `id` int(11) NOT NULL auto_increment,

CREATE TABLE IF NOT EXISTS `servicelevels` (
  `priority` int(5) NOT NULL default '0',

CREATE TABLE IF NOT EXISTS `tasks` (
  `priority` tinyint(4) default NULL,

CREATE TABLE IF NOT EXISTS `incidents` (
  `priority` tinyint(4) default NULL,

CREATE TABLE IF NOT EXISTS `billing_periods` (
  `priority` INT( 4 ) NOT NULL,

CREATE TABLE IF NOT EXISTS `service` (
  `priority` smallint(6) NOT NULL default '0',

------------

>>> RESELLERID <<<

CREATE TABLE IF NOT EXISTS `resellers` (
  `id` tinyint(4) NOT NULL auto_increment,

CREATE TABLE IF NOT EXISTS `maintenance` (
  `reseller` int(11) default NULL,
Steps To ReproduceHave a look into setup_schema.php.
TagsNo tags attached.
Attached Files

- Relationships
related to 0001403confirmed We should store NULL rather than a empty string when as don't have the information 
related to 0001755resolvedpaulh Inconsistencies in "setup-schema.php" can cause an upgrade to fail 

-  Notes
User avatar (0004358)
ivan (administrator)
2011-12-08 13:03

I can confirm this, the bug also exists in 3.6x, I was pretty sure we already changed this to int(11) but apparently we didn't :-(
User avatar (0004401)
dipohl (developer)
2012-01-08 01:08

I had a look into setup-schema.php and need instructions on this point:

// Important: When making changes to the schema you must add SQL
// to make the alterations to existing databases
// in $upgrade_schema[] at the bottom of the file

Shall the section upgrade_schema include all changes,
that are needed to get schema of the last version directly?
Or does upgrade run thru all sections younger than mine,
so that each section include transformations that
lead to the next higher release?

- Issue History
Date Modified Username Field Change
2011-12-07 23:01 dipohl New Issue
2011-12-08 13:03 ivan Note Added: 0004358
2011-12-08 13:03 ivan Status new => confirmed
2011-12-08 16:44 dipohl Description Updated View Revisions
2011-12-12 12:40 dipohl Description Updated View Revisions
2011-12-12 12:59 dipohl Description Updated View Revisions
2011-12-12 15:29 dipohl Description Updated View Revisions
2011-12-12 16:00 dipohl Description Updated View Revisions
2011-12-12 16:16 dipohl Description Updated View Revisions
2011-12-12 17:18 dipohl Description Updated View Revisions
2012-01-07 12:36 Tomse Relationship added related to 0001755
2012-01-07 12:38 Tomse Relationship added related to 0001403
2012-01-08 01:08 dipohl Note Added: 0004401


Copyright © 2000 - 2019 MantisBT Team
Powered by Mantis Bugtracker