cisagov / crossfeed

External monitoring for organization assets
https://docs.crossfeed.cyber.dhs.gov
Creative Commons Zero v1.0 Universal
372 stars 54 forks source link

Modify syncdb to allow for the population of structured content #1851

Open mbachtell-nais opened 1 year ago

mbachtell-nais commented 1 year ago

💡 Summary

Rather than providing just random data allow for the creation of structured parent-child relationships.

Motivation and context

Will reflect real world use case scenarios rather than single entry examples.

Implementation notes

Can provide real world examples State > Idaho > Elmore County or synthetic examples State > Confusion > Clarity County > Terrasite Town

Acceptance criteria

When there is the ability to run npm run syncdb -- -d populateStructured and it provides structured sample entries to the database

mbachtell-nais commented 1 year ago

Have a partially working solution. syncdb populates with half of the number chosen to generate with parents.

Problem is those without parents should show up as the default organizations but they aren't doing that at the moment.

mbachtell-nais commented 1 year ago

This appears to be related to NULL not being inserted in to the database correctly. A query of SELECT * FROM organization WHERE 'organization.parentId' IS NULL; should yield those with no parents but isn't working.

epicfaace commented 1 year ago

@mbachtell-nais what's the status of this issue at the moment?