Skip to content

Commit ab34231

Browse files
committed
feat: update migration to add enable_accept_solutions column and enhance accept_solutions table structure
1 parent ab09bcd commit ab34231

File tree

1 file changed

+14
-9
lines changed

1 file changed

+14
-9
lines changed
Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,16 @@
1-
ALTER TABLE `pph_post_assist_config`
2-
ADD COLUMN IF NOT EXISTS `enable_accept_solutions` BOOLEAN DEFAULT FALSE;
1+
-- depends: 18_post_assist
2+
ALTER TABLE pph_post_assist_config
3+
ADD COLUMN IF NOT EXISTS enable_accept_solutions BOOLEAN DEFAULT FALSE;
34

45
CREATE TABLE
5-
IF NOT EXISTS `pph_post_assist_config_accept_solutions` (
6-
`id` INT (11) NOT NULL AUTO_INCREMENT,
7-
`thread_id` INT (11) NOT NULL,
8-
`post_assist_config_id` INT (11) NOT NULL,
9-
`user_id` INT (11) NOT NULL,
10-
`created_at` DATETIME NOT NULL,
11-
);
6+
IF NOT EXISTS pph_post_assist_config_accept_solutions (
7+
id SERIAL PRIMARY KEY,
8+
thread_id BIGINT NOT NULL,
9+
post_assist_config_id SERIAL NOT NULL,
10+
user_id BIGINT NOT NULL,
11+
message_id BIGINT NOT NULL,
12+
FOREIGN KEY (post_assist_config_id) REFERENCES pph_post_assist_config (id) ON DELETE CASCADE
13+
);
14+
15+
ALTER TABLE pph_post_assist_config_accept_solutions
16+
ADD COLUMN IF NOT EXISTS message_id BIGINT NOT NULL;

0 commit comments

Comments
 (0)