This repository has been archived by the owner on Jul 31, 2024. It is now read-only.
-
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.
- Loading branch information
1 parent
e4d3166
commit 8f59a83
Showing
6 changed files
with
34 additions
and
15 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
16 changes: 16 additions & 0 deletions
16
packages/api/db/migrations/20200705082902_create_games_table.ts
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,16 @@ | ||
import Knex from "knex"; | ||
|
||
export const up = async (knex: Knex) => { | ||
return knex.schema.createTable("games", table => { | ||
table.integer("gameid").notNullable(); | ||
table.integer("userid").notNullable(); | ||
table.integer("date").notNullable(); | ||
table.integer("wpm").notNullable(); | ||
table.integer("uncorrectedwpm").notNullable(); | ||
table.integer("accuracy").notNullable(); | ||
}); | ||
}; | ||
|
||
export const down = async (knex: Knex) => { | ||
return knex.schema.dropTable("games"); | ||
}; |
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 |
---|---|---|
|
@@ -4,6 +4,7 @@ interface Users { | |
password: string; | ||
role?: string | null; | ||
description?: string | null; | ||
rank: number; | ||
} | ||
|
||
export default [ | ||
|
@@ -12,27 +13,31 @@ export default [ | |
email: "[email protected]", | ||
password: "UserPass", | ||
role: "admin", | ||
description: null | ||
description: null, | ||
rank: 8 | ||
}, | ||
{ | ||
name: "MKGUN3", | ||
email: "[email protected]", | ||
password: "MaoGay", | ||
role: null, | ||
description: null | ||
role: "member", | ||
description: null, | ||
rank: 4 | ||
}, | ||
{ | ||
name: "NotAUser", | ||
email: "[email protected]", | ||
password: "nothing", | ||
role: null, | ||
description: null | ||
role: "member", | ||
description: null, | ||
rank: 2 | ||
}, | ||
{ | ||
name: "Guy2", | ||
email: "[email protected]", | ||
password: "JustAGuy", | ||
role: null, | ||
description: "But hey, I have a description!" | ||
role: "member", | ||
description: "But hey, I have a description!", | ||
rank: 0 | ||
} | ||
] as readonly Users[]; |
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 was deleted.
Oops, something went wrong.
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