From 8c400dca22f66bd5a194d0ea512d24685c2196f9 Mon Sep 17 00:00:00 2001 From: Acbox Date: Tue, 3 Feb 2026 19:09:10 +0800 Subject: [PATCH] chore: add database design rules --- .cursor/rules/database-design.mdc | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 .cursor/rules/database-design.mdc diff --git a/.cursor/rules/database-design.mdc b/.cursor/rules/database-design.mdc new file mode 100644 index 00000000..dab7024d --- /dev/null +++ b/.cursor/rules/database-design.mdc @@ -0,0 +1,17 @@ +--- +alwaysApply: true +--- + +# Database Design Guidelines + +1. **Database Schema**: Define all tables in `/db/migrations/0001_init.up.sql` + +2. **Auto-generated Code**: All Go files under `/internal/db/sqlc` are automatically generated by sqlc. **DO NOT manually modify these files!** + +3. **Regenerating Code**: After modifying any SQL files, run the following command to update the generated Go files: + +```bash +mise run sqlc-generate +``` + +This will automatically update all files in `/internal/db/sqlc`.