Skip to content

Commit

Permalink
Merge pull request #27 from AlphaKeks/master
Browse files Browse the repository at this point in the history
Add descriptions to maps, courses, and filters
  • Loading branch information
AlphaKeks authored Jan 17, 2024
2 parents f27b931 + 1e86cd8 commit c4687a2
Show file tree
Hide file tree
Showing 11 changed files with 471 additions and 300 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

This file was deleted.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

65 changes: 65 additions & 0 deletions api-spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,11 @@
"global_status": {
"$ref": "#/components/schemas/GlobalStatus"
},
"description": {
"type": "string",
"description": "The map's description.",
"nullable": true
},
"checksum": {
"type": "integer",
"format": "uint32",
Expand Down Expand Up @@ -477,6 +482,11 @@
"global_status": {
"$ref": "#/components/schemas/GlobalStatus"
},
"description": {
"type": "string",
"description": "The map's description.",
"nullable": true
},
"checksum": {
"type": "integer",
"format": "uint32",
Expand Down Expand Up @@ -2065,6 +2075,16 @@
"description": "The course's ID.",
"minimum": 0
},
"name": {
"type": "string",
"description": "The course's name.",
"nullable": true
},
"description": {
"type": "string",
"description": "The course's description.",
"nullable": true
},
"stage": {
"type": "integer",
"format": "uint8",
Expand Down Expand Up @@ -2100,6 +2120,16 @@
"description": "The course's [`id`].\n\n[`id`]: Course::id",
"minimum": 0
},
"name": {
"type": "string",
"description": "New [name] for the course.\n\n[name]: Course::name",
"nullable": true
},
"description": {
"type": "string",
"description": "New [description] for the course.\n\n[description]: Course::description",
"nullable": true
},
"added_mappers": {
"type": "array",
"items": {
Expand Down Expand Up @@ -2207,6 +2237,11 @@
},
"ranked_status": {
"$ref": "#/components/schemas/RankedStatus"
},
"notes": {
"type": "string",
"description": "Notes about this filter.",
"nullable": true
}
}
},
Expand Down Expand Up @@ -2238,6 +2273,11 @@
}
],
"nullable": true
},
"notes": {
"type": "string",
"description": "New [notes] for the course.\n\n[notes]: Filter::notes",
"nullable": true
}
}
},
Expand Down Expand Up @@ -2308,6 +2348,11 @@
"global_status": {
"$ref": "#/components/schemas/GlobalStatus"
},
"description": {
"type": "string",
"description": "The map's description.",
"nullable": true
},
"checksum": {
"type": "integer",
"format": "uint32",
Expand Down Expand Up @@ -2351,6 +2396,11 @@
],
"nullable": true
},
"description": {
"type": "string",
"description": "New description for the map.",
"nullable": true
},
"workshop_id": {
"type": "integer",
"format": "uint32",
Expand Down Expand Up @@ -2453,6 +2503,11 @@
"description": "The course's name.",
"nullable": true
},
"description": {
"type": "string",
"description": "Description of the course.",
"nullable": true
},
"mappers": {
"type": "array",
"items": {
Expand Down Expand Up @@ -2490,6 +2545,11 @@
},
"ranked_status": {
"$ref": "#/components/schemas/RankedStatus"
},
"notes": {
"type": "string",
"description": "Notes about the filter.",
"nullable": true
}
}
},
Expand All @@ -2511,6 +2571,11 @@
"global_status": {
"$ref": "#/components/schemas/GlobalStatus"
},
"description": {
"type": "string",
"description": "Description of the map.",
"nullable": true
},
"mappers": {
"type": "array",
"items": {
Expand Down
3 changes: 2 additions & 1 deletion database/migrations/20231110155336_maps.up.sql
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ CREATE TABLE IF NOT EXISTS Maps (
`name` VARCHAR(32) NOT NULL,
`workshop_id` INT4 UNSIGNED NOT NULL,
`checksum` INT4 UNSIGNED NOT NULL,
`global_status` INT1 NOT NULL,
`global_status` INT1 NOT NULL DEFAULT -1,
`description` TEXT,
`created_on` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`)
);
Expand Down
2 changes: 2 additions & 0 deletions database/migrations/20231110155337_courses.up.sql
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ CREATE TABLE IF NOT EXISTS Courses (
`map_id` INT2 UNSIGNED NOT NULL,
`map_stage` INT1 UNSIGNED NOT NULL,
`name` VARCHAR(32),
`description` TEXT,
PRIMARY KEY (`id`),
FOREIGN KEY (`map_id`) REFERENCES Maps (`id`) ON DELETE CASCADE,
UNIQUE (`map_id`, `map_stage`),
Expand Down Expand Up @@ -36,6 +37,7 @@ CREATE TABLE IF NOT EXISTS CourseFilters (
`teleports` BOOLEAN NOT NULL,
`tier` INT1 UNSIGNED NOT NULL,
`ranked_status` INT1 NOT NULL,
`notes` TEXT,
PRIMARY KEY (`id`),
FOREIGN KEY (`course_id`) REFERENCES Courses (`id`) ON DELETE CASCADE,
FOREIGN KEY (`mode_id`) REFERENCES Modes (`id`),
Expand Down
Loading

0 comments on commit c4687a2

Please sign in to comment.