mirror of
https://github.com/azaion/gps-denied-desktop.git
synced 2026-04-22 11:06:36 +00:00
Sync .cursor from detections
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
---
|
||||
description: "SQL and database migration conventions: naming, safety, parameterized queries, indexing, Postgres"
|
||||
globs: ["**/*.sql", "**/migrations/**", "**/Migrations/**"]
|
||||
---
|
||||
# SQL / Migrations
|
||||
|
||||
- Use lowercase for SQL keywords (or match project convention); snake_case for table/column names
|
||||
- Every migration must be reversible (include DOWN/rollback)
|
||||
- Never rename tables or columns without explicit confirmation — prefer additive changes
|
||||
- Use parameterized queries; never concatenate user input into SQL
|
||||
- Add indexes for columns used in WHERE, JOIN, ORDER BY
|
||||
- Use transactions for multi-step data changes
|
||||
- Include `NOT NULL` constraints by default; explicitly allow `NULL` only when needed
|
||||
- Name constraints explicitly: `pk_table`, `fk_table_column`, `idx_table_column`
|
||||
- Test migrations against a copy of production schema before applying
|
||||
Reference in New Issue
Block a user