Database Migrations
Paul Brown · 08/02/2024 · 1 min read
When writiing database migrations (or reviewing them) look out for/add/avoid the following things:
- Unique constraints on one column or composite c...
Paul Brown · 08/02/2024 · 1 min read
When writiing database migrations (or reviewing them) look out for/add/avoid the following things:
Paul Brown · 07/02/2024 · 1 min read
This post makes no effort to be the final word on normalization, nor does it aim to be exhaustive. It is, rather, a synthesis of existing resources wr...
Paul Brown · 31/01/2024 · 2 min read
SELECT COLUMN_NAME
FROM INFORMATION_SCHEMA.COLUMNS
WHERE
TABLE_SCHEMA = 'schema_name'
A...
Paul Brown · 31/01/2024 · 1 min read
DB::statement('ALTER TABLE provisions ADD CHECK (IF(is_default, (SELECT COUNT(*) FROM provisions WHERE is_default = true) = 1, 1))');
```...
Paul Brown · 30/01/2024 · 1 min read
Schemata table has default
column already
Ensure only ever one 'True' in the default
column of the table
Every time a mode Schema model is...
Paul Brown · 24/01/2024 · 2 min read
git checkout [branch_name] -- [file_path]
The -- relates to the UNIX shell, no...
Paul Brown · 24/01/2024 · 1 min read