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,

View File

@@ -1,7 +1,7 @@
{
"version": "6",
"dialect": "sqlite",
"id": "a7309db7-6811-48f5-bb28-822a92adf5d5",
"id": "e1cc8fc1-3ac7-41c4-915b-3d703eccd229",
"prevId": "00000000-0000-0000-0000-000000000000",
"tables": {
"items": {
@@ -9,7 +9,7 @@
"columns": {
"project_id": {
"name": "project_id",
"type": "text",
"type": "integer",
"primaryKey": false,
"notNull": true,
"autoincrement": false
@@ -184,10 +184,10 @@
"columns": {
"id": {
"name": "id",
"type": "text",
"type": "integer",
"primaryKey": true,
"notNull": true,
"autoincrement": false
"autoincrement": true
},
"name": {
"name": "name",
@@ -314,14 +314,14 @@
},
"run_id": {
"name": "run_id",
"type": "text",
"type": "integer",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"project_id": {
"name": "project_id",
"type": "text",
"type": "integer",
"primaryKey": false,
"notNull": true,
"autoincrement": false
@@ -395,14 +395,14 @@
"columns": {
"id": {
"name": "id",
"type": "text",
"type": "integer",
"primaryKey": true,
"notNull": true,
"autoincrement": false
"autoincrement": true
},
"project_id": {
"name": "project_id",
"type": "text",
"type": "integer",
"primaryKey": false,
"notNull": true,
"autoincrement": false

View File

@@ -5,7 +5,7 @@
{
"idx": 0,
"version": "6",
"when": 1792725790862,
"when": 1792772657596,
"tag": "0000_init",
"breakpoints": true
}