-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3362 from energywebfoundation/fix-importing-irec-…
…device fix(origin-device-registry-irec-local-api): fix importing irec device
- Loading branch information
Showing
2 changed files
with
19 additions
and
2 deletions.
There are no files selected for viewing
17 changes: 17 additions & 0 deletions
17
...n-device-registry-irec-local-api/migrations/1658754779650-OptionalDeviceDefaultAccount.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { MigrationInterface, QueryRunner } from 'typeorm'; | ||
|
||
export class OptionalDeviceDefaultAccount1658754779650 implements MigrationInterface { | ||
name = 'OptionalDeviceDefaultAccount1658754779650'; | ||
|
||
public async up(queryRunner: QueryRunner): Promise<void> { | ||
await queryRunner.query( | ||
`ALTER TABLE "irec_device_registry_device" ALTER COLUMN "defaultAccount" DROP NOT NULL` | ||
); | ||
} | ||
|
||
public async down(queryRunner: QueryRunner): Promise<void> { | ||
await queryRunner.query( | ||
`ALTER TABLE "irec_device_registry_device" ALTER COLUMN "defaultAccount" SET NOT NULL` | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters