From cf92ff48fd2036b42b3e7434e7081a85a9e2c9f5 Mon Sep 17 00:00:00 2001 From: =?utf8?q?St=C3=A9phane=20Jacob?= Date: Tue, 1 Jun 2010 12:04:46 +0200 Subject: [PATCH] Removes empty section and adds unique key on section names. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Stéphane Jacob --- templates/profile/groups.tpl | 4 ++-- upgrade/account/05_section.sql | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) create mode 100644 upgrade/account/05_section.sql diff --git a/templates/profile/groups.tpl b/templates/profile/groups.tpl index 541ebb8..116f1f3 100644 --- a/templates/profile/groups.tpl +++ b/templates/profile/groups.tpl @@ -34,7 +34,7 @@ {if $old}ex-{/if}Section @@ -43,7 +43,7 @@ {if $old}ex-{/if}Binet(s) diff --git a/upgrade/account/05_section.sql b/upgrade/account/05_section.sql new file mode 100644 index 0000000..5268d94 --- /dev/null +++ b/upgrade/account/05_section.sql @@ -0,0 +1,4 @@ +DELETE FROM profile_section_enum WHERE text = ''; +ALTER TABLE profile_section_enum ADD UNIQUE KEY (text); + +# vim:set syntax=mysql: -- 2.1.4