fmhsong/database/fmhs_music.sql
2022-05-20 19:21:39 +08:00

104 lines
2.0 KiB
SQL

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
--
-- 数据库: `fmhs_music`
--
-- --------------------------------------------------------
--
-- 表的结构 `albums`
--
CREATE TABLE `albums` (
`alid` int(11) NOT NULL,
`name` text NOT NULL,
`alias` json DEFAULT NULL,
`cover` text
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- 表的结构 `artists`
--
CREATE TABLE `artists` (
`arid` int(11) NOT NULL,
`name` text NOT NULL,
`alias` json DEFAULT NULL,
`pic` text
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- 表的结构 `songs`
--
CREATE TABLE `songs` (
`sid` int(11) NOT NULL,
`name` text NOT NULL,
`alias` json DEFAULT NULL,
`alid` int(11) NOT NULL,
`arid` json NOT NULL,
`hash` text NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- 转储表的索引
--
--
-- 表的索引 `albums`
--
ALTER TABLE `albums`
ADD PRIMARY KEY (`alid`);
--
-- 表的索引 `artists`
--
ALTER TABLE `artists`
ADD PRIMARY KEY (`arid`);
--
-- 表的索引 `songs`
--
ALTER TABLE `songs`
ADD PRIMARY KEY (`sid`);
--
-- 在导出的表使用AUTO_INCREMENT
--
--
-- 使用表AUTO_INCREMENT `albums`
--
ALTER TABLE `albums`
MODIFY `alid` int(11) NOT NULL AUTO_INCREMENT;
--
-- 使用表AUTO_INCREMENT `artists`
--
ALTER TABLE `artists`
MODIFY `arid` int(11) NOT NULL AUTO_INCREMENT;
--
-- 使用表AUTO_INCREMENT `songs`
--
ALTER TABLE `songs`
MODIFY `sid` int(11) NOT NULL AUTO_INCREMENT;
COMMIT;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;