mirror of
https://gitee.com/beecue/fastbee.git
synced 2025-12-18 17:05:55 +08:00
2022年5月24日14:34:18 增加初始化时创建数据库功能
This commit is contained in:
@@ -1,40 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.iot.tdengine.dao.DatabaseDAO">
|
||||
|
||||
<!-- 创建数据库-->
|
||||
<update id="createDB" parameterType="java.lang.String">
|
||||
create database if not exists ${dbName};
|
||||
</update>
|
||||
|
||||
<!-- 删除数据库-->
|
||||
<update id="dropDatabase" parameterType="java.lang.String">
|
||||
DROP database if exists ${dbName};
|
||||
</update>
|
||||
|
||||
<!-- 使用数据库-->
|
||||
<update id="useDatabase" parameterType="java.lang.String">
|
||||
use ${dbName};
|
||||
</update>
|
||||
|
||||
<update id="createTable">
|
||||
create stable if not exists ${tableName}
|
||||
(ts timestamp,
|
||||
log_id BIGINT,
|
||||
identity NCHAR(100),
|
||||
log_type NCHAR(20),
|
||||
log_value NCHAR(100),
|
||||
device_id BIGINT,
|
||||
device_name NCHAR(100),
|
||||
serial_number NCHAR(100),
|
||||
is_monitor int,
|
||||
create_by NCHAR(100),
|
||||
create_time timestamp,
|
||||
remark NCHAR(1000),
|
||||
);
|
||||
</update>
|
||||
|
||||
|
||||
</mapper>
|
||||
@@ -42,7 +42,6 @@
|
||||
</update>
|
||||
|
||||
<update id="createSTable">
|
||||
|
||||
create STABLE if not exists ${database}.device_log
|
||||
(
|
||||
ts timestamp,
|
||||
|
||||
Reference in New Issue
Block a user