etenlab / docs

Documentation over all projects in the ETEN Innovation Lab repos
MIT License
1 stars 0 forks source link

move models to model repo and publish new package to npm #212

Open michaelmarshall opened 1 year ago

michaelmarshall commented 1 year ago

We need to reuse the same models in multiple apps. Right now just crowd.Bible and cpg-server. Currently cpg-server has extra columns of tables that crowd.Bible does not have so we will just merge the two and accept the fact that crowd.Bible will have columns it doesn't need.

Move the models from crowd.Bible to the new models repo and publish to npm. Don't move the extra models from cpg-server that don't exist in crowd.Bible, those need to be refactored/deleted.

If a model/table from crowd.Bible exists in cpg-server, then make sure any cpg-server specific columns are added to the new models in the models repo.

Publist the models package to npm.

Update crowd.Bible and cpg-server to import the new npm package.

michaelmarshall commented 1 year ago

you'll need to create the npm package models. ask other devs how to do this if you haven't before. ask Michael for npm creds if you need them.

ForeverYoung1208 commented 1 year ago

Package 'models' is created. Some refactoring is needed to bring both crowd.Bible and cpg-server db structures to the same structure to be capable with 'models' package.

ForeverYoung1208 commented 1 year ago

michael220 ok. the goal is for models to be the authoritative code on the schema. all other uses need to be refactored. models needs to use the long versions of the ids which means any manual sql code written anywhere needs to be refactored