@processfocus/cli 0.1.0-next.0 → 0.1.0-next.1
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/dist/bundled-db-import.mjs +57 -57
- package/dist/main.mjs +222 -200
- package/dist/resources/system-migrations/20260922224258_fair_proteus/migration.sql +1 -0
- package/dist/resources/system-migrations/20260922224258_fair_proteus/snapshot.json +7535 -0
- package/dist/resources/system-migrations/20260922233247_optimal_maddog/migration.sql +24 -0
- package/dist/resources/system-migrations/20260922233247_optimal_maddog/snapshot.json +7694 -0
- package/package.json +4 -4
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
CREATE TABLE `pf_not_started_job` (
|
|
2
|
+
`id` text(41) PRIMARY KEY,
|
|
3
|
+
`queue` text(512) NOT NULL,
|
|
4
|
+
`job_id` text(1024) NOT NULL,
|
|
5
|
+
`not_started_reason` text collate nocase NOT NULL,
|
|
6
|
+
`created_at` real DEFAULT (julianday('now')) NOT NULL,
|
|
7
|
+
`updated_at` real DEFAULT (julianday('now')) NOT NULL,
|
|
8
|
+
`created_by` text(256) DEFAULT 'SYSTEM' NOT NULL,
|
|
9
|
+
`updated_by` text(256) DEFAULT 'SYSTEM' NOT NULL,
|
|
10
|
+
`_deleted` integer DEFAULT false NOT NULL
|
|
11
|
+
);
|
|
12
|
+
--> statement-breakpoint
|
|
13
|
+
ALTER TABLE `pf_process_execution` ADD `not_started_reason` text collate nocase;--> statement-breakpoint
|
|
14
|
+
ALTER TABLE `pf_to_do` ADD `not_started_reason` text collate nocase;--> statement-breakpoint
|
|
15
|
+
CREATE UNIQUE INDEX `pf_not_started_job_job_id_ix_idx` ON `pf_not_started_job` (`queue`,`job_id`) WHERE _deleted = 0;--> statement-breakpoint
|
|
16
|
+
CREATE INDEX `pf_not_started_job_updated_at_id_idx` ON `pf_not_started_job` (`updated_at`,`id`);
|
|
17
|
+
--> statement-breakpoint
|
|
18
|
+
CREATE TRIGGER IF NOT EXISTS pf_not_started_job_updated_at_trigger
|
|
19
|
+
AFTER UPDATE ON "pf_not_started_job"
|
|
20
|
+
FOR EACH ROW
|
|
21
|
+
WHEN NEW.updated_at = OLD.updated_at
|
|
22
|
+
BEGIN
|
|
23
|
+
UPDATE "pf_not_started_job" SET updated_at = julianday('now') WHERE id = NEW.id;
|
|
24
|
+
END;
|