Skip to content

cepro/simt-flows-db

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

flows-db

DB CI

Config, SQL, functions for the flows database.

Scripts

  • db-up - start flows timescaledb local
  • db-down - stop flows timescaledb local
  • db-reset - run ts-reset
  • ts-up - start timescaledb local
  • ts-down - stop timescaledb local
  • ts-reset - run 'sqitch revert' and 'sqitch deploy' to reset the db
  • flows-diff-local - diff local flows database for schema changes
  • template-flows-migrations - substitute variables into flows sqitch migration scripts

Migrations

A set of migration scripts is maintained.

Sqitch is used to manage migrations include applying deployments and rollbacks.

Run migrations

# setup secrets - edit this file with new passwords
sqitch> cp sqitch_secrets.conf.example sqitch_secrets.conf

# run the migrations - add your timescale-<org> connection details to sqitch.conf
SQITCH_USER_CONFIG=sqitch_secrets.conf sqitch deploy --target timescale-<org>

Generate Migration from Diff

see bin/flows-diff-local which will generate a SQL diff between the currently running local database and a database at the state of the migration files.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •