Skip to content

Commit

Permalink
Feat: Madamis crud (#1)
Browse files Browse the repository at this point in the history
* update: add madamis pl, gm column

* feat: add madamis ui

* madamis create

* feat: edit madamis

* delete madamis

* fix: ただしいgrouping routes

* feat: add loading
  • Loading branch information
Simirall authored Aug 19, 2024
1 parent efc714d commit 3ad7fc2
Show file tree
Hide file tree
Showing 19 changed files with 1,083 additions and 31 deletions.
2 changes: 2 additions & 0 deletions migrations/0001_classy_shard.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ALTER TABLE `Madamis` ADD `player` integer NOT NULL;--> statement-breakpoint
ALTER TABLE `Madamis` ADD `gmRequired` integer NOT NULL;
192 changes: 192 additions & 0 deletions migrations/meta/0001_snapshot.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,192 @@
{
"version": "6",
"dialect": "sqlite",
"id": "41052890-ad09-43a6-baa9-0048bf340820",
"prevId": "e9e38636-7650-4a2a-979b-236f8e3be152",
"tables": {
"GameUsers": {
"name": "GameUsers",
"columns": {
"id": {
"name": "id",
"type": "integer",
"primaryKey": true,
"notNull": true,
"autoincrement": true
},
"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 @@ -8,6 +8,13 @@
"when": 1723995111132,
"tag": "0000_fair_hammerhead",
"breakpoints": true
},
{
"idx": 1,
"version": "6",
"when": 1724043283043,
"tag": "0001_classy_shard",
"breakpoints": true
}
]
}
11 changes: 10 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,19 @@
},
"dependencies": {
"@hono/react-renderer": "^0.2.1",
"@hono/zod-validator": "^0.2.2",
"@hookform/resolvers": "^3.9.0",
"@mantine/core": "^7.12.1",
"@mantine/hooks": "^7.12.1",
"@phosphor-icons/react": "^2.1.7",
"drizzle-orm": "^0.33.0",
"hono": "^4.5.6",
"react": "^18.3.1",
"react-dom": "^18.3.1"
"react-dom": "^18.3.1",
"react-hook-form": "^7.52.2",
"swr": "^2.2.5",
"zod": "^3.23.8",
"zustand": "^4.5.5"
},
"devDependencies": {
"@cloudflare/workers-types": "^4.20240529.0",
Expand Down
Loading

0 comments on commit 3ad7fc2

Please sign in to comment.