DB schemas rewrite #136

Open
opened 2026-09-03 18:35:16 +00:00 by aniram · 0 comments
Owner
  • Rename tables' names and columns to English
  • Use snake_case on columns
  • Match the name of the columns with the name of the model's fields
  • Use Embed instead of a huge string for the creation of tables
  • Use named params instead of question marks in queries
  • Some models fields can be NULL, make them a pointer
  • Verify that a fallback text exists whenever a query with multiple results(row) could possible return an empty slice(sql.ErrNoRows)
  • Rename DB Office Expenses to Quota Expenses
  • Make all dates that are of a custom date type be a pointer(NULLABLE) or else the sync will work but the rendering might break if they change a date that was an empty string like "0000-00-00" to "". Do it specially on the storage and model layers, they need to match.
- [ ] Rename tables' names and columns to English - [ ] Use snake_case on columns - [ ] Match the name of the columns with the name of the model's fields - [ ] Use Embed instead of a huge string for the creation of tables - [ ] Use named params instead of question marks in queries - [ ] Some models fields can be NULL, make them a pointer - [ ] Verify that a fallback text exists whenever a query with multiple results(row) could possible return an empty slice(sql.ErrNoRows) - [ ] Rename DB Office Expenses to Quota Expenses - [ ] Make all dates that are of a custom date type be a pointer(NULLABLE) or else the sync will work but the rendering might break if they change a date that was an empty string like "0000-00-00" to "". Do it specially on the storage and model layers, they need to match.
aniram self-assigned this 2026-09-03 18:35:16 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
overdrives/chambersbr#136
No description provided.