Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
bugzilla
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
bugzilla
Commits
c9990cbe
Commit
c9990cbe
authored
Dec 16, 2011
by
Dave Lawrence
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 685611 - delta_ts is updated even when no changes are made to bugs created via WebServices
r/a=LpSolit
parent
9835ae42
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
35 additions
and
3 deletions
+35
-3
Schema.pm
Bugzilla/DB/Schema.pm
+2
-1
Field.pm
Bugzilla/Field.pm
+4
-2
DB.pm
Bugzilla/Install/DB.pm
+29
-0
No files found.
Bugzilla/DB/Schema.pm
View file @
c9990cbe
...
...
@@ -255,7 +255,8 @@ use constant ABSTRACT_SCHEMA => {
assigned_to
=>
{
TYPE
=>
'INT3'
,
NOTNULL
=>
1
,
REFERENCES
=>
{
TABLE
=>
'profiles'
,
COLUMN
=>
'userid'
}},
bug_file_loc
=>
{
TYPE
=>
'MEDIUMTEXT'
},
bug_file_loc
=>
{
TYPE
=>
'MEDIUMTEXT'
,
NOTNULL
=>
1
,
DEFAULT
=>
"''"
},
bug_severity
=>
{
TYPE
=>
'varchar(64)'
,
NOTNULL
=>
1
},
bug_status
=>
{
TYPE
=>
'varchar(64)'
,
NOTNULL
=>
1
},
creation_ts
=>
{
TYPE
=>
'DATETIME'
},
...
...
Bugzilla/Field.pm
View file @
c9990cbe
...
...
@@ -152,10 +152,12 @@ use constant UPDATE_COLUMNS => qw(
use
constant
SQL_DEFINITIONS
=>
{
# Using commas because these are constants and they shouldn't
# be auto-quoted by the "=>" operator.
FIELD_TYPE_FREETEXT
,
{
TYPE
=>
'varchar(255)'
},
FIELD_TYPE_FREETEXT
,
{
TYPE
=>
'varchar(255)'
,
NOTNULL
=>
1
,
DEFAULT
=>
"''"
},
FIELD_TYPE_SINGLE_SELECT
,
{
TYPE
=>
'varchar(64)'
,
NOTNULL
=>
1
,
DEFAULT
=>
"'---'"
},
FIELD_TYPE_TEXTAREA
,
{
TYPE
=>
'MEDIUMTEXT'
},
FIELD_TYPE_TEXTAREA
,
{
TYPE
=>
'MEDIUMTEXT'
,
NOTNULL
=>
1
,
DEFAULT
=>
"''"
},
FIELD_TYPE_DATETIME
,
{
TYPE
=>
'DATETIME'
},
FIELD_TYPE_BUG_ID
,
{
TYPE
=>
'INT3'
},
};
...
...
Bugzilla/Install/DB.pm
View file @
c9990cbe
...
...
@@ -29,6 +29,7 @@ use Bugzilla::Install::Util qw(indicate_progress install_string);
use
Bugzilla::
Util
;
use
Bugzilla::
Series
;
use
Bugzilla::
BugUrl
;
use
Bugzilla::
Field
;
use
Date::
Parse
;
use
Date::
Format
;
...
...
@@ -663,6 +664,9 @@ sub update_table_definitions {
$dbh
->
bz_alter_column
(
'attachments'
,
'filename'
,
{
TYPE
=>
'varchar(255)'
,
NOTNULL
=>
1
});
# 2011-11-28 dkl@mozilla.com - Bug 685611
_fix_notnull_defaults
();
################################################################
# New --TABLE-- changes should go *** A B O V E *** this point #
################################################################
...
...
@@ -3618,6 +3622,31 @@ sub _on_delete_set_null_for_audit_log_userid {
}
}
sub
_fix_notnull_defaults
{
my
$dbh
=
Bugzilla
->
dbh
;
$dbh
->
bz_alter_column
(
'bugs'
,
'bug_file_loc'
,
{
TYPE
=>
'MEDIUMTEXT'
,
NOTNULL
=>
1
,
DEFAULT
=>
"''"
},
''
);
my
$custom_fields
=
Bugzilla::
Field
->
match
({
custom
=>
1
,
type
=>
[
FIELD_TYPE_FREETEXT
,
FIELD_TYPE_TEXTAREA
]
});
foreach
my
$field
(
@$custom_fields
)
{
if
(
$field
->
type
==
FIELD_TYPE_FREETEXT
)
{
$dbh
->
bz_alter_column
(
'bugs'
,
$field
->
name
,
{
TYPE
=>
'varchar(255)'
,
NOTNULL
=>
1
,
DEFAULT
=>
"''"
},
''
);
}
if
(
$field
->
type
==
FIELD_TYPE_TEXTAREA
)
{
$dbh
->
bz_alter_column
(
'bugs'
,
$field
->
name
,
{
TYPE
=>
'MEDIUMTEXT'
,
NOTNULL
=>
1
,
DEFAULT
=>
"''"
},
''
);
}
}
}
1
;
__END__
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment