Permalink
Browse files

Increase length of name field to 255 chars; ensure all tables are UTF8

  • Loading branch information...
1 parent 7b7aa54 commit 1d93626ee28f92a4d23d5b284bb2d6969184877a @lmorchard lmorchard committed Mar 3, 2011
Showing with 21 additions and 1 deletion.
  1. +1 −1 apps/homesnippets/models.py
  2. +20 −0 migrations/002-longer-name-field-and-utf8.sql
@@ -298,7 +298,7 @@ class Meta():
ClientMatchRule, blank=False)
name = models.CharField( _("short name (only shown to admins)"),
- blank=False, max_length=80)
+ blank=False, max_length=255)
body = models.TextField( _("content body"),
blank=False)
@@ -0,0 +1,20 @@
+--
+-- Increase length of name field to 255 chars; ensure all tables are UTF8
+--
+ALTER TABLE `homesnippets_snippets` MODIFY COLUMN name varchar(255);
+
+ALTER TABLE `auth_group` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
+ALTER TABLE `auth_group_permissions` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
+ALTER TABLE `auth_message` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
+ALTER TABLE `auth_permission` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
+ALTER TABLE `auth_user` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
+ALTER TABLE `auth_user_groups` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
+ALTER TABLE `auth_user_user_permissions` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
+ALTER TABLE `django_admin_log` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
+ALTER TABLE `django_content_type` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
+ALTER TABLE `django_session` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
+ALTER TABLE `django_site` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
+ALTER TABLE `homesnippets_clientmatchrule` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
+ALTER TABLE `homesnippets_snippet` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
+ALTER TABLE `homesnippets_snippet_client_match_rules` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
+

0 comments on commit 1d93626

Please sign in to comment.