Skip to content

Commit

Permalink
Remove engine database
Browse files Browse the repository at this point in the history
  • Loading branch information
wcalderipe committed Feb 16, 2024
1 parent 7e0d5cf commit 9ab111a
Show file tree
Hide file tree
Showing 10 changed files with 1 addition and 348 deletions.
34 changes: 0 additions & 34 deletions apps/authz/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ authz/start/dev:
authz/setup:
make authz/copy-default-env
make authz/rego/compile
make authz/db/setup
make authz/test/db/setup

authz/copy-default-env:
cp ${AUTHZ_PROJECT_DIR}/.env.default ${AUTHZ_PROJECT_DIR}/.env
Expand All @@ -33,41 +31,9 @@ authz/format/check:
authz/lint/check:
npx nx lint ${AUTHZ_PROJECT_NAME}

# === Database ===

authz/db/generate-types:
npx prisma generate \
--schema ${AUTHZ_DATABASE_SCHEMA}

authz/db/migrate:
npx dotenv -e ${AUTHZ_PROJECT_DIR}/.env -- \
prisma migrate dev \
--schema ${AUTHZ_DATABASE_SCHEMA}

authz/db/setup:
@echo ""
@echo "${TERM_GREEN}🛠️ Setting up Authz development database${TERM_NO_COLOR}"
@echo ""
npx dotenv -e ${AUTHZ_PROJECT_DIR}/.env -- \
prisma migrate reset \
--schema ${AUTHZ_DATABASE_SCHEMA} \
--force

@echo ""
@echo "${TERM_GREEN}🛠️ Setting up Authz test database${TERM_NO_COLOR}"
@echo ""
make authz/test/db/setup

authz/db/create-migration:
npx dotenv -e ${AUTHZ_PROJECT_DIR}/.env -- \
prisma migrate dev \
--schema ${AUTHZ_DATABASE_SCHEMA} \
--name ${NAME}

# === Testing ===

authz/test/type:
make authz/db/generate-types
npx tsc \
--project ${AUTHZ_PROJECT_DIR}/tsconfig.app.json \
--noEmit
Expand Down
4 changes: 1 addition & 3 deletions apps/authz/src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { HttpModule } from '@nestjs/axios'
import { Module, ValidationPipe } from '@nestjs/common'
import { ConfigModule } from '@nestjs/config'
import { APP_PIPE } from '@nestjs/core'
import { PersistenceModule } from '../shared/module/persistence/persistence.module'
import { load } from './app.config'
import { AppController } from './app.controller'
import { AppService } from './app.service'
Expand All @@ -17,8 +16,7 @@ import { EntityRepository } from './persistence/repository/entity.repository'
load: [load],
isGlobal: true
}),
HttpModule,
PersistenceModule
HttpModule
],
controllers: [AppController, AdminController],
providers: [
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

98 changes: 0 additions & 98 deletions apps/authz/src/shared/module/persistence/schema/schema.prisma

This file was deleted.

This file was deleted.

54 changes: 0 additions & 54 deletions apps/authz/src/shared/module/persistence/service/prisma.service.ts

This file was deleted.

This file was deleted.

0 comments on commit 9ab111a

Please sign in to comment.