1.0.11 • Published 1 year ago

@watchnest/pg-controller v1.0.11

Weekly downloads
-
License
-
Repository
-
Last release
1 year ago

Database Migrations

This project uses TypeORM for managing database migrations. Follow the steps below to generate and run migrations.

Prerequisites

  • Ensure you have TypeScript installed.
  • Ensure your TypeORM configuration is correctly set up.

Build the Project

Before running migrations, compile the TypeScript files to JavaScript:

npm run build

Generating a Migration

To generate a new migration, use the typeorm CLI. This example demonstrates adding a new column isAdmin to the users table:

npx typeorm migration:generate -d ./dist/data-source ./src/migration/CreateUserTable

Running Migrations

To apply the generated migrations to the database, run the following command:

npx typeorm migration:run -d ./dist/data-source.js
1.0.11

1 year ago

1.0.10

1 year ago

1.0.9

1 year ago

1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago