-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdatabase.sql
More file actions
30 lines (25 loc) · 1.52 KB
/
Copy pathdatabase.sql
File metadata and controls
30 lines (25 loc) · 1.52 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
--
-- Tabellenstruktur für Tabelle `users`
--
CREATE TABLE IF NOT EXISTS `users` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`passwort` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`vorname` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`nachname` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`updated_at` timestamp NULL DEFAULT NULL,
`passwortcode` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`passwortcode_time` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`), UNIQUE (`email`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
--- Beispieldaten (Bitte vorher ändern) | E-Mail: mail@example.com | Passwort: start | password_hash() generieren z.B. unter https://www.php-einfach.de/diverses/md5-sha1-hash-generator/
INSERT INTO `users` (`id`, `email`, `passwort`, `vorname`, `nachname`, `created_at`, `updated_at`, `passwortcode`, `passwortcode_time`) VALUES
(1, 'mail@example.com', '$2y$10$qDQP5Q7g..MwgsTU6U.cg.rUUtolJLiVvUwReLx1CPI/QxF1C.aBC', 'Max', 'Mustermann', '2000-01-01 01:00:00', NULL, NULL, NULL);
CREATE TABLE `securitytokens` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT PRIMARY KEY,
`user_id` int(10) NOT NULL,
`identifier` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`securitytoken` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;