Coverage for dak/dakdb/update118.py: 100%

2 statements  

« prev     ^ index     » next       coverage.py v7.6.0, created at 2026-08-03 16:46 +0000

1"""set owner tables for sequences 

2 

3@contact: Debian FTP Master <ftpmaster@debian.org> 

4@copyright: 2018, Bastian Blank <waldi@debian.org> 

5@license: GNU General Public License version 2 or later 

6""" 

7 

8# This program is free software; you can redistribute it and/or modify 

9# it under the terms of the GNU General Public License as published by 

10# the Free Software Foundation; either version 2 of the License, or 

11# (at your option) any later version. 

12 

13# This program is distributed in the hope that it will be useful, 

14# but WITHOUT ANY WARRANTY; without even the implied warranty of 

15# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 

16# GNU General Public License for more details. 

17 

18# You should have received a copy of the GNU General Public License 

19# along with this program; if not, write to the Free Software 

20# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 

21 

22################################################################################ 

23 

24sequences = { 

25 "acl_id_seq": "acl.id", 

26 "architecture_id_seq": "architecture.id", 

27 "archive_id_seq": "archive.id", 

28 "bin_associations_id_seq": "bin_associations.id", 

29 "binaries_id_seq": "binaries.id", 

30 "build_queue_id_seq": "build_queue.id", 

31 "changelogs_text_id_seq": "changelogs_text.id", 

32 "changes_id_seq": "changes.id", 

33 "component_id_seq": "component.id", 

34 "component_ordering_seq": "component.ordering", 

35 "config_id_seq": "config.id", 

36 "dsc_files_id_seq": "dsc_files.id", 

37 "files_id_seq": "files.id", 

38 "fingerprint_id_seq": "fingerprint.id", 

39 "keyrings_id_seq": "keyrings.id", 

40 "maintainer_id_seq": "maintainer.id", 

41 "metadata_keys_key_id_seq": "metadata_keys.key_id", 

42 "new_comments_id_seq": "new_comments.id", 

43 "override_type_id_seq": "override_type.id", 

44 "policy_queue_byhand_file_id_seq": "policy_queue_byhand_file.id", 

45 "policy_queue_id_seq": "policy_queue.id", 

46 "policy_queue_upload_id_seq": "policy_queue_upload.id", 

47 "priority_id_seq": "priority.id", 

48 "section_id_seq": "section.id", 

49 "source_id_seq": "source.id", 

50 "src_associations_id_seq": "src_associations.id", 

51 "src_format_id_seq": "src_format.id", 

52 "src_uploaders_id_seq": "src_uploaders.id", 

53 "suite_id_seq": "suite.id", 

54 "uid_id_seq": "uid.id", 

55} 

56 

57################################################################################ 

58 

59 

60statements = [ 

61 f"ALTER SEQUENCE {seq} OWNED BY {owner}" for seq, owner in sequences.items() 

62]