Skip to content

Commit 6cc29ef

Browse files
committed
chore(docs/decisions-log.md): change type to "Workaround" and mention H2 parameter.
Follow-up to c943447 commit. Relate to #1326 [skip ci]
1 parent c943447 commit 6cc29ef

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/decisions-log.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
| Date/Type | Description |
44
| --------- | ----------- |
5-
| 23.05.2020 Decision | [php-coder/mystamps#1326](https://github.com/php-coder/mystamps/issues/1326): unfortunately, by default double quotes work differently on **MySQL** (the arguments are treated as strings) in contrast to other databases and our "fix" fixed nothing. To have a similar behavior we can set `sql_mode` to [`ANSI_QUOTES`](https://dev.mysql.com/doc/refman/5.7/en/sql-mode.html#sqlmode_ansi_quotes). Decision: let's simply rename the field from `condition` to `cond` becase an dditional configuration of a database (or [a connection](https://stackoverflow.com/questions/58727070/how-to-dynamic-setting-sql-mode-for-mysql-in-springboot-program)) unnecessary complicates the setup. See also: [When to use single quotes, double quotes, and backticks in MySQL](https://stackoverflow.com/questions/11321491/when-to-use-single-quotes-double-quotes-and-backticks-in-mysql). Commits: [89ba68c0](https://github.com/php-coder/mystamps/commit/89ba68c0e11d59da55404614072f9eb757484243) |
6-
| 22.05.2020 Decision | [php-coder/mystamps#1326](https://github.com/php-coder/mystamps/issues/1326): when we decided to use double quotes for the `condition` field, we broke such queries on **H2**. This is because it behaves like Oracle and [converts unquoted identifiers to an upper case](https://stackoverflow.com/questions/10789994/make-h2-treat-quoted-name-and-unquoted-name-as-the-same), so the field is called `CONDITION` and when we quote it (`"condition"`), H2 couldn't find it because usage of the double quotes makes a field name case sensitive. Decision: pass [`DATABASE_TO_UPPER=false`](https://www.h2database.com/javadoc/org/h2/engine/DbSettings.html#DATABASE_TO_UPPER) parameter to H2 to disable such behavior and be consistent with MySQL/PostgreSQL. Commits: [87df2dfa](https://github.com/php-coder/mystamps/commit/87df2dfabae9ef672fc8910139f3aadb46dd27d1) |
7-
| 22.05.2020 Decision | [php-coder/mystamps#1326](https://github.com/php-coder/mystamps/issues/1326): the field `condition` [has been added](https://github.com/php-coder/mystamps/commit/5648a0b121544e5326b22e801b0c23c502b59e3f) in order to persist a series condition. When we [started to use](https://github.com/php-coder/mystamps/commit/28eab066225a717d93fc95af2d947e45944f3ad1) the field, it has turned out that the SQL queries fail on **MySQL** because `condition` is a reserved keyword and should be quoted. We couldn't use apostrophes because it doesn't work on other databases. There was idea to rename the field to `cond`. Decision: let's just double quote the field name as it should work everywhere and it's simpler. Commits: [74734a8d](https://github.com/php-coder/mystamps/commit/74734a8dc4071e9139efdf932750929869e9a370) |
5+
| 23.05.2020 Workaround | [php-coder/mystamps#1326](https://github.com/php-coder/mystamps/issues/1326): unfortunately, by default double quotes work differently on **MySQL** (the arguments are treated as strings) in contrast to other databases and our "fix" fixed nothing. To have a similar behavior we can set `sql_mode` to [`ANSI_QUOTES`](https://dev.mysql.com/doc/refman/5.7/en/sql-mode.html#sqlmode_ansi_quotes). Workaround: let's simply rename the field from `condition` to `cond` becase an dditional configuration of a database (or [a connection](https://stackoverflow.com/questions/58727070/how-to-dynamic-setting-sql-mode-for-mysql-in-springboot-program)) unnecessary complicates the setup. See also: [When to use single quotes, double quotes, and backticks in MySQL]( https://stackoverflow.com/questions/11321491/when-to-use-single-quotes-double-quotes-and-backticks-in-mysql). Extra decision: let's keep `DATABASE_TO_UPPER=false` parameter for **H2** as I prefer to see tables names in a lower case. Commits: [89ba68c0](https://github.com/php-coder/mystamps/commit/89ba68c0e11d59da55404614072f9eb757484243) |
6+
| 22.05.2020 Workaround | [php-coder/mystamps#1326](https://github.com/php-coder/mystamps/issues/1326): when we decided to use double quotes for the `condition` field, we broke such queries on **H2**. This is because it behaves like Oracle and [converts unquoted identifiers to an upper case](https://stackoverflow.com/questions/10789994/make-h2-treat-quoted-name-and-unquoted-name-as-the-same), so the field is called `CONDITION` and when we quote it (`"condition"`), H2 couldn't find it because usage of the double quotes makes a field name case sensitive. Workaround: pass [`DATABASE_TO_UPPER=false`](https://www.h2database.com/javadoc/org/h2/engine/DbSettings.html#DATABASE_TO_UPPER) parameter to H2 to disable such behavior and be consistent with MySQL/PostgreSQL. Commits: [87df2dfa](https://github.com/php-coder/mystamps/commit/87df2dfabae9ef672fc8910139f3aadb46dd27d1) |
7+
| 22.05.2020 Workaround | [php-coder/mystamps#1326](https://github.com/php-coder/mystamps/issues/1326): the field `condition` [has been added](https://github.com/php-coder/mystamps/commit/5648a0b121544e5326b22e801b0c23c502b59e3f) in order to persist a series condition. When we [started to use](https://github.com/php-coder/mystamps/commit/28eab066225a717d93fc95af2d947e45944f3ad1) the field, it has turned out that the SQL queries fail on **MySQL** because `condition` is a reserved keyword and should be quoted. We couldn't use apostrophes because it doesn't work on other databases. There was idea to rename the field to `cond`. Workaround: let's just double quote the field name as it should work everywhere and it's simpler. Commits: [74734a8d](https://github.com/php-coder/mystamps/commit/74734a8dc4071e9139efdf932750929869e9a370) |
88
| 22.05.2020 Workaround | [php-coder/mystamps#1398](https://github.com/php-coder/mystamps/issues/1398): After we switched to use HTTPS for a **0pdd** badge, it didn't show up in README.md file. Workaround: get back to using of HTTP in a link. Bug: [yegor256/0pdd#289](https://github.com/yegor256/0pdd/issues/289) Commits: [2d53575d](https://github.com/php-coder/mystamps/commit/2d53575d1c6a7b8ee9681d438fc4622e799e36c5) |
99
| 07.04.2020 Decision | Add new type of change of commits: `improve` We need this because many changes in a series import are naturally fit into this category: they aren't new features as they are small, they aren't bugs as they were discovered during site usage. Unfortunately there is no related type in the current conventional commits specification. See discussions: [conventional-commits/conventionalcommits.org#66](https://github.com/conventional-commits/conventionalcommits.org/issues/66) and [conventional-commits/conventionalcommits.org#78](https://github.com/conventional-commits/conventionalcommits.org/issues/78)
1010
| 07.03.2020 Workaround | [php-coder/mystamps#1072](https://github.com/php-coder/mystamps/issues/1072): AJAX-related tests don't work in **htmlunit** and fail with `ReferenceError: "Headers" is not defined`. When the code got updated to use another version of constructor of `Headers` class, tests fail with error `ReferenceError: "fetch" is not defined` error. Bug: [HtmlUnit/htmlunit#78](https://github.com/HtmlUnit/htmlunit/issues/78) Workaround: because "the fetch api is not supported so far", let's use axios library instead. Commits: [f224e94](https://github.com/php-coder/mystamps/commit/f224e944b367036458ce9d7ce0c596504766ef8e) |

0 commit comments

Comments
 (0)