mirror of
https://github.com/stackrender/stackrender.git
synced 2026-09-10 11:15:42 +00:00
91fe5d6cf2
Cover getRenderer().renderDDL across MySQL, MariaDB, PostgreSQL, SQLite, Oracle and SQL Server. A shared DatabaseType fixture (users + posts with a primary key, auto-increment, NOT NULL UNIQUE column with a length, DEFAULT and a posts to users foreign key) is rendered per dialect, asserting the emitted DDL creates both tables and columns and carries the primary key, unique constraint, dialect-specific auto-increment spelling (AUTO_INCREMENT, SERIAL, AUTOINCREMENT, IDENTITY), variable-length text type, DEFAULT value and the foreign key with ON DELETE CASCADE. The fixture is built from the seed data types so field type ids hydrate the way the app hydrates them, and embeds relationship source/target objects because the SQLite renderer orders tables from the raw database before the migration step re-hydrates. Assertions match quote-agnostic patterns rather than exact strings, since identifier quoting and formatting differ by dialect.