github.com/gogf/gf/v2@v2.7.4/database/gdb/testdata/with_multiple_depends.sql (about) 1 2 CREATE TABLE `table_a` ( 3 `id` int(11) NOT NULL AUTO_INCREMENT, 4 `alias` varchar(255) NULL DEFAULT '', 5 PRIMARY KEY (`id`) USING BTREE 6 ) ENGINE = InnoDB; 7 8 INSERT INTO `table_a` VALUES (1, 'table_a_test1'); 9 INSERT INTO `table_a` VALUES (2, 'table_a_test2'); 10 11 CREATE TABLE `table_b` ( 12 `id` int(11) NOT NULL AUTO_INCREMENT, 13 `table_a_id` int(11) NOT NULL, 14 `alias` varchar(255) NULL DEFAULT '', 15 PRIMARY KEY (`id`) USING BTREE 16 ) ENGINE = InnoDB; 17 18 INSERT INTO `table_b` VALUES (10, 1, 'table_b_test1'); 19 INSERT INTO `table_b` VALUES (20, 2, 'table_b_test2'); 20 INSERT INTO `table_b` VALUES (30, 1, 'table_b_test3'); 21 INSERT INTO `table_b` VALUES (40, 2, 'table_b_test4'); 22 23 CREATE TABLE `table_c` ( 24 `id` int(11) NOT NULL AUTO_INCREMENT, 25 `table_b_id` int(11) NOT NULL, 26 `alias` varchar(255) NULL DEFAULT '', 27 PRIMARY KEY (`id`) USING BTREE 28 ) ENGINE = InnoDB; 29 30 INSERT INTO `table_c` VALUES (100, 10, 'table_c_test1'); 31 INSERT INTO `table_c` VALUES (200, 10, 'table_c_test2'); 32 INSERT INTO `table_c` VALUES (300, 20, 'table_c_test3'); 33 INSERT INTO `table_c` VALUES (400, 30, 'table_c_test4');