feat: Add experiment table and update annotation schema to include experiment_id

This commit is contained in:
averel10
2026-03-20 07:47:38 +01:00
parent df19890aee
commit 5015048cf7
3 changed files with 3 additions and 24 deletions

View File

@@ -0,0 +1,14 @@
CREATE TABLE `experiment` (
`id` integer PRIMARY KEY AUTOINCREMENT NOT NULL,
`name` text NOT NULL,
`published` integer DEFAULT false NOT NULL,
`description` text,
`annotation_tool` text,
`dataset_id` integer NOT NULL,
`created_at` integer DEFAULT (unixepoch()) NOT NULL,
`updated_at` integer DEFAULT (unixepoch()) NOT NULL,
FOREIGN KEY (`dataset_id`) REFERENCES `dataset`(`id`) ON UPDATE no action ON DELETE no action
);
--> statement-breakpoint
ALTER TABLE `annotation` ADD `experiment_id` integer REFERENCES experiment(id);--> statement-breakpoint
ALTER TABLE `annotation` ADD `updated_at` integer DEFAULT (unixepoch()) NOT NULL;