-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmanagerone.sql
More file actions
91 lines (74 loc) · 2.76 KB
/
managerone.sql
File metadata and controls
91 lines (74 loc) · 2.76 KB
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
80
81
82
83
84
85
86
87
88
89
90
91
-- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Hôte : 127.0.0.1:3306
-- Généré le : Dim 09 jan. 2022 à 14:41
-- Version du serveur : 5.7.26
-- Version de PHP : 7.3.5
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 */;
--
-- Base de données : `managerone`
--
-- --------------------------------------------------------
--
-- Structure de la table `task`
--
DROP TABLE IF EXISTS `task`;
CREATE TABLE IF NOT EXISTS `task` (
`id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`userId` int(10) UNSIGNED NOT NULL,
`title` varchar(30) COLLATE utf8mb4_unicode_ci NOT NULL,
`description` text COLLATE utf8mb4_unicode_ci NOT NULL,
`creationDate` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`status` varchar(15) COLLATE utf8mb4_unicode_ci NOT NULL,
PRIMARY KEY (`id`),
KEY `userId` (`userId`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Déchargement des données de la table `task`
--
INSERT INTO `task` (`id`, `userId`, `title`, `description`, `creationDate`, `status`) VALUES
(1, 1, 'Ménage', 'Nettoyer toute la maison, ménage de printemp', '2022-01-06 22:41:22', 'En cours'),
(2, 2, 'Courses', 'Faire les courses du mois', '2022-01-06 22:43:03', 'Fait'),
(5, 2, 'Impot', 'Payer les impots', '2022-01-06 22:44:31', 'En cours'),
(7, 1, 'Dentiste', 'Prendre rdv chez le dentiste', '2022-01-07 19:23:31', 'En cours');
-- --------------------------------------------------------
--
-- Structure de la table `user`
--
DROP TABLE IF EXISTS `user`;
CREATE TABLE IF NOT EXISTS `user` (
`id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`name` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
`email` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `email` (`email`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Déchargement des données de la table `user`
--
INSERT INTO `user` (`id`, `name`, `email`) VALUES
(1, 'Warren', 'wawa@fake.fr'),
(2, 'Stephanie', 'stephanie@fake.fr'),
(6, 'Milan', 'ilyanah@fake.fr'),
(7, 'Luna', 'luna@fake.fr');
--
-- Contraintes pour les tables déchargées
--
--
-- Contraintes pour la table `task`
--
ALTER TABLE `task`
ADD CONSTRAINT `task_ibfk_1` FOREIGN KEY (`userId`) REFERENCES `user` (`id`) ON DELETE CASCADE;
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 */;