You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I'm currently in the progress of upgrading to directus 11 and directus-sync 3. In our setup we use directus on top of an existing database, so directus is not primarily responsible for creating the schema, but we run directus-sync with the schema anyway to ensure we don't accidentally configure some schema changes. So far this has worked great.
But there is a problem since the upgrade: In the CI directus is started on an empty database, then an external script runs to add the schema and then directus-sync runs.
In this situation we now get an error Failed to create relation "x.y". The table x is not configured in directus at all. Until the upgrade this worked fine.
To Reproduce
Steps to reproduce the behavior:
Create a schema with relations which are not configured in directus.
Run npx directus-sync pull.
The relations are part of the dump.
Create a completely new database.
Start directus with this new database.
Import the schema without directus-sync.
Run npx directus-sync push.
Expected behavior
No errors. With directus-sync 2.2/directus 10 this worked fine.
Versions (please complete the following information):
Directus-Sync version: [3.1.6]
Directus version: [11.3.3]
Directus environment [Docker]
Additional context
The issue does not occur locally, where usually directus is started after the schema was created. I assume this is an issue with some missing caching or parsing that occurs in directus on startup.
I assume this issue could be fixed by restarting the directus container after schema creation but that is unfortunately not possible in the CI.
If this is not something you feel should be fixed, I would appreciate it if you could tell me if there is an endpoint or sdk-call we could make that has the same effect. (Assuming this is something you removed because it is generally not necessary).
The text was updated successfully, but these errors were encountered:
Describe the bug
I'm currently in the progress of upgrading to directus 11 and directus-sync 3. In our setup we use directus on top of an existing database, so directus is not primarily responsible for creating the schema, but we run directus-sync with the schema anyway to ensure we don't accidentally configure some schema changes. So far this has worked great.
But there is a problem since the upgrade: In the CI directus is started on an empty database, then an external script runs to add the schema and then directus-sync runs.
In this situation we now get an error
Failed to create relation "x.y"
. The tablex
is not configured in directus at all. Until the upgrade this worked fine.To Reproduce
Steps to reproduce the behavior:
npx directus-sync pull
.npx directus-sync push
.Expected behavior
No errors. With directus-sync 2.2/directus 10 this worked fine.
Versions (please complete the following information):
3.1.6
]11.3.3
]Additional context
The issue does not occur locally, where usually directus is started after the schema was created. I assume this is an issue with some missing caching or parsing that occurs in directus on startup.
I assume this issue could be fixed by restarting the directus container after schema creation but that is unfortunately not possible in the CI.
If this is not something you feel should be fixed, I would appreciate it if you could tell me if there is an endpoint or sdk-call we could make that has the same effect. (Assuming this is something you removed because it is generally not necessary).
The text was updated successfully, but these errors were encountered: