OpenCHAMI / bss

MIT License
1 stars 2 forks source link

Add bss-init to initialize Postgres DB #13

Closed synackd closed 5 months ago

synackd commented 5 months ago

Summary and Scope

Use the migration approach to database initialization. Similar to SMD's smd-init, add bss-init, which initializes a Postgres database using Golang's migrate library. Convert the PostgreSQL queries that were originally in the boot-script-services binary to be migrations used by bss-init.

Issues and Related PRs

Testing

Tested on:

alexlovelltroy commented 5 months ago

I don't see any changes to the .goreleaser.yaml file or the .github/workflows/actions. Those need to be updated in order for this work to get automatically built and released. If you're not comfortable doing that in this PR, I can open a fresh one to take care of it once this merges.

@synackd what do you think?

synackd commented 5 months ago

I don't see any changes to the .goreleaser.yaml file or the .github/workflows/actions. Those need to be updated in order for this work to get automatically built and released. If you're not comfortable doing that in this PR, I can open a fresh one to take care of it once this merges.

@synackd what do you think?

Ah, I missed that! Thank you for pointing that out. Updated in 3bffbae.

synackd commented 5 months ago

@alexlovelltroy I realized that I didn't edit the .github/workflow files, which I did in above most recent commits. Can you check these changes?

alexlovelltroy commented 5 months ago

Running goreleaser locally, I discovered that you're missing migrations in the extra_files section under dockers. I fixed it locally which made it run. Here's the change you need:

      - LICENSE
      - CHANGELOG.md
      - README.md
      - .version
      - migrations/
synackd commented 5 months ago

Added in c39fb13.