-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
postgresql: Schema's Comparator does not compare default schema as equal when used implicitly/explicitly #5692
Comments
@allan-simon in the future, please use some other place for your personal notes and reminders. |
@allan-simon how much time do you need to provide the details? |
sorry I do that tonight Edit: on it Unordered notes: so it seems that on a high level happens for the same root i.e because the DiffGenerator use a fromSchema and a toSchema , one from the metadata , one from the actual database and they are not able to handle the fact that the schema in the so for example in 441 the issue is that
=> when Comparator the two it thinks a schema needs to be drop in the up migration (but dbal does not generate any SQL for drop of SQL schema , so nothing is generated ) , and do a create in the down migration for 1196 I still need to dig , but it's certainly that the Schema getting information from the database get the information without schema (as it's the one in the default search_path) while the Schema getting information metadata get the table with the full name |
at least compared to #5609 , I now agree that it's not about |
@allan-simon I don't know how to use the information you provided to proceed. Please express your problem in a format like "When I do X, I expect Y to happen but instead Z happens". X, Y and Z should be expressed in terms of the DBAL API. |
so basically if we go a level higher we have the following issue (which is related to doctrine/migrations#1196 ) admitting you have
if you call
it returns if you now change to
you will get
in term of DBAL's API it means that the issue is that 2 Doctrine\DBAL\Schema\Table (or any other AbstractAsset actually) :
will compare as being different so the question i'm trying to wrap my head around is that is this the responsability of dbal's or is it the responsability of the SchemaManager (or those filling it , from metadata / checking the actual database ) to always fill it with the actual value ? |
Bug Report
DBAL's Comparator is not able for postgresql to handle schema being in the
search_path
In postgresql the default schema can be either used explicitly
CREATE TABLE public.dummy
or implicitlyCREATE TABLE dummy
(more to come)
Summary
Current behaviour
How to reproduce
Expected behaviour
The text was updated successfully, but these errors were encountered: