-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: track historical power events (#165)
* feat: track historical power events * change newPowerStatus field to newPowerState
- Loading branch information
1 parent
8019ad2
commit 9e8000a
Showing
11 changed files
with
121 additions
and
440 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
module.exports = class Data1715092202895 { | ||
name = 'Data1715092202895' | ||
|
||
async up(db) { | ||
await db.query(`CREATE TABLE "power_target_report" ("id" character varying NOT NULL, "farm_id" integer NOT NULL, "node_id" integer NOT NULL, "new_power_target" character varying(4) NOT NULL, "block" integer NOT NULL, "timestamp" numeric NOT NULL, CONSTRAINT "PK_815b6f599146c615b13292a875a" PRIMARY KEY ("id"))`) | ||
await db.query(`CREATE TABLE "power_state_report" ("id" character varying NOT NULL, "farm_id" integer NOT NULL, "node_id" integer NOT NULL, "new_power_state" character varying(4) NOT NULL, "block" integer NOT NULL, "timestamp" numeric NOT NULL, CONSTRAINT "PK_040bf595115174cdc7070b39688" PRIMARY KEY ("id"))`) | ||
} | ||
|
||
async down(db) { | ||
await db.query(`DROP TABLE "power_target_report"`) | ||
await db.query(`DROP TABLE "power_state_report"`) | ||
} | ||
} |
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
Oops, something went wrong.