feat(category): save collapse state for signed in users (#2134)

This commit is contained in:
Meier Lukas
2025-01-27 20:34:50 +01:00
committed by GitHub
parent 5c219a8b59
commit 7cb0aa70f1
18 changed files with 3624 additions and 3 deletions

View File

@@ -0,0 +1,9 @@
CREATE TABLE `section_collapse_state` (
`user_id` varchar(64) NOT NULL,
`section_id` varchar(64) NOT NULL,
`collapsed` boolean NOT NULL DEFAULT false,
CONSTRAINT `section_collapse_state_user_id_section_id_pk` PRIMARY KEY(`user_id`,`section_id`)
);
--> statement-breakpoint
ALTER TABLE `section_collapse_state` ADD CONSTRAINT `section_collapse_state_user_id_user_id_fk` FOREIGN KEY (`user_id`) REFERENCES `user`(`id`) ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
ALTER TABLE `section_collapse_state` ADD CONSTRAINT `section_collapse_state_section_id_section_id_fk` FOREIGN KEY (`section_id`) REFERENCES `section`(`id`) ON DELETE cascade ON UPDATE no action;

File diff suppressed because it is too large Load Diff

View File

@@ -155,6 +155,13 @@
"when": 1737883744729,
"tag": "0021_fluffy_jocasta",
"breakpoints": true
},
{
"idx": 22,
"version": "5",
"when": 1737927618711,
"tag": "0022_famous_otto_octavius",
"breakpoints": true
}
]
}

View File

@@ -0,0 +1,8 @@
CREATE TABLE `section_collapse_state` (
`user_id` text NOT NULL,
`section_id` text NOT NULL,
`collapsed` integer DEFAULT false NOT NULL,
PRIMARY KEY(`user_id`, `section_id`),
FOREIGN KEY (`user_id`) REFERENCES `user`(`id`) ON UPDATE no action ON DELETE cascade,
FOREIGN KEY (`section_id`) REFERENCES `section`(`id`) ON UPDATE no action ON DELETE cascade
);

File diff suppressed because it is too large Load Diff

View File

@@ -155,6 +155,13 @@
"when": 1737883733050,
"tag": "0021_famous_bruce_banner",
"breakpoints": true
},
{
"idx": 22,
"version": "6",
"when": 1737927609085,
"tag": "0022_modern_sunfire",
"breakpoints": true
}
]
}