mirror of
https://github.com/directus/directus.git
synced 2026-01-28 11:38:11 -05:00
0ce2ef244dbddea8748dec94de018f7abfd8a474
2 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
89fcb19a16 |
Expose schema endpoints (#14713)
* Expose schema endpoints * respond with 204 * fix payload for export flag * allow export as YAML * use SchemaService * move getStringFromStream to utils * clearer exceptions with logs * check empty request body * specs * add bypassCache flag and remove flushCaches calls * Identify integer typed fields in Oracle * Fix uuid foreign keys type for Oracle * Detect autoincrement for CockroachDB * Bypass cache for fields and relations services * Add same DB tests * Test if working for all vendors * Add schema snapshot testing into sequential flow * Fix schema re-apply attempts when it's a different database vendor (#14816) * prevent diffing on certain properties * fix apply-snapshot test * prevent updates to autoincrement fields' schema * sanitize relations * remove `colleciton.schema.sql` parsing in test It is now being sanitized by `sanitizeCollection()` function in get-snapshot-diff.ts * Change concurrency group to not cancel test running on main * remove multipart for apply & add hash checking * check incoming version & add force query param * refine error message & stub for nested hash * add `vendor` top-level property as an additional safety net for cross db vendor applies * sanitize generated schema snapshots * snapshot joi validation * diff joi validation * minor cleanup * extract applyDiff & use deep-diff applyChange * use applyDiff in schema service * Mark vendor as optional * Update tests to apply diffs * move force flag check into service * Patch mssql vendor typo * Set relation no action in cyclic relations * Update mysql timestamp default value * Oracle cannot define no action * Update oracle timestamp type default values * add hash checking for outdated diffs * fix diff service & endpoint * Add hashes when returning after * Fix self referencing relations for Oracle * Add temp fix for CURRENT_TIMESTAMP defaults in Oracle * clean up driver and database client types * only require diff hash if not kind N * update hash comparison logic for create/delete * Set no action constraint for self referencing M2M in MSSQL * Add basic hash check tests * omit default value when hashing auto increments Specifically for CockroachDB with differing sequences * add vendor check * update specs * Validate vendors with type definition * Spread the vendors input array * re-add Export component * re-add js-yaml to root * Propagate mutation options for schema apply * Verify that snapshots differ and clear cache before hash tests * Fix unit test * Revert temp fix for CURRENT_TIMESTAMP defaults in Oracle * Define and reuse type for export format * Define and reuse list of database clients * change `were` to `was` * change `where` to `were` * add some empty lines for readability * tweak exception message * fix test * use object-hash * use boolean to check whether file is included * simplify request content type check * throw error when multiple files were uploaded * use nullish coalesce instead of short circuit * Update api/src/services/schema.ts Co-authored-by: Rijk van Zanten <rijkvanzanten@me.com> * Remove unnecessary `Omit` on `SnapshotWithHash` type * Revert "Remove unnecessary `Omit` on `SnapshotWithHash` type" This reverts commit |
||
|
|
8d1966ab04 |
Blackbox testing (#13200)
* Add black box tests * Revert docker compose file * Update workflow * Try use workflow from dev repo * Increase seedDB() timeout * Disable other checks for now * Change DB sequence * Update jest moduleNameMapper * Update workflow's docker-compose.yml path * Slice array first * Remove differentiation of status code * Delete field only after foreign key constraints are removed * Add checks for different types of primary key * Test global query filter for all field types * Increase timeout for m2o seeding * Add case insensitive string operators * Update filter check to run on relational fields * Enable time field checks * Add seeded random and fix relational seeding * Add casting for integer and bigInteger * Minor fixes * Reduce bigInt values * Separate seeding of DB structure from values * Add primaryKey seeding function * Use automatic IDs except for string pk * Try fix ci * Update package-lock.json * Update common.test for concealed user tokens * Use dynamic field type for m2o.test relational fields * Temporary disable missing nicontains for string type * Add support for alias type filtering * Fix relational filter operator checks * Add initial o2m test * Remove integer pk limit * Add empty checks for string and uuid null * Limit generated integer value to 4 bytes * Patch timezone tests for MSSQL * Remove sample query filter test * Fix timezone test for sqlite * Fix MSSQL uuids * Fix MSSQL timestamp inaccuracy * Cast datetime schema to milliseconds for comparison * Fix MySQL / Maria timestamp inaccuracy * Fix MySQL / Maria between operator inconsistency for float type * Fix missing time datatype in Oracle * Skip filter testing on Oracle * Enable o2m filter tests for other collections * Run tests only on SQLite for PRs unless the Full Tests label exists * Try fix actions * Refactor github actions * Update tests flow setup to use getURL() * Start postgres docker * Reinstate package-lock * Fix geometry test * Remove .gitkeep files * Add todo.md * Rename black box to blackbox Co-authored-by: rijkvanzanten <rijkvanzanten@me.com> |