mirror of
https://github.com/OneUptime/oneuptime.git
synced 2026-04-06 00:32:12 +02:00
chore: Add migration for new SchemaMigrations
This commit adds a new migration file, MigrationName1719915433542, to the SchemaMigrations directory. The migration is necessary to update the database schema and ensure compatibility with the latest changes in the codebase.
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||
|
||||
export class MigrationName1719915433542 implements MigrationInterface {
|
||||
public name = "MigrationName1719915433542";
|
||||
|
||||
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "Monitor" ADD "isNoProbeEnabledOnThisMonitor" boolean DEFAULT false`,
|
||||
);
|
||||
}
|
||||
|
||||
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(
|
||||
`ALTER TABLE "Monitor" DROP COLUMN "isNoProbeEnabledOnThisMonitor"`,
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -22,6 +22,7 @@ import { MigrationName1719348009053 } from "./1719348009053-MigrationName";
|
||||
import { MigrationName1719827175832 } from "./1719827175832-MigrationName";
|
||||
import { MigrationName1719831213463 } from "./1719831213463-MigrationName";
|
||||
import { MigrationName1719838746775 } from "./1719838746775-MigrationName";
|
||||
import { MigrationName1719915433542 } from "./1719915433542-MigrationName";
|
||||
|
||||
export default [
|
||||
InitialMigration,
|
||||
@@ -48,4 +49,5 @@ export default [
|
||||
MigrationName1719827175832,
|
||||
MigrationName1719831213463,
|
||||
MigrationName1719838746775,
|
||||
MigrationName1719915433542,
|
||||
];
|
||||
|
||||
@@ -947,4 +947,28 @@ export default class Monitor extends BaseModel {
|
||||
default: false,
|
||||
})
|
||||
public isAllProbesDisconnectedFromThisMonitor?: boolean = undefined;
|
||||
|
||||
@ColumnAccessControl({
|
||||
create: [],
|
||||
read: [
|
||||
Permission.ProjectOwner,
|
||||
Permission.ProjectAdmin,
|
||||
Permission.ProjectMember,
|
||||
Permission.ReadProjectMonitor,
|
||||
],
|
||||
update: [],
|
||||
})
|
||||
@TableColumn({
|
||||
type: TableColumnType.Boolean,
|
||||
required: false,
|
||||
title: "No Probe Enabled On This Monitor",
|
||||
description:
|
||||
"No Probe Enabled On This Monitor. Is this monitor not being monitored?",
|
||||
})
|
||||
@Column({
|
||||
type: ColumnType.Boolean,
|
||||
nullable: true,
|
||||
default: false,
|
||||
})
|
||||
public isNoProbeEnabledOnThisMonitor?: boolean = undefined;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user