1 # acl_group_id in the many2many pivot table was an old Ruby-ism which 2 # required a gross hack on Django 0.96 to support. The Django name for the 3 # column is aclgroup_id, it requires no unsupportable hacks. 4 5 # NOTE: This is annoying the MySQL way of renaming columns. 6 UP_SQL = """ 7 ALTER TABLE acl_groups_hosts CHANGE 8 acl_group_id aclgroup_id int(11) default NULL; 9 ALTER TABLE acl_groups_users CHANGE 10 acl_group_id aclgroup_id int(11) default NULL; 11 """ 12 13 DOWN_SQL = """ 14 ALTER TABLE acl_groups_hosts CHANGE 15 aclgroup_id acl_group_id int(11) default NULL; 16 ALTER TABLE acl_groups_users CHANGE 17 aclgroup_id acl_group_id int(11) default NULL; 18 """ 19 20 def migrate_up(manager): 21 manager.execute_script(UP_SQL) 22 23 24 def migrate_down(manager): 25 manager.execute_script(DOWN_SQL) 26