Skip to content

cepro/simt-myenergy-db

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

61 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

myenergy-db

Supabase CI

Config, SQL, functions for the supabase database.

Scripts

  • db-up - start supabase local instance
  • db-down - stop supabase local instance
  • db-reset - run supa-reset
  • supa-up - start supabase local
  • supa-down - stop supabase local
  • supa-reset - run 'supabase db reset' to reset the db
  • supa-seed - seed data into supabase for local development
  • supa-diff-local - diff local supabase database for schema changes scripts
  • template-supa-migrations - substitute variables into supabase sqitch migration scripts

Migrations

A set of migration scripts is maintained for supabase.

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

> cp sqitch_secrets.conf.example sqitch_secrets.conf
> SQITCH_USER_CONFIG=sqitch_secrets.conf sqitch deploy --target timescale-<org>

NOTIFY/LISTEN

Example send an encrypted message:

select myenergy.notify_encrypted('topup_create', '{"amountPence":"100", "reference": "topup from gift", "source": "gift", "notes": "introduction period", "accountId": "d7dbaf27-e813-42e0-a9c1-f008577276b9"}', 'secretsecret');

About

Customer engagement and billing software for micro utilities

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •