Skip to content

Commit

Permalink
Merge pull request #10 from Nabute/feature/ci-pipeline
Browse files Browse the repository at this point in the history
feat: made db transaction atomic for major cases
  • Loading branch information
Nabute authored Aug 24, 2024
2 parents f8103af + 44abca6 commit fb7c4a7
Show file tree
Hide file tree
Showing 32 changed files with 1,034 additions and 898 deletions.
7 changes: 6 additions & 1 deletion app/db/data-source.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
import { DataSource, DataSourceOptions } from 'typeorm';
import { ConfigService } from '@nestjs/config';
import * as dotenv from 'dotenv';

// Load .env file manually
dotenv.config();

const config = new ConfigService();

Expand All @@ -9,10 +13,11 @@ export const dataSrouceOptions: DataSourceOptions = {
host: config.get('DB_HOST'),
port: parseInt(config.get('DB_PORT') as string),
username: config.get('DB_USER'),
password: config.get('DB_PASSWORD') as string,
password: config.get('DB_PASSWORD'),
entities: ['dist/**/*.entity.js'],
migrations: ['dist/db/migrations/*.js'],
};

const dataSource = new DataSource(dataSrouceOptions);

export default dataSource;
54 changes: 0 additions & 54 deletions app/db/migrations/1724278857374-initial_table.ts

This file was deleted.

76 changes: 0 additions & 76 deletions app/db/migrations/1724285282196-initial_table.ts

This file was deleted.

16 changes: 0 additions & 16 deletions app/db/migrations/1724317920258-user_account.ts

This file was deleted.

Loading

0 comments on commit fb7c4a7

Please sign in to comment.