34 Commits

Author SHA1 Message Date
DMehaffy
b445ac2d35
enhancement(database): change schema hash from md5 to sha256 (#23116) 2025-05-21 13:32:43 +02:00
DMehaffy
76977370da
fix: optimize schema validation lookup for mysql/mariadb (#23331) 2025-04-10 06:53:05 -07:00
Ben Irvin
14fd433d38
fix(database): only drop indexes that exist; do not drop on create (#22633)
* fix(database): verify existance on drop but do not drop on create

* revert: keep mysql conditional
2025-01-14 16:44:14 +01:00
Ben Irvin
8f227a605a fix: name must be initialized 2024-12-17 14:51:17 +01:00
Ben Irvin
d4d5d39c55 Merge branch 'fix/db-sync-fk' of https://github.com/strapi/strapi into fix/db-sync-fk 2024-12-16 17:19:38 +01:00
Ben Irvin
d8be3e0366
Merge branch 'develop' into fix/db-sync-fk 2024-12-16 16:44:39 +01:00
Ben Irvin
575be3afd4
enhancement(database): add repair manager with component deletion fix (#22267) 2024-12-16 12:56:05 +01:00
Ben Irvin
f47bf90b3f chore: add header comment 2024-12-16 10:30:00 +01:00
Ben Irvin
cfda358b7f chore: refactor 2024-12-16 09:41:08 +01:00
Ben Irvin
6a649cd9b7 revert: reimplement fix for mysql fks 2024-12-16 09:40:09 +01:00
Ben Irvin
27465bf4d7 fix: check indexes before transaction 2024-12-13 18:33:47 +01:00
Ben Irvin
e350eaa607 chore: fix comment 2024-12-13 14:20:58 +01:00
Ben Irvin
4378a7852d fix(database): delete indexes before creating if they already exist 2024-12-13 14:03:45 +01:00
Ben Irvin
006a21d394
fix: ignore order when checking index diff (#21576) 2024-10-04 15:11:11 +02:00
Ben Irvin
e43238abaf
fix: drop and create columns and indexes in the correct order (#21402) 2024-09-24 12:52:57 +02:00
Ben Irvin
860584b10c
chore: fix mismatched prettier versions (#21071) 2024-08-26 15:03:45 +02:00
Alexandre Bodin
ab398552fe chore: update & add tests 2024-06-21 15:04:26 +02:00
Alexandre Bodin
cae1130e53 chore: only delete tables,columns,idx,fks we track 2024-06-21 10:34:13 +02:00
Ben Irvin
2264b66ec3
fix(database): drop foreign keys before dropping indexes 2024-05-02 19:18:31 +02:00
Josh
bc71a96d76
chore(pack-up): remove from monorepo (v5) (#20092)
* chore(pack-up): remove from repo

* chore: type fixes

* chore: add suggestions to tighten types

Co-authored-by: Ben Irvin <ben.irvin@strapi.io>

---------

Co-authored-by: Ben Irvin <ben.irvin@strapi.io>
2024-04-12 13:39:49 +01:00
Ben Irvin
fd7c075839
enhancement(database)!: shorten db identifies and add internal migration 2024-03-25 18:02:30 +01:00
Alexandre Bodin
a95285578b chore: database enhancements 2024-03-13 22:13:40 +01:00
Ben Irvin
6111d69ad8
chore(database): refactor database schema to use naming functions 2024-02-26 15:35:47 +01:00
Alexandre BODIN
0f312df726
chore: rename webhooks & allow custom joinColumn (#19344)
Co-authored-by: Marc Roig <marc12info@gmail.com>
2024-02-05 09:01:50 +01:00
Jamie Howard
1097504b36
[core] document unique field validation per content type and locale (#19153)
* feat: use document service in content manager

* feat: update contracts with meta information

* chore: group metadata types into a single type

* feat: metadata information in single types

* chore: change meta contract to return documents instead of strings

* fix: remove unused type

* fix: ignore doc id if entry is null

* fix: update contract metadata

* feat: document metadata service

* feat: locale and status filtering

* chore: add comment

* chore: refactor metadata service

* chore: refactor entity manager exists to handle single types

* feat: refactor single type controllers to use documents

* feat: get locale param from in cm endpoints

* Revert "feat: get locale param from in cm endpoints"

This reverts commit 856c38588b8f8521cadd85c8c933f42a36a2178a.

* feat: get locale param from cm endpoints

* Update packages/plugins/i18n/server/src/controllers/validate-locale-creation.ts

Co-authored-by: Ben Irvin <ben@innerdvations.com>

* fix: entity manager unit tests

* chore: unit test document metadata

* feat: prevent empty string locale filtering

* feat(core): document unique field validation per content type and locale

* feat(e2e): test document unique fields

* fix(admin): ts build

* fix: cm contract import

* chore: test new d&p cm features

* feat(core): validate document unique fields within one publication state

chore: remove build:ts

* fix: search content manager api test

* fix: cm tests

* fix: cm tests

* fix: cm tests

* fix(content-manager): access to non default locale documents (#19190)

* fix(content-manager): access to non default locale documents

* chore(content-manager): revert route construction

* fix(content-manager): api tests for number of draft relations

* test(content-manager): counting number of draft relations for non default locales

* chore(content-manager): remove default locale from entity manager countDraftRelations

* test(document-service): api tests for unique document fields per publication state

* test(i18n): api tests for unique document fields per locale

* chore(api-tests): adjust author schema

* chore(e2e): disable edit view tests (#19235)

* fix(core): unique validation on publish

* fix(api-tests): un-localise author

* fix(e2e): incorrect path

* fix(admin): tidy up

* fix(admin): pass correct locale query params

fix(core): pass locale outside of filters

* chore(api-tests): wip comment for relatedEntityId logic

* fix(core): entity validator tests

* chore(api-tests): wip skip failing relations i18n test

* chore(e2e): clean up editview spec

* fix(content-manager): pass locale to publish and unpublish

* fix(content-manager): fix test:ts:back

* fix(e2e): update edit view expected path

* fix(entity-validator): default to null locale

fix(api-tests): wip i18n test changes

* fix(e2e): wip UID fields

* chore(content-type-builder): temporarily disable component unique field checkboxes (#19253)

* fix(admin): wip correctly pass params

feat(e2e): reintroduce uniqueness e2e tests

* Refactor UID validation for V5 (#19285)

* fix(database): wip remove UID unique DB constraint

* feat(content-manager): update uid checking endpoints to look at locale

* chore(admin): clean up

* fix(content-manager): single type unit tests

* fix(content-manager): send all params to uid endpoints

* feat(e2e): update tar backup to support unique CT

* fix(e2e): uniqueness spec

* chore(e2e): remove only

* fix(content-manager): only check UID availability against drafts

feat(api-tests): test case for UID validation across locales

* fix(content-manager): uid unit tests

* chore(api-tests): clean up

* chore(content-manager): clean up

* chore(i18n): remove relatedEntityId reference

---------

Co-authored-by: Marc-Roig <marc12info@gmail.com>
Co-authored-by: Ben Irvin <ben@innerdvations.com>
Co-authored-by: Josh <37798644+joshuaellis@users.noreply.github.com>
2024-01-29 15:35:20 +00:00
Alexandre Bodin
f0c3683482 feat(database): add internal migrations 2023-10-24 17:18:59 +01:00
Alexandre Bodin
4f44013229 fix unit tests 2023-10-04 13:53:11 +02:00
Alexandre Bodin
5c48b9b07e Merge branch 'main' into chore/ts-database 2023-10-04 13:36:07 +02:00
Alexandre Bodin
2fa5adde62 Fix tests 2023-09-21 20:01:37 +02:00
Alexandre Bodin
e01234c008 Refactor types 2023-09-20 10:07:46 +02:00
Alexandre Bodin
bc8f81eee4 1st passe except query 2023-09-14 09:22:47 +02:00
Alexandre Bodin
c46760bcc4 Diff typings 2023-09-12 21:47:42 +02:00
Alexandre Bodin
d69975be24 Fix dialects 2023-09-12 16:26:42 +02:00
Alexandre Bodin
e26583147e Migrate database package to typescript 2023-09-12 13:29:00 +02:00