Commit Graph

7 Commits

Author SHA1 Message Date
Alberto Arena 42e2bcf5e9 test: add round-trip tests and CI workflow
Add the Phase 4 import -> render -> import round-trip: for each of the six
dialects, parse a CREATE TABLE + foreign key schema into a model, render it
back to DDL, parse the rendered DDL again, and assert the two models are
equal. Comparison is on a normalized model (table and column names, resolved
type names, key/constraint flags, relationships), not raw SQL, since
formatting and identifier quoting legitimately differ. A small in-memory
adapter assembles the DatabaseType the renderer consumes from the importer
output, which the app normally reconstructs via the database.

Primary keys are canonicalized to non-nullable in the comparison: SQL Server
emits its primary key as a table-level constraint and the importer only
forces NOT NULL for inline primary keys, so the flag would otherwise differ
on the round trip although the schemas are equivalent.

Add a GitHub Actions workflow running npm ci + npm test on pushes to main
and on pull requests. Typecheck and lint are intentionally left out for now:
the current codebase does not pass a strict project typecheck or a clean
lint, so gating on them would fail CI on pre-existing, unrelated issues.
2026-08-05 08:13:50 +02:00
Tamani Karim 596a8d2728 Create pull_request_template.md 2025-08-15 18:51:50 +01:00
Tamani Karim 5381579dfe Delete .github/ISSUE_TEMPLATE/pull_request_template.md 2025-08-15 18:51:08 +01:00
Tamani Karim c6c0377fb4 Create pull_request_template.md 2025-08-15 18:48:44 +01:00
Tamani Karim 3994701811 Update issue templates 2025-08-15 18:38:46 +01:00
Tamani Karim 3cb69c846b Update issue templates 2025-08-15 18:37:53 +01:00
Tamani Karim aba3e76e34 Update issue templates 2025-08-15 18:36:39 +01:00