-
Notifications
You must be signed in to change notification settings - Fork 0
/
basic-classroom-media.sql
102 lines (83 loc) · 2.45 KB
/
basic-classroom-media.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
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
92
93
94
95
96
97
98
99
100
101
102
-- phpMyAdmin SQL Dump
-- version 5.2.0
-- https://www.phpmyadmin.net/
--
-- Host: localhost:8889
-- Creato il: Mag 17, 2023 alle 09:20
-- Versione del server: 5.7.39
-- Versione PHP: 8.2.0
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
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: `basic-classroom-media`
--
-- --------------------------------------------------------
--
-- Struttura della tabella `media`
--
CREATE TABLE `media` (
`id` int(11) NOT NULL,
`nome_media` varchar(255) NOT NULL,
`titolo` varchar(255) NOT NULL,
`descrizione` text NOT NULL,
`nome_file` varchar(255) NOT NULL,
`proprietario` int(11) NOT NULL,
`date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`materia` varchar(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Struttura della tabella `utenti`
--
CREATE TABLE `utenti` (
`id` int(11) NOT NULL,
`nome` varchar(50) NOT NULL,
`cognome` varchar(50) NOT NULL,
`username` varchar(50) NOT NULL,
`email` varchar(100) NOT NULL,
`password` varchar(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Dump dei dati per la tabella `utenti`
--
INSERT INTO `utenti` (`id`, `nome`, `cognome`, `username`, `email`, `password`) VALUES
(1, 'Alessandro', 'Masone', 'a_masone', '[email protected]', 'password'),
(2, 'Stefano', 'Figliola', 's_figliola', '[email protected]', 'password'),
(3, 'a', 'a', 'a', '[email protected]', 'a');
--
-- Indici per le tabelle scaricate
--
--
-- Indici per le tabelle `media`
--
ALTER TABLE `media`
ADD PRIMARY KEY (`id`);
--
-- Indici per le tabelle `utenti`
--
ALTER TABLE `utenti`
ADD PRIMARY KEY (`id`),
ADD UNIQUE KEY `username` (`username`),
ADD UNIQUE KEY `email` (`email`);
--
-- AUTO_INCREMENT per le tabelle scaricate
--
--
-- AUTO_INCREMENT per la tabella `media`
--
ALTER TABLE `media`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9;
--
-- AUTO_INCREMENT per la tabella `utenti`
--
ALTER TABLE `utenti`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;
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 */;