making project ids 1 based

This commit is contained in:
C-West8
2026-10-23 11:32:30 -05:00
parent a9e31acaa4
commit fbd81b0b45
33 changed files with 215 additions and 160 deletions

View File

@@ -1,5 +1,5 @@
CREATE TABLE `items` (
`project_id` text NOT NULL,
`project_id` integer NOT NULL,
`source_id` text NOT NULL,
`parent_source_id` text NOT NULL,
`name` text NOT NULL,
@@ -24,7 +24,7 @@ CREATE TABLE `items` (
--> statement-breakpoint
CREATE INDEX `items_project_status` ON `items` (`project_id`,`status`);--> statement-breakpoint
CREATE TABLE `projects` (
`id` text PRIMARY KEY NOT NULL,
`id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
`name` text NOT NULL,
`enabled` integer DEFAULT true NOT NULL,
`paused_reason` text,
@@ -44,8 +44,8 @@ CREATE TABLE `projects` (
--> statement-breakpoint
CREATE TABLE `run_events` (
`id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
`run_id` text NOT NULL,
`project_id` text NOT NULL,
`run_id` integer NOT NULL,
`project_id` integer NOT NULL,
`source_id` text NOT NULL,
`path` text NOT NULL,
`action` text NOT NULL,
@@ -56,8 +56,8 @@ CREATE TABLE `run_events` (
--> statement-breakpoint
CREATE INDEX `run_events_run` ON `run_events` (`run_id`);--> statement-breakpoint
CREATE TABLE `runs` (
`id` text PRIMARY KEY NOT NULL,
`project_id` text NOT NULL,
`id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
`project_id` integer NOT NULL,
`trigger` text NOT NULL,
`started_at` integer NOT NULL,
`finished_at` integer,