CREATE DATABASE `schoolDB` CHARACTER SET utf8 COLLATE utf8_unicode_ci;

USE `schoolDB`;
CREATE TABLE IF NOT EXISTS `classmate` (
  `schnum` varchar(12) COLLATE utf8_unicode_ci NOT NULL,
  `name` varchar(12) COLLATE utf8_unicode_ci NOT NULL,
  `gender` enum('b','g') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'g',
  `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

ALTER TABLE `classmate`
  ADD PRIMARY KEY (`schnum`);

INSERT INTO `classmate` (`schnum`, `name`, `gender`, `email`) VALUES
('D10416222', '趙小牛', 'g', 'xyz@gmail.com'),
('D10416288', '黃小豬', 'b', 'pig@yahoo.com.tw');






-- --------------------------------------------------------

--
-- 資料表結構 `bkstage_user`
--

CREATE TABLE IF NOT EXISTS `bkstage_user` (
  `id` int(11) NOT NULL,
  `account` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
  `password` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `level` tinyint(4) NOT NULL
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;


--
-- 資料表索引 `bkstage_user`
--
ALTER TABLE `bkstage_user`
  ADD PRIMARY KEY (`id`);

ALTER TABLE `bkstage_user`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;


INSERT INTO `bkstage_user` (`account`, `password`, `level`) VALUES
('david', '7c4a8d09ca3762af61e59520943dc26494f8941b', 1),
('mary', '7c4a8d09ca3762af61e59520943dc26494f8941b', 1);
