Storm_backend/docker/mysql/db/00-init-all-databases.sql
2025-09-28 20:42:16 +08:00

21 lines
680 B
SQL
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

-- 初始化所有数据库的脚本
-- 这个脚本会在其他SQL文件之前执行确保所有数据库都能正确创建
-- 设置字符集
SET NAMES utf8mb4;
-- 创建 storm 数据库
DROP DATABASE IF EXISTS `storm`;
CREATE DATABASE `storm` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
-- 创建 storm-config 数据库
DROP DATABASE IF EXISTS `storm-config`;
CREATE DATABASE `storm-config` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
-- 创建 storm-device 数据库
DROP DATABASE IF EXISTS `storm-device`;
CREATE DATABASE `storm-device` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
-- 显示创建的数据库
SHOW DATABASES;