-
Notifications
You must be signed in to change notification settings - Fork 0
/
updateDB.txt
80 lines (61 loc) · 1.69 KB
/
updateDB.txt
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
-- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Gegenereerd op: 14 feb 2018 om 14:27
-- Serverversie: 10.1.29-MariaDB
-- PHP-versie: 7.2.0
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 */;
--
-- Database: `myblog`
--
-- --------------------------------------------------------
--
-- Tabelstructuur voor tabel `readers`
--
CREATE TABLE `readers` (
`id` int(25) NOT NULL,
`name` varchar(255) NOT NULL,
`email` varchar(255) NOT NULL,
`password` varchar(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Indexen voor geëxporteerde tabellen
--
--
-- Indexen voor tabel `readers`
--
ALTER TABLE `readers`
ADD PRIMARY KEY (`id`);
--
-- AUTO_INCREMENT voor geëxporteerde tabellen
--
--
-- AUTO_INCREMENT voor een tabel `readers`
--
ALTER TABLE `readers`
MODIFY `id` int(25) NOT NULL AUTO_INCREMENT;
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 */;
ALTER TABLE comments
ADD reader_id VARCHAR (255) NOT NULL;
ALTER TABLE comments
ADD FOREIGN KEY (reader_id)
REFERENCES readers(id);
SELECT userName, HASHBYTES('MD5', CAST(password AS NVARCHAR(4000))) [HashedPasswd],
email, lastname, firstname, date, month, year
INTO bloggers_Hashed
FROM bloggers
SELECT * FROM bloggers_Hashed
username: admin
ww: IkvbAkc4