← Back to team overview

launchpad-reviewers team mailing list archive

Re: [Merge] ~tushar5526/launchpad:use-escape-string-syntax into launchpad:master

 

Added a small comment

Diff comments:

> diff --git a/database/schema/patch-2211-46-0.sql b/database/schema/patch-2211-46-0.sql
> new file mode 100644
> index 0000000..b7e32ea
> --- /dev/null
> +++ b/database/schema/patch-2211-46-0.sql
> @@ -0,0 +1,15 @@
> +-- Copyright 2025 Canonical Ltd.  This software is licensed under the
> +-- GNU Affero General Public License version 3 (see the file LICENSE).
> +
> +SET client_min_messages=ERROR;
> +
> +-- StructuralSubscription
> +COMMENT ON COLUMN StructuralSubscription.product IS E'The subscription\'s target, when it is a product.';

This probably works nicely, but it can also be done by doing
```
COMMENT ON COLUMN StructuralSubscription.product IS 'The subscription''s target, when it is a product.';
```
which doesn't require the `E''` escaping and I see it being done in other places in the code (I searched for `''` in the /schema dir). So I'd perhaps go with that instead.

Any reason for going with the E'' escaping here?

> +COMMENT ON COLUMN StructuralSubscription.productseries IS E'The subscription\'s target, when it is a product series.';
> +COMMENT ON COLUMN StructuralSubscription.project IS E'The subscription\'s target, when it is a project.';
> +COMMENT ON COLUMN StructuralSubscription.milestone IS E'The subscription\'s target, when it is a milestone.';
> +COMMENT ON COLUMN StructuralSubscription.distribution IS E'The subscription\'s target, when it is a distribution.';
> +COMMENT ON COLUMN StructuralSubscription.distroseries IS E'The subscription\'s target, when it is a distribution series.';
> +COMMENT ON COLUMN StructuralSubscription.sourcepackagename IS E'The subscription\'s target, when it is a source-package';
> +
> +INSERT INTO LaunchpadDatabaseRevision VALUES (2211, 46, 0);


-- 
https://code.launchpad.net/~tushar5526/launchpad/+git/launchpad/+merge/493109
Your team Launchpad code reviewers is requested to review the proposed merge of ~tushar5526/launchpad:use-escape-string-syntax into launchpad:master.



References