diff options
author | David Lawrence <dlawrence@mozilla.com> | 2011-09-02 21:50:06 +0200 |
---|---|---|
committer | David Lawrence <dlawrence@mozilla.com> | 2011-09-02 21:50:06 +0200 |
commit | d3144ccde7c1d3c432baaf43fe0b79a6c30eb7b0 (patch) | |
tree | 8f7fac4d4b98c80a090e74934a754443c127d846 /Bugzilla/DB/Schema/Sqlite.pm | |
parent | 9344a458c830ba066b9004c301d0fc6cabc8f229 (diff) | |
parent | bf9156ad5f0a57a467dd46292efb2f0a47ec845e (diff) | |
download | bugzilla-d3144ccde7c1d3c432baaf43fe0b79a6c30eb7b0.tar.gz bugzilla-d3144ccde7c1d3c432baaf43fe0b79a6c30eb7b0.tar.xz |
merged with bugzilla/4.2
Diffstat (limited to 'Bugzilla/DB/Schema/Sqlite.pm')
-rw-r--r-- | Bugzilla/DB/Schema/Sqlite.pm | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/Bugzilla/DB/Schema/Sqlite.pm b/Bugzilla/DB/Schema/Sqlite.pm index 4730c4f9f..aad1f17bc 100644 --- a/Bugzilla/DB/Schema/Sqlite.pm +++ b/Bugzilla/DB/Schema/Sqlite.pm @@ -162,6 +162,23 @@ sub get_create_database_sql { die "Reached an unreachable point"; } +sub _get_create_table_ddl { + my $self = shift; + my ($table) = @_; + my $ddl = $self->SUPER::_get_create_table_ddl(@_); + + # TheSchwartz uses its own driver to access its tables, meaning + # that it doesn't understand "COLLATE bugzilla" and in fact + # SQLite throws an error when TheSchwartz tries to access its + # own tables, if COLLATE bugzilla is on them. We don't have + # to fix this elsewhere currently, because we only create + # TheSchwartz's tables, we never modify them. + if ($table =~ /^ts_/) { + $ddl =~ s/ COLLATE bugzilla//g; + } + return $ddl; +} + sub get_type_ddl { my $self = shift; my $def = dclone($_[0]); |