Skip to content
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

Create sequences before tables #5407

Merged
merged 1 commit into from
May 23, 2022
Merged

Conversation

jongotlin
Copy link
Contributor

@jongotlin jongotlin commented May 20, 2022

Q A
Type bug
Fixed issues

Summary

When generating the schema, sequences must be created before tables if the sequence is referenced in a column definition.

/**
 * @ORM\Column(name="id", options={"default":"nextval('my_table_id_seq'::regclass)"})
 */

Without this you will get the following error:

 SQLSTATE[42P01]: Undefined table: 7 ERROR:  relation "my_table_id_seq" does not exist

@derrabus
Copy link
Member

Can you please create a functional test that reproduces the issue you're attempting to solve?

@jongotlin
Copy link
Contributor Author

@derrabus, yes. Added a failing test but workflows are not running. Can you start them? Then I'll add the fix.

@derrabus
Copy link
Member

Done

@jongotlin
Copy link
Contributor Author

@derrabus Thank you. Please start again.

Nyholm
Nyholm previously approved these changes May 22, 2022
derrabus
derrabus previously approved these changes May 23, 2022
@derrabus derrabus dismissed stale reviews from Nyholm and themself via 8ba42c0 May 23, 2022 20:52
@derrabus derrabus merged commit 4c1926e into doctrine:3.3.x May 23, 2022
@derrabus
Copy link
Member

Thank you @jongotlin!

@morozov morozov added this to the 3.3.7 milestone Sep 29, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 30, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants