Skip to content

Commit

Permalink
docs(CONTRIBUTING.md): Add a note on deleting/changing db columns
Browse files Browse the repository at this point in the history
  • Loading branch information
iequidoo committed Oct 12, 2024
1 parent 4fcf799 commit 426e402
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,12 @@ If column is already declared without `NOT NULL`, use `IFNULL` function to provi
Use `HAVING COUNT(*) > 0` clause
to [prevent aggregate functions such as `MIN` and `MAX` from returning `NULL`](https://stackoverflow.com/questions/66527856/aggregate-functions-max-etc-return-null-instead-of-no-rows).

Don't delete unused columns too early, but maybe after several months/releases, unused columns are
still used by older versions, so deleting them breaks downgrading the core or importing a backup in
an older version. Also don't change the column type, consider adding a new column with another name
instead. Finally, never change column semantics, this is especially dangerous because the `STRICT`
keyword doesn't help here.

### Commit messages

Commit messages follow the [Conventional Commits] notation.
Expand Down

0 comments on commit 426e402

Please sign in to comment.