refactor: Co-locate server artifacts under apps/server/
Move drizzle/, dist/, and coverage/ into apps/server/ so all server-specific artifacts live alongside the source they belong to. - git mv drizzle/ → apps/server/drizzle/ - drizzle.config.ts: out → ./apps/server/drizzle - tsconfig.json: outDir → ./apps/server/dist, exclude drizzle dir - package.json: main/bin/clean point to apps/server/dist/ - vitest.config.ts: reportsDirectory → ./apps/server/coverage - .gitignore: add coverage/ entry - ensure-schema.ts: update getMigrationsPath() for new layout - docs/database-migrations.md: update drizzle/ references
This commit is contained in:
27
apps/server/drizzle/0007_robust_the_watchers.sql
Normal file
27
apps/server/drizzle/0007_robust_the_watchers.sql
Normal file
@@ -0,0 +1,27 @@
|
||||
PRAGMA foreign_keys=OFF;--> statement-breakpoint
|
||||
CREATE TABLE `__new_tasks` (
|
||||
`id` text PRIMARY KEY NOT NULL,
|
||||
`plan_id` text,
|
||||
`phase_id` text,
|
||||
`initiative_id` text,
|
||||
`name` text NOT NULL,
|
||||
`description` text,
|
||||
`type` text DEFAULT 'auto' NOT NULL,
|
||||
`category` text DEFAULT 'execute' NOT NULL,
|
||||
`priority` text DEFAULT 'medium' NOT NULL,
|
||||
`status` text DEFAULT 'pending' NOT NULL,
|
||||
`requires_approval` integer,
|
||||
`order` integer DEFAULT 0 NOT NULL,
|
||||
`created_at` integer NOT NULL,
|
||||
`updated_at` integer NOT NULL,
|
||||
FOREIGN KEY (`plan_id`) REFERENCES `plans`(`id`) ON UPDATE no action ON DELETE cascade,
|
||||
FOREIGN KEY (`phase_id`) REFERENCES `phases`(`id`) ON UPDATE no action ON DELETE cascade,
|
||||
FOREIGN KEY (`initiative_id`) REFERENCES `initiatives`(`id`) ON UPDATE no action ON DELETE cascade
|
||||
);
|
||||
--> statement-breakpoint
|
||||
INSERT INTO `__new_tasks`("id", "plan_id", "phase_id", "initiative_id", "name", "description", "type", "category", "priority", "status", "requires_approval", "order", "created_at", "updated_at") SELECT "id", "plan_id", NULL, NULL, "name", "description", "type", 'execute', "priority", "status", NULL, "order", "created_at", "updated_at" FROM `tasks`;--> statement-breakpoint
|
||||
DROP TABLE `tasks`;--> statement-breakpoint
|
||||
ALTER TABLE `__new_tasks` RENAME TO `tasks`;--> statement-breakpoint
|
||||
PRAGMA foreign_keys=ON;--> statement-breakpoint
|
||||
ALTER TABLE `initiatives` ADD `merge_requires_approval` integer DEFAULT true NOT NULL;--> statement-breakpoint
|
||||
ALTER TABLE `initiatives` ADD `merge_target` text;
|
||||
Reference in New Issue
Block a user