finamaze_schema 1.9.0 → 1.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "finamaze_schema",
3
- "version": "1.9.0",
3
+ "version": "1.10.0",
4
4
  "description": "A package to connect two APIs with a single SQL database using TypeORM",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -1,6 +1,7 @@
1
- import { Entity, Column, PrimaryGeneratedColumn, CreateDateColumn, UpdateDateColumn } from 'typeorm';
1
+ import { Entity, Column, PrimaryGeneratedColumn, CreateDateColumn, UpdateDateColumn, Unique } from 'typeorm';
2
2
 
3
3
  @Entity()
4
+ @Unique(['username'])
4
5
  export class User {
5
6
  @PrimaryGeneratedColumn()
6
7
  id: number;
@@ -0,0 +1,16 @@
1
+ import { MigrationInterface, QueryRunner } from "typeorm";
2
+
3
+ export class RemoveField1726583726472 implements MigrationInterface {
4
+
5
+ public async up(queryRunner: QueryRunner): Promise<void> {
6
+ // update data Type of the column is_username_set to NUMBER
7
+ await queryRunner.query(`
8
+ ALTER TABLE "user" DROP COLUMN "is_username_set"
9
+ `);
10
+
11
+ }
12
+
13
+ public async down(queryRunner: QueryRunner): Promise<void> {
14
+ }
15
+
16
+ }