zenstack/packages/cli/test/db
Román Benjámin d9cdd9c8bc
fix(introspection): preserve data validation attributes, enum ordering, and comments during db pull (#672)
* fix(introspection): preserve schema integrity during db pull

- Retain data validation attributes (e.g., @email) on fields after
  introspection (#670)
- Preserve original declaration order of enums instead of moving them
  to the end of the schema file (#669)
- Preserve triple-slash comments above enum declarations (#669)

Fixes #669, fixes #670

* fix: address PR comments

* fix(cli): improve db pull for relations and defaults

Prevents field name collisions during introspection by refining the naming strategy for self-referencing relations with multiple foreign keys.

Extends support for JSON and Bytes default values across MySQL, PostgreSQL, and SQLite providers to ensure consistent schema restoration.

Adds test cases for self-referencing models to verify the avoidance of duplicate fields.

* fix: address PR comments
2026-02-10 15:57:49 +08:00
..
pull.test.ts fix(introspection): preserve data validation attributes, enum ordering, and comments during db pull (#672) 2026-02-10 15:57:49 +08:00
push.test.ts feat: db pull implementation (#268) 2026-02-08 10:02:26 +08:00