github.com/gogf/gf/v2@v2.7.4/database/gdb/testdata/issue1412.sql (about) 1 -- ---------------------------- 2 -- Table structure for items 3 -- ---------------------------- 4 CREATE TABLE `items` ( 5 `id` int(11) NOT NULL, 6 `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, 7 PRIMARY KEY (`id`) USING BTREE 8 ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic; 9 10 -- ---------------------------- 11 -- Records of items 12 -- ---------------------------- 13 INSERT INTO `items` VALUES (1, '金秋产品1'); 14 INSERT INTO `items` VALUES (2, '金秋产品2'); 15 16 -- ---------------------------- 17 -- Table structure for parcels 18 -- ---------------------------- 19 CREATE TABLE `parcels` ( 20 `id` int(11) NOT NULL AUTO_INCREMENT, 21 `item_id` int(11) NULL DEFAULT NULL, 22 PRIMARY KEY (`id`) USING BTREE 23 ) ENGINE = InnoDB AUTO_INCREMENT = 4 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic; 24 25 -- ---------------------------- 26 -- Records of parcels 27 -- ---------------------------- 28 INSERT INTO `parcels` VALUES (1, 1); 29 INSERT INTO `parcels` VALUES (2, 2); 30 INSERT INTO `parcels` VALUES (3, 0);