-
Notifications
You must be signed in to change notification settings - Fork 34
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
chore(seeder): add advanced (sub)decision seeders #1913
Draft
tomudding
wants to merge
1
commit into
GEWIS:main
Choose a base branch
from
tomudding:chore/data-fixtures-for-seeding-the-database
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
chore(seeder): add advanced (sub)decision seeders #1913
tomudding
wants to merge
1
commit into
GEWIS:main
from
tomudding:chore/data-fixtures-for-seeding-the-database
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tomudding
force-pushed
the
chore/data-fixtures-for-seeding-the-database
branch
2 times, most recently
from
October 23, 2024 23:36
0bc1dea
to
e422c99
Compare
tomudding
force-pushed
the
chore/data-fixtures-for-seeding-the-database
branch
4 times, most recently
from
November 13, 2024 16:25
5e32723
to
3666363
Compare
tomudding
added a commit
to tomudding/gewisweb
that referenced
this pull request
Nov 13, 2024
The data fixtures can be loaded into the database using the `application:fixtures:load` command. All existing records are `TRUNCATE`d from the database to ensure a clean start. This also fixes some inconsistencies in the (sub)decision model with GEWISDB, somehow the possibility for these to be `null` got lost somewhere (and fixes for initialisation of `Collection`s). --- Unfortunately, adding the data fixtures for (sub)decisions has proved to be quite difficult. As such, these have been removed. The WIP can be found in GEWIS#1913. There is an issue with the "hydration" of the entities when they are added to the database. I have not seen this issue in GEWISDB, but the cause appears to be the usage of `BackedEnum`s as part of a composite key (which forms the foundation for our (sub)decision entities and relations). Either the enum cannot be cast to string while being saved to the database. Or when using custom mapping types (see the PR mentioned) above the value cannot be properly restored from the database. The latter can then also be fixed with another patch for ORM (see GEWIS/orm@8031547), however, this may break other things. This patch can probably also be applied in reverse, such that we do not need the custom mapping types. However, this has not (yet) been tested. As such, this has to be investigated more and potentially a bug report must be submitted to Doctrine ORM to get this fixed.
5 tasks
This will become a follow-up to GH-1918. |
tomudding
force-pushed
the
chore/data-fixtures-for-seeding-the-database
branch
from
November 13, 2024 19:54
3666363
to
6fcbcca
Compare
tomudding
changed the title
chore(seeder): add seeders
chore(seeder): add advanced (sub)decision seeders
Nov 13, 2024
5 tasks
Utilises a custom mapping type to try to circumvent a potential ORM bug. However, this still requires a patch to ORM to fix the reverse of that issue.
tomudding
force-pushed
the
chore/data-fixtures-for-seeding-the-database
branch
from
November 18, 2024 12:37
6fcbcca
to
ca01eeb
Compare
tomudding
added a commit
to tomudding/gewisdb
that referenced
this pull request
Nov 20, 2024
The data fixtures can be loaded into the database using the `application:fixtures:load` command. All existing records are `TRUNCATE`d from the database to ensure a clean start. --- Unfortunately, adding the data fixtures for (sub)decisions has proved to be quite difficult. As such, these have been removed. The WIP can be found in GEWIS/gewisweb#1913. There is an issue with the "hydration" of the entities when they are added to the database. I have not seen this issue in GEWISDB, but the cause appears to be the usage of `BackedEnum`s as part of a composite key (which forms the foundation for our (sub)decision entities and relations). Either the enum cannot be cast to string while being saved to the database. Or when using custom mapping types (see the PR mentioned) above the value cannot be properly restored from the database. The latter can then also be fixed with another patch for ORM (see GEWIS/orm@8031547), however, this may break other things. This patch can probably also be applied in reverse, such that we do not need the custom mapping types. However, this has not (yet) been tested. As such, this has to be investigated more and potentially a bug report must be submitted to Doctrine ORM to get this fixed.
5 tasks
tomudding
added a commit
to tomudding/gewisdb
that referenced
this pull request
Nov 20, 2024
The data fixtures can be loaded into the database using the `application:fixtures:load` command. All existing records are `TRUNCATE`d from the database to ensure a clean start. --- Unfortunately, adding the data fixtures for (sub)decisions has proved to be quite difficult. As such, these have been removed. The WIP can be found in GEWIS/gewisweb#1913. There is an issue with the "hydration" of the entities when they are added to the database. I have not seen this issue in GEWISDB, but the cause appears to be the usage of `BackedEnum`s as part of a composite key (which forms the foundation for our (sub)decision entities and relations). Either the enum cannot be cast to string while being saved to the database. Or when using custom mapping types (see the PR mentioned) above the value cannot be properly restored from the database. The latter can then also be fixed with another patch for ORM (see GEWIS/orm@8031547), however, this may break other things. This patch can probably also be applied in reverse, such that we do not need the custom mapping types. However, this has not (yet) been tested. As such, this has to be investigated more and potentially a bug report must be submitted to Doctrine ORM to get this fixed.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
A replacement for the old and never updated gewisweb-test-data package.
Types of changes