This repository has been archived by the owner on Dec 30, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix: mock logic * feat: add exception tips * chore: update docker compose * fix: node up path error * fix: migrations path * chore: change entity column simple-json to json * chore: add migration generate script * fix: import project data should be serialization * fix: apiTestHistory some field allow null
- Loading branch information
Showing
23 changed files
with
523 additions
and
438 deletions.
There are no files selected for viewing
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
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
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
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,22 @@ | ||
const { exec } = require('child_process'); | ||
|
||
const runMigrationGenerate = async function () { | ||
const npm_package_version = process.env.npm_package_version.replaceAll( | ||
'.', | ||
'_', | ||
); | ||
console.log('npm_package_version', npm_package_version); | ||
exec( | ||
`npx typeorm-ts-node-commonjs migration:generate ./src/migrations/update-table_${npm_package_version} -d ./src/config/data-source.ts`, | ||
(error, stdout, stderr) => { | ||
if (!error) { | ||
// 成功 | ||
console.log('更新成功', error); | ||
} else { | ||
// 失败 | ||
console.log('更新失败', error); | ||
} | ||
}, | ||
); | ||
}; | ||
runMigrationGenerate(); |
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
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
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
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 |
---|---|---|
@@ -1,20 +1,20 @@ | ||
import { Column, Entity, TableColumnOptions } from 'typeorm'; | ||
import { Column, Entity } from 'typeorm'; | ||
import { FictitiousBase } from './base.entity'; | ||
|
||
@Entity({ name: 'api_test_history' }) | ||
export class ApiTestHistory extends FictitiousBase { | ||
@Column({ default: 0 }) | ||
projectID: number; | ||
|
||
@Column() | ||
@Column({ nullable: true }) | ||
apiDataID: number; | ||
|
||
@Column({ type: 'simple-json' }) | ||
@Column({ type: 'json' }) | ||
general: string; | ||
|
||
@Column({ type: 'simple-json' }) | ||
@Column({ type: 'json' }) | ||
request: string; | ||
|
||
@Column({ type: 'simple-json' }) | ||
@Column({ type: 'json' }) | ||
response: string; | ||
} |
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
Oops, something went wrong.