The source headers, LICENSE files, and license metadata had drifted apart. Align the entire project to MIT: - Convert every source-file header to the MIT text across all comment styles (Go, TS, TSX, JS, MJS, SQL, CSS, GraphQL, shell), including SPDX-License-Identifier tags - Set the root and cookie-banner LICENSE files to the MIT text with a "MIT License" title line - Switch the package.json license fields, Docker image label, and cookie-banner README to MIT - Update docs and the genmodels header generator accordingly - Normalize copyright lines to a single format (Copyright (c) <year(s)> Probo Inc <hello@probo.com>.): unify the hello@getprobo.com and hello@probo.inc emails to hello@probo.com and the comma-separated years to a hyphenated range Genuine third-party references are intentionally left untouched: the Lucide icon attributions (Lucide is ISC) and the trivy dependency license allowlist. Signed-off-by: Sacha Al Himdani <sacha@probo.com>
37 lines
1.2 KiB
Plaintext
37 lines
1.2 KiB
Plaintext
---
|
|
description: Coredata SQL migration naming and conventions
|
|
globs: pkg/coredata/migrations/*.sql
|
|
alwaysApply: false
|
|
---
|
|
|
|
# Coredata migrations
|
|
|
|
See full guides: `contrib/claude/coredata.md` (Migrations) and
|
|
`contrib/claude/license.md` (SQL header).
|
|
|
|
## Naming — never invent or infer the timestamp
|
|
|
|
Migration files use UTC timestamp naming `YYYYMMDDTHHMMSSZ.sql`. The
|
|
timestamp is the **real current time**, obtained by running the command —
|
|
do NOT hand-write a round number (e.g. `...T100000Z`) and do NOT infer the
|
|
next name from existing files.
|
|
|
|
```bash
|
|
# Run this and use its exact output as the filename:
|
|
date -u +"%Y%m%dT%H%M%SZ.sql"
|
|
```
|
|
|
|
## License header
|
|
|
|
Every `.sql` file starts with the MIT header (use the current year). Copy
|
|
the exact block from `contrib/claude/license.md` (SQL section).
|
|
|
|
## Content rules
|
|
|
|
- One logical change per file.
|
|
- No indexes by default — add one only when justified by observed
|
|
production latency. Constraint-enforcing indexes (e.g. unique) are exempt.
|
|
- Avoid `DEFAULT` clauses. When adding a non-nullable column to an existing
|
|
table, set a `DEFAULT` to backfill existing rows, then `DROP DEFAULT` in
|
|
the same migration so inserts must supply the value explicitly.
|