-Remove useless type casts from primary keys to support sqlalchemy's
-reflection mechanism for all tables. Rename 2 sequences.
+Remove useless type casts from primary keys to support sqlalchemy's reflection
+mechanism for all tables. Rename 2 sequences and add 1 primary key.
@contact: Debian FTP Master <ftpmaster@debian.org>
@copyright: 2011 Torsten Werner <twerner@debian.org>
@contact: Debian FTP Master <ftpmaster@debian.org>
@copyright: 2011 Torsten Werner <twerner@debian.org>
for table in ('architecture', 'archive', 'bin_associations', \
'binaries', 'component', 'dsc_files', 'files', \
'fingerprint', 'location', 'maintainer', 'override_type', \
for table in ('architecture', 'archive', 'bin_associations', \
'binaries', 'component', 'dsc_files', 'files', \
'fingerprint', 'location', 'maintainer', 'override_type', \
c.execute("ALTER SEQUENCE known_changes_id_seq RENAME TO changes_id_seq")
c.execute("ALTER SEQUENCE queue_files_id_seq RENAME TO build_queue_files_id_seq")
c.execute("ALTER SEQUENCE known_changes_id_seq RENAME TO changes_id_seq")
c.execute("ALTER SEQUENCE queue_files_id_seq RENAME TO build_queue_files_id_seq")