summaryrefslogtreecommitdiffstats
path: root/Bugzilla/DB/Schema
diff options
context:
space:
mode:
authormkanat%bugzilla.org <>2007-03-11 01:21:19 +0100
committermkanat%bugzilla.org <>2007-03-11 01:21:19 +0100
commit40a199771b751ebf7378efe32a68584ad7570ee7 (patch)
treefd2dbdbdbb782cd3cb5fa3bd4e09dd5be9fa3c09 /Bugzilla/DB/Schema
parent2884cd8606668e3174617cecf159e9e2bd128edd (diff)
downloadbugzilla-40a199771b751ebf7378efe32a68584ad7570ee7.tar.gz
bugzilla-40a199771b751ebf7378efe32a68584ad7570ee7.tar.xz
Bug 373442: Add referential integrity against the profiles table in some more simple places
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> (module owner) a=mkanat
Diffstat (limited to 'Bugzilla/DB/Schema')
-rw-r--r--Bugzilla/DB/Schema/Mysql.pm11
1 files changed, 0 insertions, 11 deletions
diff --git a/Bugzilla/DB/Schema/Mysql.pm b/Bugzilla/DB/Schema/Mysql.pm
index eb7cd3c87..c867dc0fc 100644
--- a/Bugzilla/DB/Schema/Mysql.pm
+++ b/Bugzilla/DB/Schema/Mysql.pm
@@ -176,17 +176,10 @@ sub get_alter_column_ddl {
# keys are not allowed.
delete $new_def_copy{PRIMARYKEY};
}
- # CHANGE COLUMN doesn't support REFERENCES
- delete $new_def_copy{REFERENCES};
my $new_ddl = $self->get_type_ddl(\%new_def_copy);
my @statements;
- # Drop the FK if the new definition doesn't have one.
- if ($old_def->{REFERENCES} && !$new_def->{REFERENCES}) {
- push(@statements, $self->_get_drop_fk_sql($table, $column, $old_def));
- }
-
push(@statements, "UPDATE $table SET $column = $set_nulls_to
WHERE $column IS NULL") if defined $set_nulls_to;
push(@statements, "ALTER TABLE $table CHANGE COLUMN
@@ -196,10 +189,6 @@ sub get_alter_column_ddl {
push(@statements, "ALTER TABLE $table DROP PRIMARY KEY");
}
- # Add the FK if the new definition has one and the old definition doesn't.
- if ($new_def->{REFERENCES} && !$old_def->{REFERENCES}) {
- push(@statements, $self->_get_add_fk_sql($table, $column, $new_def));
- }
return @statements;
}