]> git.ipfire.org Git - thirdparty/patchwork.git/commitdiff
sql: Fix table lists
authorAli Alnubani <alialnu@mellanox.com>
Tue, 29 Oct 2019 07:34:46 +0000 (07:34 +0000)
committerDaniel Axtens <dja@axtens.net>
Thu, 31 Oct 2019 12:31:06 +0000 (23:31 +1100)
[ backported from master commit 1a36ed51a8e1 ]

The patch adds missing commas in the table lists where missing, and
removes where unnecessary. This fixes errors such as the following when
feeding the script to psql:

  psql:lib/sql/grant-all.postgres.sql:37: ERROR: syntax error at or near "patchwork_emailconfirmation"
  LINE 19:  patchwork_emailconfirmation,
  ...

Signed-off-by: Ali Alnubani <alialnu@mellanox.com>
Reviewed-by: Stephen Finucane <stephen@that.guru>
Fixes: ca0e79d4db34 ("sql: Sort 'grant-all' scripts alphabetically")
Signed-off-by: Daniel Axtens <dja@axtens.net>
lib/sql/grant-all.postgres.sql
releasenotes/notes/sql-fix-table-lists-77667621052b2f72.yaml [new file with mode: 0644]

index 27f55c96d7688998d1b616db37802197992f8d44..7fb3ac8330fcb0c02b17bc27a46e15ef1b8d0d12 100644 (file)
@@ -18,7 +18,7 @@ GRANT SELECT, UPDATE, INSERT, DELETE ON
        patchwork_check,
        patchwork_comment,
        patchwork_coverletter,
-       patchwork_delegationrule
+       patchwork_delegationrule,
        patchwork_emailconfirmation,
        patchwork_emailoptout,
        patchwork_patch,
@@ -33,7 +33,7 @@ GRANT SELECT, UPDATE, INSERT, DELETE ON
        patchwork_submission,
        patchwork_tag,
        patchwork_userprofile,
-       patchwork_userprofile_maintainer_projects,
+       patchwork_userprofile_maintainer_projects
 TO "www-data";
 GRANT SELECT, UPDATE ON
        auth_group_id_seq,
@@ -49,7 +49,7 @@ GRANT SELECT, UPDATE ON
        patchwork_bundlepatch_id_seq,
        patchwork_check_id_seq,
        patchwork_comment_id_seq,
-       patchwork_delegationrule_id_seq
+       patchwork_delegationrule_id_seq,
        patchwork_emailconfirmation_id_seq,
        patchwork_patch_id_seq,
        patchwork_patchtag_id_seq,
@@ -61,7 +61,7 @@ GRANT SELECT, UPDATE ON
        patchwork_state_id_seq,
        patchwork_tag_id_seq,
        patchwork_userprofile_id_seq,
-       patchwork_userprofile_maintainer_projects_id_seq,
+       patchwork_userprofile_maintainer_projects_id_seq
 TO "www-data";
 
 -- allow the mail user (in this case, 'nobody') to add submissions (patches,
@@ -69,32 +69,32 @@ TO "www-data";
 GRANT INSERT, SELECT ON
        patchwork_comment,
        patchwork_coverletter,
-       patchwork_event
+       patchwork_event,
        patchwork_seriespatch,
        patchwork_seriesreference,
-       patchwork_submission,
+       patchwork_submission
 TO "nobody";
 GRANT INSERT, SELECT, UPDATE, DELETE ON
        patchwork_patch,
        patchwork_patchtag,
-       patchwork_person
-       patchwork_series,
+       patchwork_person,
+       patchwork_series
 TO "nobody";
 GRANT SELECT ON
-       patchwork_delegationrule
+       patchwork_delegationrule,
        patchwork_project,
        patchwork_state,
-       patchwork_tag,
+       patchwork_tag
 TO "nobody";
 GRANT UPDATE, SELECT ON
        patchwork_comment_id_seq,
-       patchwork_event_id_seq
+       patchwork_event_id_seq,
        patchwork_patch_id_seq,
        patchwork_patchtag_id_seq,
        patchwork_person_id_seq,
        patchwork_series_id_seq,
        patchwork_seriespatch_id_seq,
-       patchwork_seriesreference_id_seq,
+       patchwork_seriesreference_id_seq
 TO "nobody";
 
 COMMIT;
diff --git a/releasenotes/notes/sql-fix-table-lists-77667621052b2f72.yaml b/releasenotes/notes/sql-fix-table-lists-77667621052b2f72.yaml
new file mode 100644 (file)
index 0000000..8eaa9f4
--- /dev/null
@@ -0,0 +1,4 @@
+---
+fixes:
+  - |
+    An sql error was fixed in `lib/sql/grant-all.postgres.sql`.