-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathStudentVote_Studentnummer_2050.sql
More file actions
47 lines (35 loc) · 1.18 KB
/
StudentVote_Studentnummer_2050.sql
File metadata and controls
47 lines (35 loc) · 1.18 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
CREATE DATABASE IF NOT EXISTS `student_vote`
USE `student_vote`;
-- MySQL dump 10.13 Distrib 8.0.32, for macos13 (x86_64)
--
-- Host: 127.0.0.1 Database: student_vote
-- ------------------------------------------------------
-- Server version 8.0.33
--
-- Table structure for table `comments`
--
DROP TABLE IF EXISTS `comments`;
CREATE TABLE `comments` (
`id` int NOT NULL AUTO_INCREMENT,
`nominee_id` int DEFAULT NULL,
`comment_text` text,
PRIMARY KEY (`id`),
KEY `nominee_id` (`nominee_id`),
CONSTRAINT `comments_ibfk_1` FOREIGN KEY (`nominee_id`) REFERENCES `student_nominees` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
--
-- Table structure for table `student_nominees`
--
DROP TABLE IF EXISTS `student_nominees`;
CREATE TABLE `student_nominees` (
`id` int NOT NULL AUTO_INCREMENT,
`name` varchar(255) DEFAULT NULL,
`votes` int DEFAULT '0',
`student_program` varchar(255) DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `name` (`name`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
--
-- Dumping events for database 'student_vote'
--
-- Dump completed on 2023-08-09 8:02:57