From 0b2ef567594728f33661d27d99d6f6b2154db7e2 Mon Sep 17 00:00:00 2001 From: zhu327 Date: Wed, 25 Oct 2023 16:05:20 +0800 Subject: [PATCH] feat: add subject_template_group create table sql --- .../sql/0031_iam_20231025-1600_mysql.sql | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 build/support-files/sql/0031_iam_20231025-1600_mysql.sql diff --git a/build/support-files/sql/0031_iam_20231025-1600_mysql.sql b/build/support-files/sql/0031_iam_20231025-1600_mysql.sql new file mode 100644 index 00000000..eb694311 --- /dev/null +++ b/build/support-files/sql/0031_iam_20231025-1600_mysql.sql @@ -0,0 +1,11 @@ +CREATE TABLE `bkiam`.`subject_template_group` ( + `pk` int(10) unsigned NOT NULL AUTO_INCREMENT, + `subject_pk` int(10) unsigned NOT NULL, + `template_id` int(10) unsigned NOT NULL, + `group_pk` int(10) unsigned NOT NULL, + `expired_at` int(10) unsigned NOT NULL, + `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`pk`), + UNIQUE KEY `idx_uk_subject_template_group` (`subject_pk`,`group_pk`,`template_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; \ No newline at end of file