ManSangSin / Rhythm-Code

https://starter-kit-al84.onrender.com/
ISC License
3 stars 7 forks source link

Seed rhythm data on deploy/rebase #3

Closed gregdyke closed 9 months ago

gregdyke commented 9 months ago

Technical task

This ensures that the project is always deployed fresh, with up to date DDL and only seeded data.

Additionally, when a commit changes the DDL, locally this gets reset

Acceptance Criteria

  1. Given _
    • When the project is deployed
    • Then a database is created/reset
    • And it is seeded with the data (DDL and DML) above
  2. Given a seeding file exists
    • And I, as a developer, rebase onto main
    • When npm [fill in here] is executed
    • Then my database is created/reset
    • And it is seeded with the data from the seeding file

Implementation Notes

1. 2.

Checklist:

mferryRV commented 9 months ago

Background

DDL & DML

Environments:

Infrastructure as Code: databases are created and recreated automatically based on pre-written code (easy to recover from deletion)

Tasks

3 hours, 3 hours, 3 hours, 1 hour, 1 hour, 3 hours, 20 minutes, 1 hour, 3 hours, unknown - 18+ hours

Not necessarily one week of work, aim to do the local development this week and deployment during next week's CYF Saturday

mferryRV commented 9 months ago

@ManSangSin - does our current solution reseed the production database on deployment?

ManSangSin commented 9 months ago

@mferryRV - it does not at the moment. I do have some code which I have tested last night on a separate repo (as I needed to push some random test commits and also test the building and deployment process on render) and it seems to be reseeding the production database properly after building and before deployment of the project on render. I'll submit a PR with the code today.