Feat: haoka db/migration

This commit is contained in:
Owen 2024-12-14 18:03:10 +08:00
parent 4fd4b8a9b0
commit f1a6916015
6 changed files with 4158 additions and 33 deletions

View File

@ -1,38 +1,26 @@
/*
Navicat Premium Dump SQL
Source Server : 120.46.194.67
Source Server Type : MySQL
Source Server Version : 50744 (5.7.44)
Source Host : 120.46.194.67:3306
Source Schema : haoka
Target Server Type : MySQL
Target Server Version : 50744 (5.7.44)
File Encoding : 65001
Date: 11/12/2024 13:56:34
*/
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
SET
FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for haoka_demo
-- ----------------------------
DROP TABLE IF EXISTS `haoka_demo`;
CREATE TABLE `haoka_demo` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '编号',
`name` text CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL COMMENT '名字',
`age` int(11) NOT NULL COMMENT '年龄',
`agent` tinyint(4) NOT NULL COMMENT '性别',
`creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '创建者',
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '更新者',
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
`deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除',
`tenant_id` bigint(20) NOT NULL DEFAULT 0 COMMENT '租户编号',
PRIMARY KEY (`id`) USING BTREE
CREATE TABLE `haoka_demo`
(
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '编号',
`name` text CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL COMMENT '名字',
`age` int(11) NOT NULL COMMENT '年龄',
`agent` tinyint(4) NOT NULL COMMENT '性别',
`creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '创建者',
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '更新者',
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
`deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除',
`tenant_id` bigint(20) NOT NULL DEFAULT 0 COMMENT '租户编号',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = latin1 COLLATE = latin1_swedish_ci COMMENT = '好卡案例' ROW_FORMAT = Dynamic;
SET FOREIGN_KEY_CHECKS = 1;
SET
FOREIGN_KEY_CHECKS = 1;

View File

@ -115,6 +115,18 @@
<!-- <version>${revision}</version>-->
<!-- </dependency>-->
<dependency>
<groupId>org.flywaydb</groupId>
<artifactId>flyway-core</artifactId>
<version>11.1.0</version>
</dependency>
<dependency>
<groupId>org.flywaydb</groupId>
<artifactId>flyway-mysql</artifactId>
<version>11.1.0</version>
</dependency>
<!-- 好卡模块-->
<dependency>
<groupId>cn.iocoder.boot</groupId>

View File

@ -53,8 +53,8 @@ spring:
# url: jdbc:dm://127.0.0.1:5236?schema=RUOYI_VUE_PRO # DM 连接的示例
# url: jdbc:kingbase8://127.0.0.1:54321/test # 人大金仓 KingbaseES 连接的示例
# url: jdbc:postgresql://127.0.0.1:5432/postgres # OpenGauss 连接的示例
username: haoka
password: nr1Eo&PyTq3a1%
username: root
password: UDMUSJv5iRq4R%
# username: sa # SQL Server 连接的示例
# password: Yudao@2024 # SQL Server 连接的示例
# username: SYSDBA # DM 连接的示例
@ -64,8 +64,8 @@ spring:
slave: # 模拟从库,可根据自己需要修改
lazy: true # 开启懒加载,保证启动速度
url: jdbc:mysql://120.46.194.67:3306/haoka?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&rewriteBatchedStatements=true&nullCatalogMeansCurrent=true
username: haoka
password: nr1Eo&PyTq3a1%
username: root
password: UDMUSJv5iRq4R%
# Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优
data:

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,25 @@
SET NAMES utf8mb4;
SET
FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for haoka_demo
-- ----------------------------
DROP TABLE IF EXISTS `haoka_demo`;
CREATE TABLE `haoka_demo`
(
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '编号',
`name` text CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL COMMENT '名字',
`age` int(11) NOT NULL COMMENT '年龄',
`agent` tinyint(4) NOT NULL COMMENT '性别',
`creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '创建者',
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT '' COMMENT '更新者',
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
`deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除',
`tenant_id` bigint(20) NOT NULL DEFAULT 0 COMMENT '租户编号',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = latin1 COLLATE = latin1_swedish_ci COMMENT = '好卡案例' ROW_FORMAT = Dynamic;
SET
FOREIGN_KEY_CHECKS = 1;