- # remove useless type casts
- for table in ('pending_bin_contents', 'deb_contents', 'udeb_contents'):
- c.execute("DROP TABLE %s" % table)
+ c.execute("ALTER TABLE policy_queue DROP constraint policy_queue_perms_check")
+ c.execute("ALTER TABLE policy_queue DROP constraint policy_queue_change_perms_check")
+ c.execute("ALTER TABLE policy_queue ADD CONSTRAINT policy_queue_perms_check CHECK (perms SIMILAR TO '[0-7][0-7][0-7][0-7]')")
+ c.execute("ALTER TABLE policy_queue ADD CONSTRAINT policy_queue_change_perms_check CHECK (change_perms SIMILAR TO '[0-7][0-7][0-7][0-7]')")