Skip to content

Commit 9f39996

Browse files
authored
feat: automations (schedules v2)
Schedules -> Automations
2 parents 14027d6 + e95535c commit 9f39996

86 files changed

Lines changed: 11330 additions & 1315 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
CREATE TABLE `summary` (
2+
`id` text PRIMARY KEY NOT NULL,
3+
`slug` text,
4+
`organization_id` text NOT NULL,
5+
`team_id` text,
6+
`user_id` text,
7+
`type` text NOT NULL,
8+
`effective_from` integer NOT NULL,
9+
`effective_to` integer NOT NULL,
10+
`content` text NOT NULL,
11+
`created_at` integer NOT NULL,
12+
`published_at` integer,
13+
`updated_at` integer NOT NULL,
14+
FOREIGN KEY (`organization_id`) REFERENCES `organization`(`id`) ON UPDATE no action ON DELETE cascade,
15+
FOREIGN KEY (`team_id`) REFERENCES `team`(`id`) ON UPDATE no action ON DELETE set null,
16+
FOREIGN KEY (`user_id`) REFERENCES `user`(`id`) ON UPDATE no action ON DELETE set null
17+
);
18+
--> statement-breakpoint
19+
CREATE UNIQUE INDEX `summary_slug_unique` ON `summary` (`slug`) WHERE slug IS NOT NULL;--> statement-breakpoint
20+
CREATE INDEX `summary_org_idx` ON `summary` (`organization_id`);--> statement-breakpoint
21+
CREATE INDEX `summary_team_idx` ON `summary` (`team_id`);--> statement-breakpoint
22+
CREATE INDEX `summary_user_idx` ON `summary` (`user_id`);--> statement-breakpoint
23+
CREATE INDEX `summary_type_idx` ON `summary` (`type`);--> statement-breakpoint
24+
CREATE INDEX `summary_range_idx` ON `summary` (`effective_from`,`effective_to`);--> statement-breakpoint
25+
ALTER TABLE `status_update` ADD `slug` text;--> statement-breakpoint
26+
ALTER TABLE `status_update` ADD `published_at` integer;--> statement-breakpoint
27+
CREATE UNIQUE INDEX `status_update_slug_unique` ON `status_update` (`slug`) WHERE slug IS NOT NULL;

0 commit comments

Comments
 (0)