Add CalendarEvent.tags in migration

This commit is contained in:
Kalle 2022-07-28 21:37:05 +03:00
parent bbf15c2186
commit b21bd5c12d
4 changed files with 3 additions and 3 deletions

View File

@ -11,7 +11,6 @@ Calendar
- [ ] Different fields to submit depending on if future date or past date
- [ ] Edit page (add winners this way)
- [ ] Winners on the event info page
- [ ] Add "playerCount" to Tournament table
- [ ] There should be a banner on the list page if you have past tournaments to report
- [ ] On the user page tab showing past results
- [ ] Translations

View File

@ -2,12 +2,12 @@ import { dateToDatabaseTimestamp } from "~/utils/dates";
import { sql } from "../sql";
import type { CalendarEvent, CalendarEventDate, User } from "../types";
// xxx: TODO: add tags
const findAllBetweenTwoTimestampsStm = sql.prepare(`
select
"CalendarEvent"."name",
"CalendarEvent"."discordUrl",
"CalendarEvent"."bracketUrl",
"CalendarEvent"."tags",
"CalendarEventDate"."id",
"CalendarEventDate"."eventId",
"CalendarEventDate"."startTime",

View File

@ -81,7 +81,7 @@ export interface CalendarEvent {
id: number;
name: string;
authorId: number;
tags?: string; // xxx: TODO: add in migration
tags?: string;
description: string | null;
discordUrl: string | null;
bracketUrl: string | null;

View File

@ -9,6 +9,7 @@ module.exports.up = function (db) {
"discordUrl" text,
"bracketUrl" text,
"participantCount" integer,
"tags" text,
foreign key ("authorId") references "User"("id") on delete restrict
) strict
`