-
Notifications
You must be signed in to change notification settings - Fork 1
/
gigglepig.sql
57 lines (49 loc) · 2.57 KB
/
gigglepig.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
-- --------------------------------------------------------
-- Host: 127.0.0.1
-- Server version: 10.4.13-MariaDB-log - mariadb.org binary distribution
-- Server OS: Win64
-- HeidiSQL Version: 11.2.0.6253
-- --------------------------------------------------------
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET NAMES utf8 */;
/*!50503 SET NAMES utf8mb4 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
-- Dumping database structure for phpvue
DROP DATABASE IF EXISTS `giggle_pig`;
CREATE DATABASE IF NOT EXISTS `giggle_pig` /*!40100 DEFAULT CHARACTER SET utf8 */;
USE `giggle_pig`;
-- Dumping structure for table phpvue.users
DROP TABLE IF EXISTS `users`;
CREATE TABLE IF NOT EXISTS `users` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`username` varchar(50) NOT NULL,
`password_hash` varchar(100) NOT NULL,
`email` varchar(255) NOT NULL,
`full_name` varchar(255) NOT NULL,
`profile_pic` varchar(300) NULL,
`role` enum('ADMIN','MANAGER','USER') NOT NULL DEFAULT 'USER',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- Dumping data for table phpvue.users: ~1 rows (approximately)
/*!40000 ALTER TABLE `users` DISABLE KEYS */;
INSERT IGNORE INTO `users` (`id`, `username`, `password_hash`, `email`, `full_name`, `role`, `profile_pic`) VALUES
(1, 'admin', '$2y$10$JN/JQbRZ8zj6ReU5StNgc.AXIWuw7c8OexEk1Hlnh7/TBkuDzdyp2', '[email protected]', 'Administrator', 'ADMIN', '');
/*!40000 ALTER TABLE `users` ENABLE KEYS */;
-- Dumping structure for table phpvue.users_auth_keys
DROP TABLE IF EXISTS `users_auth_keys`;
CREATE TABLE IF NOT EXISTS `users_auth_keys` (
`user_id` int(11) NOT NULL,
`auth_key` varchar(255) NOT NULL,
`valid_till` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
PRIMARY KEY (`user_id`),
CONSTRAINT `FK_users_auth_keys_users` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- Dumping data for table phpvue.users_auth_keys: ~1 rows (approximately)
/*!40000 ALTER TABLE `users_auth_keys` DISABLE KEYS */;
/*!40000 ALTER TABLE `users_auth_keys` ENABLE KEYS */;
/*!40101 SET SQL_MODE=IFNULL(@OLD_SQL_MODE, '') */;
/*!40014 SET FOREIGN_KEY_CHECKS=IFNULL(@OLD_FOREIGN_KEY_CHECKS, 1) */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40111 SET SQL_NOTES=IFNULL(@OLD_SQL_NOTES, 1) */;