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

1 statements  

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

1"""add per-suite ACL table 

2 

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

4@copyright: 2023 Emilio Pozuelo Monfort <pochu@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 

24statements = [ 

25 """ 

26CREATE TABLE acl_per_suite ( 

27 acl_id INTEGER NOT NULL REFERENCES acl(id) ON DELETE CASCADE, 

28 fingerprint_id INTEGER NOT NULL REFERENCES fingerprint(id) ON DELETE CASCADE, 

29 suite_id INTEGER NOT NULL REFERENCES suite(id) ON DELETE CASCADE, 

30 reason TEXT, 

31 created_by_id INTEGER REFERENCES fingerprint(id), 

32 created TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, 

33 PRIMARY KEY (acl_id, fingerprint_id, suite_id) 

34) 

35""" 

36]