-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathtablesLibrary.sql
79 lines (65 loc) · 1.94 KB
/
tablesLibrary.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
-- phpMyAdmin SQL Dump
-- version 4.9.2
-- https://www.phpmyadmin.net/
--
-- 主機: 127.0.0.1
-- 產生時間: 2020 年 02 月 08 日 19:27
-- 伺服器版本: 8.0.18
-- PHP 版本: 7.3.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
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 */;
--
-- 資料庫: `tablesLibrary`
--
-- --------------------------------------------------------
--
-- 資料表結構 `news`
--
CREATE TABLE `news` (
`id` int(11) NOT NULL,
`title` varchar(128) COLLATE utf8_unicode_ci NOT NULL,
`date` date NOT NULL,
`body` text COLLATE utf8_unicode_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
--
-- 傾印資料表的資料 `news`
--
INSERT INTO `news` (`id`, `title`, `date`, `body`) VALUES
(1, 'title1', '2020-01-01', 'body1'),
(2, 'title2', '2020-01-02', 'body2'),
(3, 'title3', '2020-01-03', 'body3'),
(4, 'title4', '2020-01-04', 'body4'),
(5, 'title5', '2020-01-05', 'body5'),
(6, 'title6', '2020-01-06', 'body6'),
(7, 'title7', '2020-01-07', 'body7'),
(8, 'title8', '2020-01-08', 'body8'),
(9, 'title9', '2020-01-09', 'body9'),
(10, 'title10', '2020-01-10', 'body10'),
(11, 'title11', '2020-01-11', 'body11');
--
-- 已傾印資料表的索引
--
--
-- 資料表索引 `news`
--
ALTER TABLE `news`
ADD PRIMARY KEY (`id`),
ADD KEY `slug` (`date`);
--
-- 在傾印的資料表使用自動遞增(AUTO_INCREMENT)
--
--
-- 使用資料表自動遞增(AUTO_INCREMENT) `news`
--
ALTER TABLE `news`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=12;
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 */;