-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'release/server-v2.0.0'
- Loading branch information
Showing
12 changed files
with
108 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# TODOs | ||
|
||
- Server: Display a meaningful message if no track set is complete so the users understand | ||
why nothing is displayed (complete = a record is known for each of the 25 tracks) | ||
- Server: Properly sort the displayed track sets by year and season. | ||
- Server: Make it easy to user the ?user= feature |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
File renamed without changes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
version: "3" | ||
services: | ||
webserver: | ||
image: php:7.4-apache | ||
volumes: | ||
- ./html/:/var/www/html | ||
ports: | ||
- "127.0.0.1:8080:80" | ||
version: "3" | ||
services: | ||
webserver: | ||
image: php:8.2-apache | ||
volumes: | ||
- ./html/:/var/www/html | ||
ports: | ||
- "127.0.0.1:8080:80" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
<?php | ||
define('SERVER_VERSION', '2.0.0'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
-- SQL code for migrating the server from v1.0.0 to v2.0.0 table format: | ||
BEGIN TRANSACTION; | ||
|
||
-- From v2.0.0 onwards the track column is split into two columns: trackSet ("Summer 2020") and trackNumber (1 to 25). | ||
ALTER TABLE records ADD COLUMN trackSet TEXT; | ||
ALTER TABLE records ADD COLUMN trackNumber INTEGER; | ||
UPDATE records SET trackSet = SUBSTR(track, 0, INSTR(track, " - ")); | ||
UPDATE records SET trackNumber = CAST(SUBSTR(track, INSTR(track, " - ")+3) AS INTEGER); | ||
|
||
-- Add NOT NULL constraints for the new columns. For this we have to create a new table because | ||
-- SQLite does not support adding the NOT NULL constraint to existing columns. | ||
CREATE TABLE records_temp ( | ||
game TEXT NOT NULL, | ||
user TEXT NOT NULL, | ||
trackSet TEXT NOT NULL, | ||
trackNumber INTEGER NOT NULL, | ||
best INTEGER NOT NULL, | ||
PRIMARY KEY (game, user, trackSet, trackNumber) | ||
); | ||
|
||
-- Copy data from old table. | ||
INSERT INTO records_temp SELECT game, user, trackSet, trackNumber, best FROM records; | ||
|
||
-- Replace the old table. | ||
DROP TABLE records; | ||
ALTER TABLE records_temp RENAME TO records; | ||
|
||
COMMIT; |