Skip to content

Commit

Permalink
Feat: Game crud (#2)
Browse files Browse the repository at this point in the history
* feat: game add ui

* chore: add gm column

* feat: add game

* chore: disable badge transform

* feat: update, delete game

* fix: algorithm

* chore: filter played user

* chore: container size

* update dependencies
  • Loading branch information
Simirall authored Aug 21, 2024
1 parent 4be7371 commit 0dac03c
Show file tree
Hide file tree
Showing 18 changed files with 859 additions and 74 deletions.
1 change: 1 addition & 0 deletions migrations/0002_bouncy_legion.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE `GameUsers` ADD `gm` integer NOT NULL;
199 changes: 199 additions & 0 deletions migrations/meta/0002_snapshot.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,199 @@
{
"version": "6",
"dialect": "sqlite",
"id": "f9cf0395-0599-44ce-9bf4-cf72af4fc42c",
"prevId": "41052890-ad09-43a6-baa9-0048bf340820",
"tables": {
"GameUsers": {
"name": "GameUsers",
"columns": {
"id": {
"name": "id",
"type": "integer",
"primaryKey": true,
"notNull": true,
"autoincrement": true
},
"gm": {
"name": "gm",
"type": "integer",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"gameId": {
"name": "gameId",
"type": "integer",
"primaryKey": false,
"notNull": false,
"autoincrement": false
},
"userId": {
"name": "userId",
"type": "integer",
"primaryKey": false,
"notNull": false,
"autoincrement": false
}
},
"indexes": {},
"foreignKeys": {
"GameUsers_gameId_Games_id_fk": {
"name": "GameUsers_gameId_Games_id_fk",
"tableFrom": "GameUsers",
"tableTo": "Games",
"columnsFrom": [
"gameId"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
},
"GameUsers_userId_Users_id_fk": {
"name": "GameUsers_userId_Users_id_fk",
"tableFrom": "GameUsers",
"tableTo": "Users",
"columnsFrom": [
"userId"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {}
},
"Games": {
"name": "Games",
"columns": {
"id": {
"name": "id",
"type": "integer",
"primaryKey": true,
"notNull": true,
"autoincrement": true
},
"date": {
"name": "date",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"madamisId": {
"name": "madamisId",
"type": "integer",
"primaryKey": false,
"notNull": false,
"autoincrement": false
}
},
"indexes": {},
"foreignKeys": {
"Games_madamisId_Madamis_id_fk": {
"name": "Games_madamisId_Madamis_id_fk",
"tableFrom": "Games",
"tableTo": "Madamis",
"columnsFrom": [
"madamisId"
],
"columnsTo": [
"id"
],
"onDelete": "no action",
"onUpdate": "no action"
}
},
"compositePrimaryKeys": {},
"uniqueConstraints": {}
},
"Madamis": {
"name": "Madamis",
"columns": {
"id": {
"name": "id",
"type": "integer",
"primaryKey": true,
"notNull": true,
"autoincrement": true
},
"title": {
"name": "title",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"link": {
"name": "link",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"player": {
"name": "player",
"type": "integer",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"gmRequired": {
"name": "gmRequired",
"type": "integer",
"primaryKey": false,
"notNull": true,
"autoincrement": false
}
},
"indexes": {},
"foreignKeys": {},
"compositePrimaryKeys": {},
"uniqueConstraints": {}
},
"Users": {
"name": "Users",
"columns": {
"id": {
"name": "id",
"type": "integer",
"primaryKey": true,
"notNull": true,
"autoincrement": true
},
"name": {
"name": "name",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
},
"color": {
"name": "color",
"type": "text",
"primaryKey": false,
"notNull": true,
"autoincrement": false
}
},
"indexes": {},
"foreignKeys": {},
"compositePrimaryKeys": {},
"uniqueConstraints": {}
}
},
"enums": {},
"_meta": {
"schemas": {},
"tables": {},
"columns": {}
},
"internal": {
"indexes": {}
}
}
7 changes: 7 additions & 0 deletions migrations/meta/_journal.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@
"when": 1724043283043,
"tag": "0001_classy_shard",
"breakpoints": true
},
{
"idx": 2,
"version": "6",
"when": 1724078667553,
"tag": "0002_bouncy_legion",
"breakpoints": true
}
]
}
9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,11 @@
"@hono/zod-validator": "^0.2.2",
"@hookform/resolvers": "^3.9.0",
"@mantine/core": "^7.12.1",
"@mantine/dates": "^7.12.1",
"@mantine/hooks": "^7.12.1",
"@phosphor-icons/react": "^2.1.7",
"drizzle-orm": "^0.33.0",
"hono": "^4.5.6",
"hono": "^4.5.7",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-hook-form": "^7.52.2",
Expand All @@ -29,12 +30,12 @@
"@cloudflare/workers-types": "^4.20240529.0",
"@hono/vite-cloudflare-pages": "^0.4.2",
"@hono/vite-dev-server": "^0.14.0",
"@types/react": "^18.3.3",
"@types/react": "^18.3.4",
"@types/react-dom": "^18.3.0",
"drizzle-kit": "^0.24.0",
"prettier": "^3.3.3",
"vite": "^5.2.12",
"wrangler": "^3.57.2"
"vite": "^5.4.2",
"wrangler": "^3.72.1"
},
"packageManager": "[email protected]+sha512.140036830124618d624a2187b50d04289d5a087f326c9edfc0ccd733d76c4f52c3a313d4fc148794a2a9d81553016004e6742e8cf850670268a7387fc220c903"
}
Loading

0 comments on commit 0dac03c

Please sign in to comment.