forked from pollen8/fabrik
-
Notifications
You must be signed in to change notification settings - Fork 378
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Defensive coding in update SQL, drop indexes before trying to create …
…them.
- Loading branch information
1 parent
f93ce4f
commit 6d2758c
Showing
1 changed file
with
16 additions
and
0 deletions.
There are no files selected for viewing
16 changes: 16 additions & 0 deletions
16
administrator/components/com_fabrik/sql/updates/mysql/3.4.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,37 @@ | ||
DROP INDEX IF EXISTS showinsummary ON `#__fabrik_elements`; | ||
DROP INDEX IF EXISTS plugin ON `#__fabrik_elements`; | ||
DROP INDEX IF EXISTS join_checked_out ON `#__fabrik_elements`; | ||
DROP INDEX IF EXISTS join_group_id ON `#__fabrik_elements`; | ||
DROP INDEX IF EXISTS parent_id ON `#__fabrik_elements`; | ||
CREATE INDEX showinsummary ON `#__fabrik_elements` (show_in_list_summary); | ||
CREATE INDEX plugin ON `#__fabrik_elements` (plugin(10)); | ||
CREATE INDEX join_checked_out ON `#__fabrik_elements` (checked_out); | ||
CREATE INDEX join_group_id ON `#__fabrik_elements` (group_id); | ||
CREATE INDEX parent_id ON `#__fabrik_elements` (parent_id); | ||
|
||
DROP INDEX IF EXISTS join_group_id ON `#__fabrik_formgroup`; | ||
DROP INDEX IF EXISTS join_form_id ON `#__fabrik_formgroup`; | ||
DROP INDEX IF EXISTS ordering ON `#__fabrik_formgroup`; | ||
CREATE INDEX join_group_id ON `#__fabrik_formgroup` (group_id); | ||
CREATE INDEX join_form_id ON `#__fabrik_formgroup` (form_id); | ||
CREATE INDEX ordering ON `#__fabrik_formgroup` (ordering); | ||
|
||
DROP INDEX IF EXISTS published ON `#__fabrik_groups`; | ||
CREATE INDEX published ON `#__fabrik_groups` (published); | ||
|
||
DROP INDEX IF EXISTS list_id ON `#__fabrik_joins`; | ||
DROP INDEX IF EXISTS element_id ON `#__fabrik_joins`; | ||
DROP INDEX IF EXISTS group_id ON `#__fabrik_joins`; | ||
DROP INDEX IF EXISTS table_join ON `#__fabrik_joins`; | ||
CREATE INDEX list_id ON `#__fabrik_joins` (list_id); | ||
CREATE INDEX element_id ON `#__fabrik_joins` (element_id); | ||
CREATE INDEX group_id ON `#__fabrik_joins` (group_id); | ||
CREATE INDEX table_join ON `#__fabrik_joins` (table_join(100)); | ||
|
||
DROP INDEX IF EXISTS published ON `#__fabrik_forms`; | ||
DROP INDEX IF EXISTS form_id ON `#__fabrik_lists`; | ||
CREATE INDEX published ON `#__fabrik_forms` (published); | ||
CREATE INDEX form_id ON `#__fabrik_lists` (form_id); | ||
|
||
DROP INDEX IF EXISTS element_id ON `#__fabrik_jsactions`; | ||
CREATE INDEX element_id ON `#__fabrik_jsactions` (element_id); |