From 50b250cf7825e304637f1aaf95fd5ed8171e800f Mon Sep 17 00:00:00 2001 From: iequidoo Date: Sat, 12 Oct 2024 16:29:12 -0300 Subject: [PATCH] docs(CONTRIBUTING.md): Add a note on deleting/changing db columns --- CONTRIBUTING.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 0d76a74a3..516b1d3f8 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -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.