summaryrefslogtreecommitdiff
path: root/sql (follow)
Commit message (Collapse)AuthorAgeFilesLines
* tcourse.sql: Add more example CCAsRunxi Yu2024-10-091-5/+13
|
* *: Overhaul structure again and embed everythingRunxi Yu2024-10-061-7/+0
| | | | | | | | - Remove sub-Makefiles; recursive make is annoying - Just use one top-level Makefile that builds everything - Embed templates and minified static resources into the binary - Embed all compiled documentation into the binary and serve - Embed all source into the binary and serve
* */Makefile: Update againRunxi Yu2024-10-051-0/+7
|
* courses.go, schema.sql: Validate course{Type,Group} in server, not SQLRunxi Yu2024-10-043-20/+1
|
* *.sql: New schema with ctypes and cgroupsRunxi Yu2024-10-043-18/+39
|
* drop.sql: New SQL script to drop all tablesRunxi Yu2024-10-041-0/+3
|
* schema.sql: users.expr should be BIGINTRunxi Yu2024-10-031-1/+1
|
* tcourse.sql: Add 1000 of each course for testingRunxi Yu2024-10-021-5/+5
|
* ws.go, schema.sql: Enforce uniqueness of course choicesRunxi Yu2024-10-011-1/+1
| | | | References: https://todo.sr.ht/~runxiyu/cca/1
* ws.go, *.sql: Add course choices to the databaseRunxi Yu2024-10-012-6/+14
| | | | | | | | | | | | | | | | | | | | Note that this naive implementation currently allows users to submit multiple requests for the same course. See the TODO comment below: /* * TODO: Ensure that the user is not already enrolled in this course * and pay attention to relevant race conditions. It might be useful * to restructure this part, to begin a transaction that adds the user * to the database (and check the (currently not existing) uniqueness) * constraint at that exact moment, and abort the transaction if the * course limit is exceeded. * Or perhaps choices should be also stored in an internal data * structure, though that requires extra attention on consistency * issues between the internal data structure and the database. * (Sometime I should really go fix the LMDB bindings...) */ References: https://todo.sr.ht/~runxiyu/cca/1
* {auth,index,ws}.go, schema.sql: Move session cookie into the user tableRunxi Yu2024-09-301-7/+3
| | | | | | | One user shall only have one session at a time. This reduces the possibility of strange race conditions and simplifies the code a lot. References: https://todo.sr.ht/~runxiyu/cca/4
* docs, scripts, sql: Sort support files into subdirectoriesRunxi Yu2024-09-242-0/+25