gas-stack/doc/TODO.txt
wispem-wantex e85a68e69d
All checks were successful
CI / build-docker (push) Successful in 5s
CI / build-docker-bootstrap (push) Has been skipped
CI / release-test (push) Successful in 2m17s
devcontainer: make it work on mac
2026-01-26 14:54:59 -08:00

32 lines
1.4 KiB
Plaintext

TODO: auto-timestamps
- SaveXyz should set created_at and updated_at; shouldn't touch is_deleted or deleted_at
- if soft delete is enabled, DeleteXyz should do update (not delete) and set is_deleted and deleted_at
- ...and DeleteXyz should have pointer receiver for soft-delete
- SaveXyz shouldn't set created_at in the do-update branch
- GetXyzByID should include `ErrItemIsDeleted` if item is soft-deleted
TODO: modified-timestamps
- set updated_at and created_at in SaveXYZ
- soft delete option
TODO: generator-foreign-keys
- add auto-foreign-key checking blocks to SaveXyz
TODO: migration-structs
- Right now, migrations are strings. Could be a struct with "name", "up" and "down" fields
- Adding a "down" operation enables handling newer DB versions with "down instead of error-out" for development (perhaps a flag)
IDEA: migrations-table
- Store migrations in a table. This makes the schema more self-documenting.
- Possible schema: name, sql_up, sql_down, hash (computed from those fields plus previous migration hash)
- or just rowid instead of hash? Migration sequence should be immutable after publishing, so there should never be "conflicts"
TODO: language-server-for-TODO.txt
TODO: auto-migration-checker
- Use `pkg/schema` to test whether a base schema plus a migration equals a new schema
TODO: codegen `without rowid` tables properly
TODO: generated test file inclues global test DB setup, which is wrong