Skip to content

Latest commit

 

History

History
40 lines (27 loc) · 1.01 KB

DATABASE.md

File metadata and controls

40 lines (27 loc) · 1.01 KB

Database

dotnet tool update --global dotnet-ef

Setup Schema & Auth

CREATE ROLE workshop WITH
    SUPERUSER
    CREATEDB
    CREATEROLE
    INHERIT
    LOGIN
    NOREPLICATION
    NOBYPASSRLS
    CONNECTION LIMIT UNLIMITED;

CREATE DATABASE workshop OWNER workshop;

Migrations

dotnet ef migrations add MIGRATION_NAME --project src/AccountsApi/AccountsApi.csproj --context AccountsDbContext
dotnet ef database update --project src/AccountsApi/AccountsApi.csproj --context AccountsDbContext --connection "host=elevate.postgres.local;port=5705;database=workshop;username=workshop;password=workshop;keepalive=60;"

dotnet ef migrations add MIGRATION_NAME --project src/ContentApi/ContentApi.csproj --context ContentDbContext
dotnet ef database update --project src/ContentApi/ContentApi.csproj --context ContentDbContext --connection "host=elevate.postgres.local;port=5705;database=workshop;username=workshop;password=workshop;keepalive=60;"

Index

Back To Index