Skip to content

Commit

Permalink
feat: track when schedules are imported (#574)
Browse files Browse the repository at this point in the history
  • Loading branch information
CadenLee2 authored Jan 29, 2025
1 parent b2a87da commit 11abbe0
Show file tree
Hide file tree
Showing 9 changed files with 2,090 additions and 1 deletion.
7 changes: 7 additions & 0 deletions api/drizzle/0002_lethal_nighthawk.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
CREATE TABLE zot4plan_imports (
schedule_id TEXT NOT NULL,
user_id INTEGER NOT NULL,
"timestamp" TIMESTAMP NOT NULL,
PRIMARY KEY (schedule_id, user_id, "timestamp"),
FOREIGN KEY (user_id) REFERENCES "user"(id)
)
1 change: 1 addition & 0 deletions api/drizzle/0003_hot_micromax.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE "zot4plan_imports" ALTER COLUMN "timestamp" SET DEFAULT now();
3 changes: 3 additions & 0 deletions api/drizzle/0004_sad_zzzax.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
ALTER TABLE "zot4plan_imports" DROP CONSTRAINT "zot4plan_imports_schedule_id_user_id_timestamp_pk";--> statement-breakpoint
ALTER TABLE "zot4plan_imports" ALTER COLUMN "user_id" DROP NOT NULL;--> statement-breakpoint
ALTER TABLE "zot4plan_imports" ADD CONSTRAINT "zot4plan_imports_schedule_id_timestamp_pk" PRIMARY KEY("schedule_id","timestamp");
Loading

0 comments on commit 11abbe0

Please sign in to comment.