Skip to content

seed.js uses deprecated data schema #42

@narjoDev

Description

@narjoDev

Currently, seed.js implements its own data insertion logic, rather than importing from mongo.js and pg.js. This logic was not updated when our document schema was modified (#30) to store a raw string in json_string, remove size_bytes and add basketName.

Consequently, the seed script currently creates data that does not align with our current implicit document schema.

I am wondering if there is any advantage to having seed.js duplicating this logic (build a document object and invoke the mongodb package in the same way that mongo.js does), or if it could import the existing function storeRequest from mongo.js. The same question applies to the PostgreSQL queries.

It seems like this duplication makes it harder to maintain the validity of both the core database files (mongo.js, pg.js) and seed.js.

My preference would be to switch seed.js over to importing existing functions in the core database files to the extent possible.

Metadata

Metadata

Assignees

No one assigned

    Labels

    invalidThis doesn't seem rightquestionFurther information is requested

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions