aboutsummaryrefslogtreecommitdiff
path: root/dbinit
diff options
context:
space:
mode:
authorSean <sb.groenenboom@student.avans.nl>2023-03-24 11:04:15 +0100
committerSean <sb.groenenboom@student.avans.nl>2023-03-24 11:04:15 +0100
commitd1362a8d116ea6d5a36f33625b86ee3793fc1662 (patch)
tree97360136e16ece2f90792fa048656b4788e720c6 /dbinit
parenta78c8ac520cb6e3a81125dad91306d37d56b294b (diff)
Edit views.sql
Diffstat (limited to 'dbinit')
-rw-r--r--dbinit/makefile4
-rw-r--r--dbinit/views.sql6
2 files changed, 5 insertions, 5 deletions
diff --git a/dbinit/makefile b/dbinit/makefile
index bd24efd..d412570 100644
--- a/dbinit/makefile
+++ b/dbinit/makefile
@@ -3,7 +3,7 @@ USER = $(shell id -un)
HOST = localhost
.PHONY: clean permissions init data procedures full
-all:full.sql
+
# delete old tables and create new tables
init: base.sql
$(SQL) < $<
@@ -31,7 +31,7 @@ data.sql:
# grant all database permissions (development only)
permissions:
- echo "grant all privileges on formula1.* to '$(USER)'@'$(HOST)';" | sudo $(SQL)
+ echo "grant all privileges on formula1.* to '$(USER)'@'$(HOST)';"
# delete generated sql files
clean:
diff --git a/dbinit/views.sql b/dbinit/views.sql
index fe22fdb..a995ee6 100644
--- a/dbinit/views.sql
+++ b/dbinit/views.sql
@@ -7,7 +7,7 @@ SELECT
`circuit`.`name` AS `name`
FROM
(((`calendar`
- JOIN `racedate` ON ((`calendar`.`ID` = `racedate`.`calanderID`)))
+ JOIN `racedate` ON ((`calendar`.`ID` = `racedate`.`calendarID`)))
JOIN `racedatecircuit` ON ((`racedate`.`ID` = `racedatecircuit`.`raceDateID`)))
JOIN `circuit` ON ((`racedatecircuit`.`circuitID` = `circuit`.`ID`)));
@@ -22,7 +22,7 @@ SELECT
`member`.`middleName` AS `middleName`,
`member`.`lastName` AS `lastName`
FROM
- (((`calander`
- JOIN `teams` ON ((`calendar`.`ID` = `teams`.`calanderID`)))
+ (((`calendar`
+ JOIN `teams` ON ((`calendar`.`ID` = `teams`.`calendarID`)))
JOIN `teamsmember` ON ((`teams`.`ID` = `teamsmember`.`teamsID`)))
JOIN `member` ON ((`teamsmember`.`memberID` = `member`.`ID`)));