10.0.0 • Published 5 months ago
@steveojs/storage-postgres v10.0.0
Overview
This is a Postgres implementation of the Steveo abstract storage interface.
It uses Prisma to manage database access and schema migrations.
Local development notes
For local development the database URLs will use the following:
postgresql://steveo@localhost:5432/steveo_developmentUsed in development application executionpostgresql://steveo@localhost:5432/steveo_testingUsed in unit test execution
Push migrations locally for development (initialises _prisma_migrations table for development etc):
DATABASE_URL=... npx prisma migrate devCreate a new migration once changes have been made to the prisma/schema.prisma file:
DATABASE_URL=... npx prisma migrate dev --name "<NEW_MIGRATION_NAME>"Reset the database and replay all migrations (DESTRUCTIVE):
DATABASE_URL=... npx prisma migrate resetStaging & production notes
Deploy pending migrations to a non-development environment (does not generate scripts, only applies pending migrations):
DATABASE_URL=... npx prisma migrate deploy