From fe465982ade56c948e05d7a191a04d8050bdceb7 Mon Sep 17 00:00:00 2001 From: WildEgo Date: Thu, 5 Jun 2025 23:56:02 +0100 Subject: [PATCH] add: Proper i18n. fix: Migrations, Page names. --- .vscode/launch.json | 12 + bun.lock | 48 +- drizzle/0001_init.sql | 458 +- drizzle/0003_worried_hex.sql | 30 - drizzle/0004_mysterious_wallop.sql | 2 - drizzle/meta/0001_snapshot.json | 3155 ++++++---- drizzle/meta/0002_snapshot.json | 3157 ++++++---- drizzle/meta/0003_snapshot.json | 7032 ---------------------- drizzle/meta/0004_snapshot.json | 7032 ---------------------- drizzle/meta/_journal.json | 18 +- messages/de.json | 125 + messages/en.json | 125 + messages/pt.json | 125 + messages/ro.json | 125 + package.json | 15 +- project.inlang/project_id | 2 +- project.inlang/settings.json | 6 +- src/components/login/form.tsx | 29 +- src/db/relations.ts | 30 +- src/db/schema/log.ts | 4 +- src/db/schema/player.ts | 8 +- src/db/schema/web.ts | 33 +- src/lib/actions/auth.ts | 5 +- src/lib/actions/password.ts | 3 +- src/lib/actions/profile.ts | 9 +- src/lib/actions/test.ts | 14 +- src/lib/i18n/locale-middleware.ts | 30 +- src/lib/utils/http.ts | 25 +- src/routeTree.gen.ts | 210 +- src/routes/__root.tsx | 59 +- src/routes/api/users.$id.ts | 28 - src/routes/api/users.ts | 19 - src/routes/download.tsx | 9 + src/routes/forgot-password.tsx | 42 +- src/routes/index.tsx | 6 +- src/routes/profile/change-email.tsx | 108 +- src/routes/profile/change-password.tsx | 127 +- src/routes/profile/index.tsx | 17 +- src/routes/rankings/guilds.tsx | 9 + src/routes/rankings/players.tsx | 9 + src/routes/reset-password.tsx | 46 +- src/routes/{login.tsx => sign-in.tsx} | 4 +- src/routes/{register.tsx => sign-up.tsx} | 40 +- src/routes/support/index.tsx | 9 + 44 files changed, 5212 insertions(+), 17187 deletions(-) create mode 100644 .vscode/launch.json delete mode 100644 drizzle/0003_worried_hex.sql delete mode 100644 drizzle/0004_mysterious_wallop.sql delete mode 100644 drizzle/meta/0003_snapshot.json delete mode 100644 drizzle/meta/0004_snapshot.json create mode 100644 messages/de.json create mode 100644 messages/en.json create mode 100644 messages/pt.json create mode 100644 messages/ro.json delete mode 100644 src/routes/api/users.$id.ts delete mode 100644 src/routes/api/users.ts create mode 100644 src/routes/download.tsx create mode 100644 src/routes/rankings/guilds.tsx create mode 100644 src/routes/rankings/players.tsx rename src/routes/{login.tsx => sign-in.tsx} (78%) rename src/routes/{register.tsx => sign-up.tsx} (71%) create mode 100644 src/routes/support/index.tsx diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..9467abf --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,12 @@ +{ + "configurations": [ + { + "type": "cmake", + "request": "launch", + "name": "Debug portfile(s)", + "cmakeDebugType": "external", + "pipeName": "/tmp/vcpkg_ext_portfile_dbg", + "preLaunchTask": "Debug vcpkg commands" + } + ] +} \ No newline at end of file diff --git a/bun.lock b/bun.lock index 339c723..84c457f 100644 --- a/bun.lock +++ b/bun.lock @@ -35,8 +35,8 @@ "@radix-ui/react-tooltip": "^1.2.7", "@react-email/components": "0.0.41", "@tailwindcss/postcss": "^4.1.8", - "@tanstack/react-query": "^5.80.3", - "@tanstack/react-query-devtools": "^5.80.3", + "@tanstack/react-query": "^5.80.6", + "@tanstack/react-query-devtools": "^5.80.6", "@tanstack/react-router": "^1.120.15", "@tanstack/react-router-devtools": "^1.120.15", "@tanstack/react-start": "^1.120.15", @@ -68,7 +68,7 @@ "devDependencies": { "@biomejs/biome": "1.9.4", "@inlang/cli": "^3.0.11", - "@inlang/paraglide-js": "^2.0.13", + "@inlang/paraglide-js": "2.0.13", "@tanstack/eslint-plugin-query": "^5.78.0", "@types/bun": "^1.2.15", "@types/nodemailer": "^6.4.17", @@ -691,29 +691,29 @@ "@tanstack/history": ["@tanstack/history@1.115.0", "", {}, "sha512-K7JJNrRVvyjAVnbXOH2XLRhFXDkeP54Kt2P4FR1Kl2KDGlIbkua5VqZQD2rot3qaDrpufyUa63nuLai1kOLTsQ=="], - "@tanstack/query-core": ["@tanstack/query-core@5.80.2", "", {}, "sha512-g2Es97uwFk7omkWiH9JmtLWSA8lTUFVseIyzqbjqJEEx7qN+Hg6jbBdDvelqtakamppaJtGORQ64hEJ5S6ojSg=="], + "@tanstack/query-core": ["@tanstack/query-core@5.80.6", "", {}, "sha512-nl7YxT/TAU+VTf+e2zTkObGTyY8YZBMnbgeA1ee66lIVqzKlYursAII6z5t0e6rXgwUMJSV4dshBTNacNpZHbQ=="], "@tanstack/query-devtools": ["@tanstack/query-devtools@5.80.0", "", {}, "sha512-D6gH4asyjaoXrCOt5vG5Og/YSj0D/TxwNQgtLJIgWbhbWCC/emu2E92EFoVHh4ppVWg1qT2gKHvKyQBEFZhCuA=="], - "@tanstack/react-query": ["@tanstack/react-query@5.80.3", "", { "dependencies": { "@tanstack/query-core": "5.80.2" }, "peerDependencies": { "react": "^18 || ^19" } }, "sha512-psqr/QRzYfqJvgD8F2teMO6mL4hN4gzkOra9BlPplNhwByviZIhHUrWTXQEMmUdPWHNkGjA1SP6xG2+brhmIoQ=="], + "@tanstack/react-query": ["@tanstack/react-query@5.80.6", "", { "dependencies": { "@tanstack/query-core": "5.80.6" }, "peerDependencies": { "react": "^18 || ^19" } }, "sha512-izX+5CnkpON3NQGcEm3/d7LfFQNo9ZpFtX2QsINgCYK9LT2VCIdi8D3bMaMSNhrAJCznRoAkFic76uvLroALBw=="], - "@tanstack/react-query-devtools": ["@tanstack/react-query-devtools@5.80.3", "", { "dependencies": { "@tanstack/query-devtools": "5.80.0" }, "peerDependencies": { "@tanstack/react-query": "^5.80.3", "react": "^18 || ^19" } }, "sha512-WfoTdSd/SvBL7BJQzr2iQ8XGhMTw9hnKQn96ztG53Hm3AzWyvDrG8FoAPpwIE6c/f9+kmFGCxMvvTVueAy+0Gw=="], + "@tanstack/react-query-devtools": ["@tanstack/react-query-devtools@5.80.6", "", { "dependencies": { "@tanstack/query-devtools": "5.80.0" }, "peerDependencies": { "@tanstack/react-query": "^5.80.6", "react": "^18 || ^19" } }, "sha512-y7Es0OJ4RYQxrPYsuuQP0jxjgJ40a03UbEPmJ6vwf/ERVMRoRIMkpjtvPxf1D+n9nwPfWmGdD0jW8Wxd+TxeEw=="], - "@tanstack/react-router": ["@tanstack/react-router@1.120.15", "", { "dependencies": { "@tanstack/history": "1.115.0", "@tanstack/react-store": "^0.7.0", "@tanstack/router-core": "1.120.15", "jsesc": "^3.1.0", "tiny-invariant": "^1.3.3", "tiny-warning": "^1.0.3" }, "peerDependencies": { "react": ">=18.0.0 || >=19.0.0", "react-dom": ">=18.0.0 || >=19.0.0" } }, "sha512-apzBmXh4pHwqUGU3kD8y2FJMi7rVoUbRxh5oV7v8kEb6Aq5Xpdo+OcpThw8h/M2zv7v4Ef8IoY6WFCKKu3HBjQ=="], + "@tanstack/react-router": ["@tanstack/react-router@1.120.16", "", { "dependencies": { "@tanstack/history": "1.115.0", "@tanstack/react-store": "^0.7.0", "@tanstack/router-core": "1.120.15", "jsesc": "^3.1.0", "tiny-invariant": "^1.3.3", "tiny-warning": "^1.0.3" }, "peerDependencies": { "react": ">=18.0.0 || >=19.0.0", "react-dom": ">=18.0.0 || >=19.0.0" } }, "sha512-bBZ+H9sBYcihsj1BkcxD/VtVxa5ZGmCEeYXlCAgWQ9fWc1kN+tA0/M2uvjLFuhsESDmv5U45TittBtHAwAgEAA=="], - "@tanstack/react-router-devtools": ["@tanstack/react-router-devtools@1.120.15", "", { "dependencies": { "@tanstack/router-devtools-core": "^1.120.15", "solid-js": "^1.9.5" }, "peerDependencies": { "@tanstack/react-router": "^1.120.15", "react": ">=18.0.0 || >=19.0.0", "react-dom": ">=18.0.0 || >=19.0.0" } }, "sha512-5KcUXc3fkiLo/6Y56gOM3JqmYXG1ElIH2iyUWuG5IlcegLrpXhu4OBQ+8Q4+62CD0OKy0ifUDyemrCOAEOfCvw=="], + "@tanstack/react-router-devtools": ["@tanstack/react-router-devtools@1.120.16", "", { "dependencies": { "@tanstack/router-devtools-core": "^1.120.15", "solid-js": "^1.9.5" }, "peerDependencies": { "@tanstack/react-router": "^1.120.16", "react": ">=18.0.0 || >=19.0.0", "react-dom": ">=18.0.0 || >=19.0.0" } }, "sha512-DWXmMLknVJJMGP2k5yeUWBDhJOHbV2jVfnZKxtGzA64xXhwDFgU9qpodcmYSq3+kHWsKrd7iX0wc7d27rGwGDA=="], - "@tanstack/react-start": ["@tanstack/react-start@1.120.15", "", { "dependencies": { "@tanstack/react-start-client": "^1.120.15", "@tanstack/react-start-config": "^1.120.15", "@tanstack/react-start-router-manifest": "^1.120.15", "@tanstack/react-start-server": "^1.120.15", "@tanstack/start-api-routes": "^1.120.15", "@tanstack/start-server-functions-client": "^1.120.15", "@tanstack/start-server-functions-handler": "^1.120.15", "@tanstack/start-server-functions-server": "^1.119.2", "@tanstack/start-server-functions-ssr": "^1.120.15" }, "peerDependencies": { "react": ">=18.0.0 || >=19.0.0", "react-dom": ">=18.0.0 || >=19.0.0", "vite": "^6.0.0" } }, "sha512-xhhhfnC06JaT08k75IdoLjYLgdXCG7KNAAkPVNySImfLKEv0zJHJPbgh719ZDGSFtTNTQs0SfgH/XkzbVM3IKA=="], + "@tanstack/react-start": ["@tanstack/react-start@1.120.16", "", { "dependencies": { "@tanstack/react-start-client": "^1.120.16", "@tanstack/react-start-config": "^1.120.16", "@tanstack/react-start-router-manifest": "^1.120.15", "@tanstack/react-start-server": "^1.120.16", "@tanstack/start-api-routes": "^1.120.16", "@tanstack/start-server-functions-client": "^1.120.16", "@tanstack/start-server-functions-handler": "^1.120.16", "@tanstack/start-server-functions-server": "^1.119.2", "@tanstack/start-server-functions-ssr": "^1.120.16" }, "peerDependencies": { "react": ">=18.0.0 || >=19.0.0", "react-dom": ">=18.0.0 || >=19.0.0", "vite": "^6.0.0" } }, "sha512-tW8pR9k/4sy2HbBdky5dNI7bq9/BPrbOtcZeaifXn72QdWH3yF5yZPswZBraFTBQB+QP9J/Fya0NwUXL9k6cyA=="], - "@tanstack/react-start-client": ["@tanstack/react-start-client@1.120.15", "", { "dependencies": { "@tanstack/react-router": "^1.120.15", "@tanstack/router-core": "^1.120.15", "@tanstack/start-client-core": "^1.120.15", "cookie-es": "^1.2.2", "jsesc": "^3.1.0", "tiny-invariant": "^1.3.3", "tiny-warning": "^1.0.3", "vinxi": "^0.5.3" }, "peerDependencies": { "react": ">=18.0.0 || >=19.0.0", "react-dom": ">=18.0.0 || >=19.0.0" } }, "sha512-UCIRHB2/Es8uZIce/btI218qqsmVTW5NBOlt6A6m3F++s4nrhYlP3E2FEj/RX7rhXrOB4gjj99tAz/jjR/sVXw=="], + "@tanstack/react-start-client": ["@tanstack/react-start-client@1.120.16", "", { "dependencies": { "@tanstack/react-router": "^1.120.16", "@tanstack/router-core": "^1.120.15", "@tanstack/start-client-core": "^1.120.16", "cookie-es": "^1.2.2", "jsesc": "^3.1.0", "tiny-invariant": "^1.3.3", "tiny-warning": "^1.0.3", "vinxi": "^0.5.3" }, "peerDependencies": { "react": ">=18.0.0 || >=19.0.0", "react-dom": ">=18.0.0 || >=19.0.0" } }, "sha512-aHtaYboWkQnmj2s9ntCsRjCdZKRuUjy06M7Cm9wXtKul4NAWpuD+L90VKjajt1UQKd0Y5uCrMS4OiMj3BsCHAg=="], - "@tanstack/react-start-config": ["@tanstack/react-start-config@1.120.15", "", { "dependencies": { "@tanstack/react-start-plugin": "^1.115.0", "@tanstack/router-core": "^1.120.15", "@tanstack/router-generator": "^1.120.15", "@tanstack/router-plugin": "^1.120.15", "@tanstack/server-functions-plugin": "^1.119.2", "@tanstack/start-server-functions-handler": "^1.120.15", "@vitejs/plugin-react": "^4.3.4", "import-meta-resolve": "^4.1.0", "nitropack": "^2.10.4", "ofetch": "^1.4.1", "vinxi": "0.5.3", "vite": "^6.1.0", "zod": "^3.24.2" }, "peerDependencies": { "react": ">=18.0.0 || >=19.0.0", "react-dom": ">=18.0.0 || >=19.0.0" } }, "sha512-A9/4IQkFwhR15rb5KbTfUYUpossQM8MpBMTZs5xAoucC8rAsMoBPiiWZN6g/A1YN/xkDn/ghNhAxFfnOUhWDJA=="], + "@tanstack/react-start-config": ["@tanstack/react-start-config@1.120.16", "", { "dependencies": { "@tanstack/react-start-plugin": "^1.115.0", "@tanstack/router-core": "^1.120.15", "@tanstack/router-generator": "^1.120.16", "@tanstack/router-plugin": "^1.120.16", "@tanstack/server-functions-plugin": "^1.119.2", "@tanstack/start-server-functions-handler": "^1.120.16", "@vitejs/plugin-react": "^4.3.4", "import-meta-resolve": "^4.1.0", "nitropack": "^2.10.4", "ofetch": "^1.4.1", "vinxi": "0.5.3", "vite": "^6.1.0", "zod": "^3.24.2" }, "peerDependencies": { "react": ">=18.0.0 || >=19.0.0", "react-dom": ">=18.0.0 || >=19.0.0" } }, "sha512-7wdn+Ny/zHOLcdwDscyAomsR5cZqo+aCmxeCUogyYzfglwyh2iMpMzcxax25A0tZWA8F55f/xAgZ5tjjwhdcWw=="], "@tanstack/react-start-plugin": ["@tanstack/react-start-plugin@1.115.0", "", { "dependencies": { "@babel/code-frame": "7.26.2", "@babel/core": "^7.26.8", "@babel/plugin-syntax-jsx": "^7.25.9", "@babel/plugin-syntax-typescript": "^7.25.9", "@babel/template": "^7.26.8", "@babel/traverse": "^7.26.8", "@babel/types": "^7.26.8", "@tanstack/router-utils": "^1.115.0", "babel-dead-code-elimination": "^1.0.10", "tiny-invariant": "^1.3.3", "vite": "6.1.4" } }, "sha512-5ltCwlAV5XOz7x/IFoOT1992gITfkygd5BdIexN990prNpvjDiOsNwJtrSEg9rge4XCuAbSK3jtxFh4Qy0l0zA=="], "@tanstack/react-start-router-manifest": ["@tanstack/react-start-router-manifest@1.120.15", "", { "dependencies": { "@tanstack/router-core": "^1.120.15", "tiny-invariant": "^1.3.3", "vinxi": "0.5.3" } }, "sha512-dyL0cKiihkqIy4IqzRiTAfoB7zvbPpSOM7kzyioD5ovb41ZhQ4ksN1yF/SmaLvEJSmNor4rnnNDJf4Q0VMTz+Q=="], - "@tanstack/react-start-server": ["@tanstack/react-start-server@1.120.15", "", { "dependencies": { "@tanstack/history": "^1.115.0", "@tanstack/react-router": "^1.120.15", "@tanstack/router-core": "^1.120.15", "@tanstack/start-client-core": "^1.120.15", "@tanstack/start-server-core": "^1.120.15", "h3": "1.13.0", "isbot": "^5.1.22", "jsesc": "^3.1.0", "tiny-warning": "^1.0.3", "unctx": "^2.4.1" }, "peerDependencies": { "react": ">=18.0.0 || >=19.0.0", "react-dom": ">=18.0.0 || >=19.0.0" } }, "sha512-oUeCbbOILfACwgkbp2jDpAXjU7aSQY8WWa2QmH3iv2IjqI+fP11rtpQ3XRG6/A9/+nNXUKPzGOHFP0yuB1fAgw=="], + "@tanstack/react-start-server": ["@tanstack/react-start-server@1.120.16", "", { "dependencies": { "@tanstack/history": "^1.115.0", "@tanstack/react-router": "^1.120.16", "@tanstack/router-core": "^1.120.15", "@tanstack/start-client-core": "^1.120.16", "@tanstack/start-server-core": "^1.120.16", "h3": "1.13.0", "isbot": "^5.1.22", "jsesc": "^3.1.0", "tiny-warning": "^1.0.3", "unctx": "^2.4.1" }, "peerDependencies": { "react": ">=18.0.0 || >=19.0.0", "react-dom": ">=18.0.0 || >=19.0.0" } }, "sha512-21bWbU4C8tY7li1NRU7Ft5e7fLcs8WvLZKRcpo4gbCWLcy5MhDDjHJLrg6H6UgvgemWVZ6qwy4SJ7IXRjR3FPw=="], "@tanstack/react-store": ["@tanstack/react-store@0.7.0", "", { "dependencies": { "@tanstack/store": "0.7.0", "use-sync-external-store": "^1.4.0" }, "peerDependencies": { "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0", "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" } }, "sha512-S/Rq17HaGOk+tQHV/yrePMnG1xbsKZIl/VsNWnNXt4XW+tTY8dTlvpJH2ZQ3GRALsusG5K6Q3unAGJ2pd9W/Ng=="], @@ -723,29 +723,29 @@ "@tanstack/router-devtools-core": ["@tanstack/router-devtools-core@1.120.15", "", { "dependencies": { "clsx": "^2.1.1", "goober": "^2.1.16" }, "peerDependencies": { "@tanstack/router-core": "^1.120.15", "csstype": "^3.0.10", "solid-js": ">=1.9.5", "tiny-invariant": "^1.3.3" }, "optionalPeers": ["csstype"] }, "sha512-AT9obPHKpJqnHMbwshozSy6sApg5LchiAll3blpS3MMDybUCidYHrdhe9MZJLmlC99IQiEGmuZERP3VRcuPNHg=="], - "@tanstack/router-generator": ["@tanstack/router-generator@1.120.15", "", { "dependencies": { "@tanstack/virtual-file-routes": "^1.115.0", "prettier": "^3.5.0", "tsx": "^4.19.2", "zod": "^3.24.2" }, "peerDependencies": { "@tanstack/react-router": "^1.120.15" }, "optionalPeers": ["@tanstack/react-router"] }, "sha512-QwZ0rNXxzgOEUDRRAEWVjofKxuxSMIYEdYC3z20k6a7jkLC6pnlCORFx41Vf4xVCO6eElqlrUKXWLTleYSsvQw=="], + "@tanstack/router-generator": ["@tanstack/router-generator@1.120.16", "", { "dependencies": { "@tanstack/virtual-file-routes": "^1.115.0", "prettier": "^3.5.0", "tsx": "^4.19.2", "zod": "^3.24.2" }, "peerDependencies": { "@tanstack/react-router": "^1.120.16" }, "optionalPeers": ["@tanstack/react-router"] }, "sha512-ekCcIPk76Nj17ZOpiRmyDhZNmE06tPSQvu19TWQi6797dDChDCozed7cQbdn8qkuo84SjBhl0r087GTUkksbDg=="], - "@tanstack/router-plugin": ["@tanstack/router-plugin@1.120.15", "", { "dependencies": { "@babel/core": "^7.26.8", "@babel/plugin-syntax-jsx": "^7.25.9", "@babel/plugin-syntax-typescript": "^7.25.9", "@babel/template": "^7.26.8", "@babel/traverse": "^7.26.8", "@babel/types": "^7.26.8", "@tanstack/router-core": "^1.120.15", "@tanstack/router-generator": "^1.120.15", "@tanstack/router-utils": "^1.115.0", "@tanstack/virtual-file-routes": "^1.115.0", "@types/babel__core": "^7.20.5", "@types/babel__template": "^7.4.4", "@types/babel__traverse": "^7.20.6", "babel-dead-code-elimination": "^1.0.10", "chokidar": "^3.6.0", "unplugin": "^2.1.2", "zod": "^3.24.2" }, "peerDependencies": { "@rsbuild/core": ">=1.0.2", "@tanstack/react-router": "^1.120.15", "vite": ">=5.0.0 || >=6.0.0", "vite-plugin-solid": "^2.11.2", "webpack": ">=5.92.0" }, "optionalPeers": ["@rsbuild/core", "@tanstack/react-router", "vite", "vite-plugin-solid", "webpack"] }, "sha512-ARuuPRKO5HzN3V0LzmkIGm0e447t5VCy2ijbUnzd08KjcJm3lG221ViC2qI+vTom1zp6yeNZHfJW1LBh1yLrTw=="], + "@tanstack/router-plugin": ["@tanstack/router-plugin@1.120.16", "", { "dependencies": { "@babel/core": "^7.26.8", "@babel/plugin-syntax-jsx": "^7.25.9", "@babel/plugin-syntax-typescript": "^7.25.9", "@babel/template": "^7.26.8", "@babel/traverse": "^7.26.8", "@babel/types": "^7.26.8", "@tanstack/router-core": "^1.120.15", "@tanstack/router-generator": "^1.120.16", "@tanstack/router-utils": "^1.115.0", "@tanstack/virtual-file-routes": "^1.115.0", "@types/babel__core": "^7.20.5", "@types/babel__template": "^7.4.4", "@types/babel__traverse": "^7.20.6", "babel-dead-code-elimination": "^1.0.10", "chokidar": "^3.6.0", "unplugin": "^2.1.2", "zod": "^3.24.2" }, "peerDependencies": { "@rsbuild/core": ">=1.0.2", "@tanstack/react-router": "^1.120.16", "vite": ">=5.0.0 || >=6.0.0", "vite-plugin-solid": "^2.11.2", "webpack": ">=5.92.0" }, "optionalPeers": ["@rsbuild/core", "@tanstack/react-router", "vite", "vite-plugin-solid", "webpack"] }, "sha512-p++CuH8FHFToueAuxwyd+vkRm5JNhJoCl47qxZLHa91iZvUwF9i0AbGYVWKXObo0EhYdVIGn4xhisPcOq872Eg=="], "@tanstack/router-utils": ["@tanstack/router-utils@1.115.0", "", { "dependencies": { "@babel/generator": "^7.26.8", "@babel/parser": "^7.26.8", "ansis": "^3.11.0", "diff": "^7.0.0" } }, "sha512-Dng4y+uLR9b5zPGg7dHReHOTHQa6x+G6nCoZshsDtWrYsrdCcJEtLyhwZ5wG8OyYS6dVr/Cn+E5Bd2b6BhJ89w=="], "@tanstack/server-functions-plugin": ["@tanstack/server-functions-plugin@1.119.2", "", { "dependencies": { "@babel/code-frame": "7.26.2", "@babel/core": "^7.26.8", "@babel/plugin-syntax-jsx": "^7.25.9", "@babel/plugin-syntax-typescript": "^7.25.9", "@babel/template": "^7.26.8", "@babel/traverse": "^7.26.8", "@babel/types": "^7.26.8", "@tanstack/directive-functions-plugin": "1.119.2", "babel-dead-code-elimination": "^1.0.9", "dedent": "^1.5.3", "tiny-invariant": "^1.3.3" } }, "sha512-ramMedB4yt+fhFHio3GqRLUQVwKBEBREnHEVetHEYHLe6h+qYEwaVxQrQ75J+dTTWXa14DLadtgR3ygEydtfqA=="], - "@tanstack/start-api-routes": ["@tanstack/start-api-routes@1.120.15", "", { "dependencies": { "@tanstack/router-core": "^1.120.15", "@tanstack/start-server-core": "^1.120.15", "vinxi": "0.5.3" } }, "sha512-AKxT1he6PstiyfNAP7YHotM1hpQzQfl0WwMO4L4MDi2JG2q8Mm4630xuOe5TkdWMIC38RZeSPE2V33xXiLZ+tA=="], + "@tanstack/start-api-routes": ["@tanstack/start-api-routes@1.120.16", "", { "dependencies": { "@tanstack/router-core": "^1.120.15", "@tanstack/start-server-core": "^1.120.16", "vinxi": "0.5.3" } }, "sha512-aledP0KV6ibMCq0ya7ESs/23+5pPI98e0mzZVidaYBHN/4nvhmLf4W2KFdTmE6czY8CsejTo+Q74a3L+3ZMgKw=="], - "@tanstack/start-client-core": ["@tanstack/start-client-core@1.120.15", "", { "dependencies": { "@tanstack/router-core": "^1.120.15", "cookie-es": "^1.2.2", "tiny-invariant": "^1.3.3", "tiny-warning": "^1.0.3" } }, "sha512-R21uRzjqbds0aMK8ZQ12yIxyyh5pNqtv8/dg9dp44Hl6jfb3wBNfo1kAiJErBDRF50ITJJLQ7sGDIualtcdKbQ=="], + "@tanstack/start-client-core": ["@tanstack/start-client-core@1.120.16", "", { "dependencies": { "@tanstack/router-core": "^1.120.15", "cookie-es": "^1.2.2", "tiny-invariant": "^1.3.3", "tiny-warning": "^1.0.3" } }, "sha512-GSPfC41tP3KP+JI6c0tlQJlJTlzQ/9k2dY91JhT3bqgoIcB9rXi+eKqW3dHBWmq4zHCRWtmom+khV4Cn61QLQQ=="], - "@tanstack/start-server-core": ["@tanstack/start-server-core@1.120.15", "", { "dependencies": { "@tanstack/history": "^1.115.0", "@tanstack/router-core": "^1.120.15", "@tanstack/start-client-core": "^1.120.15", "h3": "1.13.0", "isbot": "^5.1.22", "jsesc": "^3.1.0", "tiny-warning": "^1.0.3", "unctx": "^2.4.1" } }, "sha512-om+jDeBEXI2ckrdNNDFahDI2K+mYJhBYNGJd1QLLdO8E5+16kHuOWwi7wTZD8XB6TbZEoqz4weOJF4l0kldRgA=="], + "@tanstack/start-server-core": ["@tanstack/start-server-core@1.120.16", "", { "dependencies": { "@tanstack/history": "^1.115.0", "@tanstack/router-core": "^1.120.15", "@tanstack/start-client-core": "^1.120.16", "h3": "1.13.0", "isbot": "^5.1.22", "jsesc": "^3.1.0", "tiny-warning": "^1.0.3", "unctx": "^2.4.1" } }, "sha512-D/zXMkjbr5IPEdMxXC8KNJXGVX8g92BCECd6t28Pzw7O+Ng3S8VWz674Xhb40sFit4c4Z2n3QhwNSikWN0I43w=="], - "@tanstack/start-server-functions-client": ["@tanstack/start-server-functions-client@1.120.15", "", { "dependencies": { "@tanstack/server-functions-plugin": "^1.119.2", "@tanstack/start-server-functions-fetcher": "^1.120.15" } }, "sha512-OG7D8+fUs9kStF1JNmgLSyg9sjSE+hsfH2ly+JqDsBUFYb9pu8vjTxaQNMJxCZcpgbG9NwGqbQQ3Upa1Kb4Oog=="], + "@tanstack/start-server-functions-client": ["@tanstack/start-server-functions-client@1.120.16", "", { "dependencies": { "@tanstack/server-functions-plugin": "^1.119.2", "@tanstack/start-server-functions-fetcher": "^1.120.16" } }, "sha512-1XTP1C0fqd+WXOKKzaP7c93Z/BN2NJqaXU7Bx+Iye+KGETbBbq88J+bBtbWXci5dY3nQ7J+d5LOMaeS5HjFpgw=="], - "@tanstack/start-server-functions-fetcher": ["@tanstack/start-server-functions-fetcher@1.120.15", "", { "dependencies": { "@tanstack/router-core": "^1.120.15", "@tanstack/start-client-core": "^1.120.15" } }, "sha512-ZThhU9ya7ACcKy7QXWNE8mQYBeWWKpx7XxncDblzezkMQvAddsldG5ez3K4I1ZdPR49ySjHxlhgLHLdVX86mOg=="], + "@tanstack/start-server-functions-fetcher": ["@tanstack/start-server-functions-fetcher@1.120.16", "", { "dependencies": { "@tanstack/router-core": "^1.120.15", "@tanstack/start-client-core": "^1.120.16" } }, "sha512-YT/gZMvbgjx3KlJHfMV8ZgOr9rCksko5/jWAugxF+GLRZaERT42qnWO94s0TDACJYmFPokaMiuu0KROUssHBNg=="], - "@tanstack/start-server-functions-handler": ["@tanstack/start-server-functions-handler@1.120.15", "", { "dependencies": { "@tanstack/router-core": "^1.120.15", "@tanstack/start-client-core": "^1.120.15", "@tanstack/start-server-core": "^1.120.15", "tiny-invariant": "^1.3.3" } }, "sha512-j61H8JCaVV0TKPMazQKTxtCr9bulQ3oJNYTidOdSgY+CKOZRAfPUINXZl/CDQOTSwAYmMAiroeSR7BwUPq26pg=="], + "@tanstack/start-server-functions-handler": ["@tanstack/start-server-functions-handler@1.120.16", "", { "dependencies": { "@tanstack/router-core": "^1.120.15", "@tanstack/start-client-core": "^1.120.16", "@tanstack/start-server-core": "^1.120.16", "tiny-invariant": "^1.3.3" } }, "sha512-aAOk5nvrTubMjJoMnhgrv8DhkAm2LIsDCk/aqJ9qV4SoUXWY7fVoCKawBOv3C/npkd/F9XB7uAmADwD/LGV6Kw=="], "@tanstack/start-server-functions-server": ["@tanstack/start-server-functions-server@1.119.2", "", { "dependencies": { "@tanstack/server-functions-plugin": "^1.119.2", "tiny-invariant": "^1.3.3" } }, "sha512-wosjaLvWhVeNCg+RRl2Q7Wl0TliQUBPlqhoG9BBN5uLNmsW+iKeFuzctaXoCB0sKkloz9gjtoJRxPyFY2LpkxQ=="], - "@tanstack/start-server-functions-ssr": ["@tanstack/start-server-functions-ssr@1.120.15", "", { "dependencies": { "@tanstack/server-functions-plugin": "^1.119.2", "@tanstack/start-client-core": "^1.120.15", "@tanstack/start-server-core": "^1.120.15", "@tanstack/start-server-functions-fetcher": "^1.120.15", "tiny-invariant": "^1.3.3" } }, "sha512-fjMX84yEcAF+K29jnXCYc5PdrZh1W4vLTooWzBjryPpHlju25/YxpCjV2mMB9yP0Ri8xgQHg5xD7ucn2yw1Dyw=="], + "@tanstack/start-server-functions-ssr": ["@tanstack/start-server-functions-ssr@1.120.16", "", { "dependencies": { "@tanstack/server-functions-plugin": "^1.119.2", "@tanstack/start-client-core": "^1.120.16", "@tanstack/start-server-core": "^1.120.16", "@tanstack/start-server-functions-fetcher": "^1.120.16", "tiny-invariant": "^1.3.3" } }, "sha512-MbbJSbW+xU8z0oyxCs6rhyJSb3PttO1+k6iQrgXYeoTEU3r1uxZQZCK3OXXmh8THh05vrIlpDIjdMl1tpPgk5g=="], "@tanstack/store": ["@tanstack/store@0.7.0", "", {}, "sha512-CNIhdoUsmD2NolYuaIs8VfWM467RK6oIBAW4nPEKZhg1smZ+/CwtCdpURgp7nxSqOaV9oKkzdWD80+bC66F/Jg=="], @@ -2213,18 +2213,12 @@ "@tanstack/directive-functions-plugin/vite": ["vite@6.1.4", "", { "dependencies": { "esbuild": "^0.24.2", "postcss": "^8.5.2", "rollup": "^4.30.1" }, "optionalDependencies": { "fsevents": "~2.3.3" }, "peerDependencies": { "@types/node": "^18.0.0 || ^20.0.0 || >=22.0.0", "jiti": ">=1.21.0", "less": "*", "lightningcss": "^1.21.0", "sass": "*", "sass-embedded": "*", "stylus": "*", "sugarss": "*", "terser": "^5.16.0", "tsx": "^4.8.1", "yaml": "^2.4.2" }, "optionalPeers": ["@types/node", "jiti", "less", "lightningcss", "sass", "sass-embedded", "stylus", "sugarss", "terser", "tsx", "yaml"], "bin": { "vite": "bin/vite.js" } }, "sha512-VzONrF/qqEg/JBwHXBJdVSmBZBhwiPGinyUb0SQLByqQwi6o8UvX5TWLkpvkq3tvN8Cr273ieZDt36CGwWRMvA=="], - "@tanstack/react-start-config/zod": ["zod@3.25.49", "", {}, "sha512-JMMPMy9ZBk3XFEdbM3iL1brx4NUSejd6xr3ELrrGEfGb355gjhiAWtG3K5o+AViV/3ZfkIrCzXsZn6SbLwTR8Q=="], - "@tanstack/react-start-plugin/@babel/code-frame": ["@babel/code-frame@7.26.2", "", { "dependencies": { "@babel/helper-validator-identifier": "^7.25.9", "js-tokens": "^4.0.0", "picocolors": "^1.0.0" } }, "sha512-RJlIHRueQgwWitWgF8OdFYGZX328Ax5BCemNGlqHfplnRT9ESi8JkFlvaVYbS+UubVY6dpv87Fs2u5M29iNFVQ=="], "@tanstack/react-start-plugin/vite": ["vite@6.1.4", "", { "dependencies": { "esbuild": "^0.24.2", "postcss": "^8.5.2", "rollup": "^4.30.1" }, "optionalDependencies": { "fsevents": "~2.3.3" }, "peerDependencies": { "@types/node": "^18.0.0 || ^20.0.0 || >=22.0.0", "jiti": ">=1.21.0", "less": "*", "lightningcss": "^1.21.0", "sass": "*", "sass-embedded": "*", "stylus": "*", "sugarss": "*", "terser": "^5.16.0", "tsx": "^4.8.1", "yaml": "^2.4.2" }, "optionalPeers": ["@types/node", "jiti", "less", "lightningcss", "sass", "sass-embedded", "stylus", "sugarss", "terser", "tsx", "yaml"], "bin": { "vite": "bin/vite.js" } }, "sha512-VzONrF/qqEg/JBwHXBJdVSmBZBhwiPGinyUb0SQLByqQwi6o8UvX5TWLkpvkq3tvN8Cr273ieZDt36CGwWRMvA=="], - "@tanstack/router-generator/zod": ["zod@3.25.49", "", {}, "sha512-JMMPMy9ZBk3XFEdbM3iL1brx4NUSejd6xr3ELrrGEfGb355gjhiAWtG3K5o+AViV/3ZfkIrCzXsZn6SbLwTR8Q=="], - "@tanstack/router-plugin/chokidar": ["chokidar@3.6.0", "", { "dependencies": { "anymatch": "~3.1.2", "braces": "~3.0.2", "glob-parent": "~5.1.2", "is-binary-path": "~2.1.0", "is-glob": "~4.0.1", "normalize-path": "~3.0.0", "readdirp": "~3.6.0" }, "optionalDependencies": { "fsevents": "~2.3.2" } }, "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw=="], - "@tanstack/router-plugin/zod": ["zod@3.25.49", "", {}, "sha512-JMMPMy9ZBk3XFEdbM3iL1brx4NUSejd6xr3ELrrGEfGb355gjhiAWtG3K5o+AViV/3ZfkIrCzXsZn6SbLwTR8Q=="], - "@tanstack/server-functions-plugin/@babel/code-frame": ["@babel/code-frame@7.26.2", "", { "dependencies": { "@babel/helper-validator-identifier": "^7.25.9", "js-tokens": "^4.0.0", "picocolors": "^1.0.0" } }, "sha512-RJlIHRueQgwWitWgF8OdFYGZX328Ax5BCemNGlqHfplnRT9ESi8JkFlvaVYbS+UubVY6dpv87Fs2u5M29iNFVQ=="], "@tanstack/server-functions-plugin/dedent": ["dedent@1.6.0", "", { "peerDependencies": { "babel-plugin-macros": "^3.1.0" }, "optionalPeers": ["babel-plugin-macros"] }, "sha512-F1Z+5UCFpmQUzJa11agbyPVMbpgT/qA3/SKyJ1jyBgm7dUcUEa8v9JwDkerSQXfakBwFljIxhOJqGkjUwZ9FSA=="], diff --git a/drizzle/0001_init.sql b/drizzle/0001_init.sql index d9bdca2..d7dcd96 100644 --- a/drizzle/0001_init.sql +++ b/drizzle/0001_init.sql @@ -6,33 +6,36 @@ CREATE SCHEMA "log"; --> statement-breakpoint CREATE SCHEMA "player"; --> statement-breakpoint +CREATE SCHEMA "web"; +--> statement-breakpoint CREATE TYPE "common"."gm_authority" AS ENUM('IMPLEMENTOR', 'HIGH_WIZARD', 'GOD', 'LOW_WIZARD', 'PLAYER');--> statement-breakpoint -CREATE TYPE "common"."spam_type" AS ENUM('GOOD', 'SPAM');--> statement-breakpoint CREATE TYPE "log"."gold_log_how" AS ENUM('BUY', 'SELL', 'SHOP_SELL', 'SHOP_BUY', 'EXCHANGE_TAKE', 'EXCHANGE_GIVE', 'QUEST');--> statement-breakpoint -CREATE TYPE "log"."log_type" AS ENUM('ITEM', 'CHARACTER');--> statement-breakpoint -CREATE TYPE "log"."login_log_type" AS ENUM('LOGIN', 'LOGOUT');--> statement-breakpoint -CREATE TYPE "log"."money_log_type" AS ENUM('MONSTER', 'SHOP', 'REFINE', 'QUEST', 'GUILD', 'MISC', 'KILL', 'DROP');--> statement-breakpoint -CREATE TYPE "log"."refine_log_set_type" AS ENUM('SOCKET', 'POWER', 'ROD', 'GUILD', 'SCROLL', 'HYUNIRON', 'GOD_SCROLL', 'MUSIN_SCROLL');--> statement-breakpoint -CREATE TYPE "log"."reward_type" AS ENUM('EXP', 'ITEM');--> statement-breakpoint CREATE TYPE "player"."guild_grade_auth" AS ENUM('ADD_MEMBER', 'REMOVE_MEMEBER', 'NOTICE', 'USE_SKILL');--> statement-breakpoint CREATE TYPE "player"."item_proto_immune_flag" AS ENUM('PARA', 'CURSE', 'STUN', 'SLEEP', 'SLOW', 'POISON', 'TERROR');--> statement-breakpoint CREATE TYPE "player"."item_attr_apply" AS ENUM('MAX_HP', 'MAX_SP', 'CON', 'INT', 'STR', 'DEX', 'ATT_SPEED', 'MOV_SPEED', 'CAST_SPEED', 'HP_REGEN', 'SP_REGEN', 'POISON_PCT', 'STUN_PCT', 'SLOW_PCT', 'CRITICAL_PCT', 'PENETRATE_PCT', 'ATTBONUS_HUMAN', 'ATTBONUS_ANIMAL', 'ATTBONUS_ORC', 'ATTBONUS_MILGYO', 'ATTBONUS_UNDEAD', 'ATTBONUS_DEVIL', 'STEAL_HP', 'STEAL_SP', 'MANA_BURN_PCT', 'DAMAGE_SP_RECOVER', 'BLOCK', 'DODGE', 'RESIST_SWORD', 'RESIST_TWOHAND', 'RESIST_DAGGER', 'RESIST_BELL', 'RESIST_FAN', 'RESIST_BOW', 'RESIST_FIRE', 'RESIST_ELEC', 'RESIST_MAGIC', 'RESIST_WIND', 'REFLECT_MELEE', 'REFLECT_CURSE', 'POISON_REDUCE', 'KILL_SP_RECOVER', 'EXP_DOUBLE_BONUS', 'GOLD_DOUBLE_BONUS', 'ITEM_DROP_BONUS', 'POTION_BONUS', 'KILL_HP_RECOVER', 'IMMUNE_STUN', 'IMMUNE_SLOW', 'IMMUNE_FALL', 'SKILL', 'BOW_DISTANCE', 'ATT_GRADE_BONUS', 'DEF_GRADE_BONUS', 'MAGIC_ATT_GRADE', 'MAGIC_DEF_GRADE', 'CURSE_PCT', 'MAX_STAMINA', 'ATTBONUS_WARRIOR', 'ATTBONUS_ASSASSIN', 'ATTBONUS_SURA', 'ATTBONUS_SHAMAN', 'ATTBONUS_MONSTER', 'MALL_ATTBONUS', 'MALL_DEFBONUS', 'MALL_EXPBONUS', 'MALL_ITEMBONUS', 'MALL_GOLDBONUS', 'MAX_HP_PCT', 'MAX_SP_PCT', 'SKILL_DAMAGE_BONUS', 'NORMAL_HIT_DAMAGE_BONUS', 'SKILL_DEFEND_BONUS', 'NORMAL_HIT_DEFEND_BONUS', 'PC_BANG_EXP_BONUS', 'PC_BANG_DROP_BONUS', 'EXTRACT_HP_PCT', 'RESIST_WARRIOR', 'RESIST_ASSASSIN', 'RESIST_SURA', 'RESIST_SHAMAN', 'ENERGY', 'DEF_GRADE', 'COSTUME_ATTR_BONUS', 'MAGIC_ATTBONUS_PER', 'MELEE_MAGIC_ATTBONUS_PER', 'RESIST_ICE', 'RESIST_EARTH', 'RESIST_DARK', 'ANTI_CRITICAL_PCT', 'ANTI_PENETRATE_PCT');--> statement-breakpoint -CREATE TYPE "player"."item_attr_rare_apply" AS ENUM('MAX_HP', 'MAX_SP', 'CON', 'INT', 'STR', 'DEX', 'ATT_SPEED', 'MOV_SPEED', 'CAST_SPEED', 'HP_REGEN', 'SP_REGEN', 'POISON_PCT', 'STUN_PCT', 'SLOW_PCT', 'CRITICAL_PCT', 'PENETRATE_PCT', 'ATTBONUS_HUMAN', 'ATTBONUS_ANIMAL', 'ATTBONUS_ORC', 'ATTBONUS_MILGYO', 'ATTBONUS_UNDEAD', 'ATTBONUS_DEVIL', 'STEAL_HP', 'STEAL_SP', 'MANA_BURN_PCT', 'DAMAGE_SP_RECOVER', 'BLOCK', 'DODGE', 'RESIST_SWORD', 'RESIST_TWOHAND', 'RESIST_DAGGER', 'RESIST_BELL', 'RESIST_FAN', 'RESIST_BOW', 'RESIST_FIRE', 'RESIST_ELEC', 'RESIST_MAGIC', 'RESIST_WIND', 'REFLECT_MELEE', 'REFLECT_CURSE', 'POISON_REDUCE', 'KILL_SP_RECOVER', 'EXP_DOUBLE_BONUS', 'GOLD_DOUBLE_BONUS', 'ITEM_DROP_BONUS', 'POTION_BONUS', 'KILL_HP_RECOVER', 'IMMUNE_STUN', 'IMMUNE_SLOW', 'IMMUNE_FALL', 'SKILL', 'BOW_DISTANCE', 'ATT_GRADE_BONUS', 'DEF_GRADE_BONUS', 'MAGIC_ATT_GRADE', 'MAGIC_DEF_GRADE', 'CURSE_PCT', 'MAX_STAMINA', 'ATT_BONUS_TO_WARRIOR', 'ATT_BONUS_TO_ASSASSIN', 'ATT_BONUS_TO_SURA', 'ATT_BONUS_TO_SHAMAN', 'ATT_BONUS_TO_MONSTER', 'NORMAL_HIT_DEFEND_BONUS', 'SKILL_DEFEND_BONUS', 'NOUSE2''NOUSE3', 'NOUSE4', 'NOUSE5', 'NOUSE6', 'NOUSE7', 'NOUSE8', 'NOUSE9', 'NOUSE10', 'NOUSE11', 'NOUSE12', 'NOUSE13', 'NOUSE14', 'RESIST_WARRIOR', 'RESIST_ASSASSIN', 'RESIST_SURA', 'RESIST_SHAMAN');--> statement-breakpoint +CREATE TYPE "player"."item_attr_rare_apply" AS ENUM('MAX_HP', 'MAX_SP', 'CON', 'INT', 'STR', 'DEX', 'ATT_SPEED', 'MOV_SPEED', 'CAST_SPEED', 'HP_REGEN', 'SP_REGEN', 'POISON_PCT', 'STUN_PCT', 'SLOW_PCT', 'CRITICAL_PCT', 'PENETRATE_PCT', 'ATTBONUS_HUMAN', 'ATTBONUS_ANIMAL', 'ATTBONUS_ORC', 'ATTBONUS_MILGYO', 'ATTBONUS_UNDEAD', 'ATTBONUS_DEVIL', 'STEAL_HP', 'STEAL_SP', 'MANA_BURN_PCT', 'DAMAGE_SP_RECOVER', 'BLOCK', 'DODGE', 'RESIST_SWORD', 'RESIST_TWOHAND', 'RESIST_DAGGER', 'RESIST_BELL', 'RESIST_FAN', 'RESIST_BOW', 'RESIST_FIRE', 'RESIST_ELEC', 'RESIST_MAGIC', 'RESIST_WIND', 'REFLECT_MELEE', 'REFLECT_CURSE', 'POISON_REDUCE', 'KILL_SP_RECOVER', 'EXP_DOUBLE_BONUS', 'GOLD_DOUBLE_BONUS', 'ITEM_DROP_BONUS', 'POTION_BONUS', 'KILL_HP_RECOVER', 'IMMUNE_STUN', 'IMMUNE_SLOW', 'IMMUNE_FALL', 'SKILL', 'BOW_DISTANCE', 'ATT_GRADE_BONUS', 'DEF_GRADE_BONUS', 'MAGIC_ATT_GRADE', 'MAGIC_DEF_GRADE', 'CURSE_PCT', 'MAX_STAMINA', 'ATT_BONUS_TO_WARRIOR', 'ATT_BONUS_TO_ASSASSIN', 'ATT_BONUS_TO_SURA', 'ATT_BONUS_TO_SHAMAN', 'ATT_BONUS_TO_MONSTER', 'NORMAL_HIT_DEFEND_BONUS', 'SKILL_DEFEND_BONUS', 'NOUSE2', 'NOUSE3', 'NOUSE4', 'NOUSE5', 'NOUSE6', 'NOUSE7', 'NOUSE8', 'NOUSE9', 'NOUSE10', 'NOUSE11', 'NOUSE12', 'NOUSE13', 'NOUSE14', 'RESIST_WARRIOR', 'RESIST_ASSASSIN', 'RESIST_SURA', 'RESIST_SHAMAN');--> statement-breakpoint CREATE TYPE "player"."item_window" AS ENUM('INVENTORY', 'EQUIPMENT', 'SAFEBOX', 'MALL', 'DRAGON_SOUL_INVENTORY', 'BELT_INVENTORY');--> statement-breakpoint +CREATE TYPE "log"."log_type" AS ENUM('ITEM', 'CHARACTER');--> statement-breakpoint +CREATE TYPE "log"."login_log_type" AS ENUM('LOGIN', 'LOGOUT');--> statement-breakpoint CREATE TYPE "player"."mob_ai_flag" AS ENUM('AGGR', 'NOMOVE', 'COWARD', 'NOATTSHINSU', 'NOATTCHUNJO', 'NOATTJINNO', 'ATTMOB', 'BERSERK', 'STONESKIN', 'GODSPEED', 'DEATHBLOW', 'REVIVE');--> statement-breakpoint CREATE TYPE "player"."mob_set_immune_flag" AS ENUM('STUN', 'SLOW', 'FALL', 'CURSE', 'POISON', 'TERROR');--> statement-breakpoint CREATE TYPE "player"."mob_set_race_flag" AS ENUM('ANIMAL', 'UNDEAD', 'DEVIL', 'HUMAN', 'ORC', 'MILGYO', 'INSECT', 'FIRE', 'ICE', 'DESERT', 'TREE', 'ATT_ELEC', 'ATT_FIRE', 'ATT_ICE', 'ATT_WIND', 'ATT_EARTH', 'ATT_DARK');--> statement-breakpoint CREATE TYPE "player"."mob_size" AS ENUM('SMALL', 'MEDIUM', 'BIG');--> statement-breakpoint +CREATE TYPE "log"."money_log_type" AS ENUM('MONSTER', 'SHOP', 'REFINE', 'QUEST', 'GUILD', 'MISC', 'KILL', 'DROP');--> statement-breakpoint +CREATE TYPE "log"."refine_log_set_type" AS ENUM('SOCKET', 'POWER', 'ROD', 'GUILD', 'SCROLL', 'HYUNIRON', 'GOD_SCROLL', 'MUSIN_SCROLL');--> statement-breakpoint +CREATE TYPE "log"."reward_type" AS ENUM('EXP', 'ITEM');--> statement-breakpoint CREATE TYPE "player"."skill_proto_set_affect_flag" AS ENUM('YMIR', 'INVISIBILITY', 'SPAWN', 'POISON', 'SLOW', 'STUN', 'DUNGEON_READY', 'FORCE_VISIBLE', 'BUILDING_CONSTRUCTION_SMALL', 'BUILDING_CONSTRUCTION_LARGE', 'BUILDING_UPGRADE', 'MOV_SPEED_POTION', 'ATT_SPEED_POTION', 'FISH_MIDE', 'JEONGWIHON', 'GEOMGYEONG', 'CHEONGEUN', 'GYEONGGONG', 'EUNHYUNG', 'GWIGUM', 'TERROR', 'JUMAGAP', 'HOSIN', 'BOHO', 'KWAESOK', 'MANASHIELD', 'MUYEONG', 'REVIVE_INVISIBLE', 'FIRE', 'GICHEON', 'JEUNGRYEOK');--> statement-breakpoint CREATE TYPE "player"."skill_proto_set_affect_flag_2" AS ENUM('YMIR', 'INVISIBILITY', 'SPAWN', 'POISON', 'SLOW', 'STUN', 'DUNGEON_READY', 'FORCE_VISIBLE', 'BUILDING_CONSTRUCTION_SMALL', 'BUILDING_CONSTRUCTION_LARGE', 'BUILDING_UPGRADE', 'MOV_SPEED_POTION', 'ATT_SPEED_POTION', 'FISH_MIDE', 'JEONGWIHON', 'GEOMGYEONG', 'CHEONGEUN', 'GYEONGGONG', 'EUNHYUNG', 'GWIGUM', 'TERROR', 'JUMAGAP', 'HOSIN', 'BOHO', 'KWAESOK', 'MANASHIELD');--> statement-breakpoint CREATE TYPE "player"."skill_proto_set_flag" AS ENUM('ATTACK', 'USE_MELEE_DAMAGE', 'COMPUTE_ATTGRADE', 'SELFONLY', 'USE_MAGIC_DAMAGE', 'USE_HP_AS_COST', 'COMPUTE_MAGIC_DAMAGE', 'SPLASH', 'GIVE_PENALTY', 'USE_ARROW_DAMAGE', 'PENETRATE', 'IGNORE_TARGET_RATING', 'ATTACK_SLOW', 'ATTACK_STUN', 'HP_ABSORB', 'SP_ABSORB', 'ATTACK_FIRE_CONT', 'REMOVE_BAD_AFFECT', 'REMOVE_GOOD_AFFECT', 'CRUSH', 'ATTACK_POISON', 'TOGGLE', 'DISABLE_BY_POINT_UP', 'CRUSH_LONG');--> statement-breakpoint CREATE TYPE "player"."skill_proto_skill_type" AS ENUM('NORMAL', 'MELEE', 'RANGE', 'MAGIC');--> statement-breakpoint +CREATE TYPE "common"."spam_type" AS ENUM('GOOD', 'SPAM');--> statement-breakpoint +CREATE TYPE "web"."ticket_attachment_type" AS ENUM('image', 'video', 'document', 'other');--> statement-breakpoint CREATE TABLE "account"."account" ( "id" integer PRIMARY KEY GENERATED ALWAYS AS IDENTITY (sequence name "account"."account_id_seq" INCREMENT BY 1 MINVALUE 1 MAXVALUE 2147483647 START WITH 1 CACHE 1), "login" varchar(30) NOT NULL, "password" text NOT NULL, "social_id" varchar(13) NOT NULL, - "email" varchar(64) NOT NULL, + "email" text NOT NULL, "status" varchar(8) DEFAULT 'OK' NOT NULL, "security_code" varchar(192), "available_dt" timestamp DEFAULT now() NOT NULL, @@ -45,33 +48,25 @@ CREATE TABLE "account"."account" ( "fish_mind_expired_at" timestamp DEFAULT now() NOT NULL, "marriage_fast_expired_at" timestamp DEFAULT now() NOT NULL, "money_drop_rate_expired_at" timestamp DEFAULT now() NOT NULL, - "ip" varchar(191), + "ip" varchar(16), "created_at" timestamp DEFAULT now() NOT NULL, "last_played_at" timestamp, CONSTRAINT "account_login" UNIQUE("login"), CONSTRAINT "account_email" UNIQUE("email") ); --> statement-breakpoint -CREATE TABLE "common"."gm_host" ( - "ip" varchar(16) NOT NULL -); ---> statement-breakpoint -CREATE TABLE "common"."gm_list" ( +CREATE TABLE "player"."affect" ( "player_id" integer NOT NULL, - "contact_ip" varchar(16) NOT NULL, - "server_ip" varchar(16) DEFAULT 'ALL' NOT NULL, - "authority" "common"."gm_authority" DEFAULT 'PLAYER' + "type" integer NOT NULL, + "apply_on" integer DEFAULT 0 NOT NULL, + "apply_value" integer DEFAULT 0 NOT NULL, + "flag" integer DEFAULT 0 NOT NULL, + "duration" integer DEFAULT 0 NOT NULL, + "sp_cost" integer DEFAULT 0 NOT NULL ); --> statement-breakpoint -CREATE TABLE "common"."locale" ( - "key" varchar(191) NOT NULL, - "value" varchar(191) NOT NULL -); ---> statement-breakpoint -CREATE TABLE "common"."spam_db" ( - "type" "common"."spam_type" DEFAULT 'SPAM' NOT NULL, - "word" varchar(256) NOT NULL, - "score" integer DEFAULT 10 NOT NULL +CREATE TABLE "player"."banword" ( + "word" text NOT NULL ); --> statement-breakpoint CREATE TABLE "log"."boot_log" ( @@ -81,12 +76,18 @@ CREATE TABLE "log"."boot_log" ( "created_at" timestamp DEFAULT now() ); --> statement-breakpoint +CREATE TABLE "player"."change_empire" ( + "account_id" integer NOT NULL, + "change_count" integer, + "created_at" timestamp DEFAULT now() NOT NULL +); +--> statement-breakpoint CREATE TABLE "log"."change_name" ( "id" integer PRIMARY KEY GENERATED ALWAYS AS IDENTITY (sequence name "log"."change_name_id_seq" INCREMENT BY 1 MINVALUE 1 MAXVALUE 2147483647 START WITH 1 CACHE 1), "player_id" integer NOT NULL, "old_name" varchar(191), "new_name" varchar(191), - "ip" varchar(20), + "ip" varchar(16), "created_at" timestamp DEFAULT now() ); --> statement-breakpoint @@ -94,7 +95,7 @@ CREATE TABLE "log"."command_log" ( "id" integer PRIMARY KEY GENERATED ALWAYS AS IDENTITY (sequence name "log"."command_log_id_seq" INCREMENT BY 1 MINVALUE 1 MAXVALUE 2147483647 START WITH 1 CACHE 1), "player_id" integer NOT NULL, "server" integer NOT NULL, - "ip" varchar(15) NOT NULL, + "ip" varchar(16) NOT NULL, "port" integer NOT NULL, "username" varchar(50) NOT NULL, "command" text NOT NULL, @@ -113,6 +114,12 @@ CREATE TABLE "log"."cube_log" ( "created_at" timestamp DEFAULT now() ); --> statement-breakpoint +CREATE TABLE "web"."download" ( + "id" integer PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY (sequence name "web"."download_id_seq" INCREMENT BY 1 MINVALUE 1 MAXVALUE 2147483647 START WITH 1 CACHE 1), + "label" text NOT NULL, + "url" text NOT NULL +); +--> statement-breakpoint CREATE TABLE "log"."dragon_slay_log" ( "id" integer PRIMARY KEY GENERATED ALWAYS AS IDENTITY (sequence name "log"."dragon_slay_log_id_seq" INCREMENT BY 1 MINVALUE 1 MAXVALUE 2147483647 START WITH 1 CACHE 1), "guild_id" integer NOT NULL, @@ -133,6 +140,17 @@ CREATE TABLE "log"."fish_log" ( "created_at" timestamp DEFAULT now() ); --> statement-breakpoint +CREATE TABLE "common"."gm_host" ( + "ip" varchar(16) NOT NULL +); +--> statement-breakpoint +CREATE TABLE "common"."gm_list" ( + "player_id" integer NOT NULL, + "contact_ip" varchar(16) NOT NULL, + "server_ip" varchar(16) DEFAULT 'ALL' NOT NULL, + "authority" "common"."gm_authority" DEFAULT 'PLAYER' +); +--> statement-breakpoint CREATE TABLE "log"."gold_log" ( "id" integer PRIMARY KEY GENERATED ALWAYS AS IDENTITY (sequence name "log"."gold_log_id_seq" INCREMENT BY 1 MINVALUE 1 MAXVALUE 2147483647 START WITH 1 CACHE 1), "player_id" integer NOT NULL, @@ -142,141 +160,6 @@ CREATE TABLE "log"."gold_log" ( "created_at" timestamp DEFAULT now() ); --> statement-breakpoint -CREATE TABLE "log"."hack_log" ( - "id" integer PRIMARY KEY GENERATED ALWAYS AS IDENTITY (sequence name "log"."hack_log_id_seq" INCREMENT BY 1 MINVALUE 1 MAXVALUE 2147483647 START WITH 1 CACHE 1), - "login" char(16) NOT NULL, - "name" char(24) NOT NULL, - "ip" char(15) NOT NULL, - "server" char(100) NOT NULL, - "why" char(191) NOT NULL, - "created_at" timestamp DEFAULT now() -); ---> statement-breakpoint -CREATE TABLE "log"."level_log" ( - "id" integer PRIMARY KEY GENERATED ALWAYS AS IDENTITY (sequence name "log"."level_log_id_seq" INCREMENT BY 1 MINVALUE 1 MAXVALUE 2147483647 START WITH 1 CACHE 1), - "name" char(24) NOT NULL, - "level" integer DEFAULT 0 NOT NULL, - "playtime" integer DEFAULT 0 NOT NULL, - "player_id" integer NOT NULL, - "created_at" timestamp DEFAULT now() -); ---> statement-breakpoint -CREATE TABLE "log"."log" ( - "id" integer PRIMARY KEY GENERATED ALWAYS AS IDENTITY (sequence name "log"."log_id_seq" INCREMENT BY 1 MINVALUE 1 MAXVALUE 2147483647 START WITH 1 CACHE 1), - "type" "log"."log_type" DEFAULT 'ITEM' NOT NULL, - "who" integer DEFAULT 0 NOT NULL, - "x" integer DEFAULT 0 NOT NULL, - "y" integer DEFAULT 0 NOT NULL, - "what" integer DEFAULT 0 NOT NULL, - "how" varchar(50) NOT NULL, - "hint" varchar(70), - "ip" varchar(20), - "vnum" integer, - "created_at" timestamp DEFAULT now() -); ---> statement-breakpoint -CREATE TABLE "log"."login_log" ( - "id" integer PRIMARY KEY GENERATED ALWAYS AS IDENTITY (sequence name "log"."login_log_id_seq" INCREMENT BY 1 MINVALUE 1 MAXVALUE 2147483647 START WITH 1 CACHE 1), - "type" "log"."login_log_type", - "channel" integer, - "account_id" integer NOT NULL, - "player_id" integer NOT NULL, - "level" integer, - "job" integer, - "playtime" integer, - "created_at" timestamp DEFAULT now() -); ---> statement-breakpoint -CREATE TABLE "log"."login_log_2" ( - "id" integer PRIMARY KEY GENERATED ALWAYS AS IDENTITY (sequence name "log"."login_log_2_id_seq" INCREMENT BY 1 MINVALUE 1 MAXVALUE 2147483647 START WITH 1 CACHE 1), - "type" text, - "is_gm" boolean, - "channel" integer, - "account_id" integer NOT NULL, - "player_id" integer NOT NULL, - "ip" text, - "client_version" text, - "playtime" integer DEFAULT 0 NOT NULL, - "login_at" timestamp, - "logout_at" timestamp -); ---> statement-breakpoint -CREATE TABLE "log"."money_log" ( - "id" integer PRIMARY KEY GENERATED ALWAYS AS IDENTITY (sequence name "log"."money_log_id_seq" INCREMENT BY 1 MINVALUE 1 MAXVALUE 2147483647 START WITH 1 CACHE 1), - "type" "log"."money_log_type", - "vnum" integer DEFAULT 0 NOT NULL, - "gold" integer DEFAULT 0 NOT NULL, - "created_at" timestamp DEFAULT now() -); ---> statement-breakpoint -CREATE TABLE "log"."player_count" ( - "id" integer PRIMARY KEY GENERATED ALWAYS AS IDENTITY (sequence name "log"."player_count_id_seq" INCREMENT BY 1 MINVALUE 1 MAXVALUE 2147483647 START WITH 1 CACHE 1), - "count_red" integer, - "count_yellow" integer, - "count_blue" integer, - "count_total" integer, - "created_at" timestamp DEFAULT now() -); ---> statement-breakpoint -CREATE TABLE "log"."quest_reward_log" ( - "id" integer PRIMARY KEY GENERATED ALWAYS AS IDENTITY (sequence name "log"."quest_reward_log_id_seq" INCREMENT BY 1 MINVALUE 1 MAXVALUE 2147483647 START WITH 1 CACHE 1), - "quest_name" varchar(32), - "player_id" integer NOT NULL, - "player_level" integer, - "reward_type" "log"."reward_type", - "reward_value1" integer, - "reward_value2" integer, - "created_at" timestamp DEFAULT now() -); ---> statement-breakpoint -CREATE TABLE "log"."refine_log" ( - "id" integer PRIMARY KEY GENERATED ALWAYS AS IDENTITY (sequence name "log"."refine_log_id_seq" INCREMENT BY 1 MINVALUE 1 MAXVALUE 2147483647 START WITH 1 CACHE 1), - "player_id" integer NOT NULL, - "item_name" varchar(24) NOT NULL, - "item_id" integer DEFAULT 0 NOT NULL, - "step" varchar(50) NOT NULL, - "is_success" boolean NOT NULL, - "set_type" "log"."refine_log_set_type" NOT NULL, - "created_at" timestamp DEFAULT now() -); ---> statement-breakpoint -CREATE TABLE "log"."shout_log" ( - "id" integer PRIMARY KEY GENERATED ALWAYS AS IDENTITY (sequence name "log"."shout_log_id_seq" INCREMENT BY 1 MINVALUE 1 MAXVALUE 2147483647 START WITH 1 CACHE 1), - "channel" integer, - "empire" integer, - "shout" varchar(350), - "created_at" timestamp DEFAULT now() -); ---> statement-breakpoint -CREATE TABLE "log"."speed_hack_log" ( - "id" integer PRIMARY KEY GENERATED ALWAYS AS IDENTITY (sequence name "log"."speed_hack_log_id_seq" INCREMENT BY 1 MINVALUE 1 MAXVALUE 2147483647 START WITH 1 CACHE 1), - "player_id" integer NOT NULL, - "x" integer, - "y" integer, - "hack_count" integer, - "created_at" timestamp -); ---> statement-breakpoint -CREATE TABLE "player"."affect" ( - "player_id" integer NOT NULL, - "type" integer NOT NULL, - "apply_on" integer DEFAULT 0 NOT NULL, - "apply_value" integer DEFAULT 0 NOT NULL, - "flag" integer DEFAULT 0 NOT NULL, - "duration" integer DEFAULT 0 NOT NULL, - "sp_cost" integer DEFAULT 0 NOT NULL -); ---> statement-breakpoint -CREATE TABLE "player"."banword" ( - "word" text NOT NULL -); ---> statement-breakpoint -CREATE TABLE "player"."change_empire" ( - "account_id" integer NOT NULL, - "change_count" integer, - "created_at" timestamp DEFAULT now() NOT NULL -); ---> statement-breakpoint CREATE TABLE "player"."guild" ( "id" integer PRIMARY KEY GENERATED ALWAYS AS IDENTITY (sequence name "player"."guild_id_seq" INCREMENT BY 1 MINVALUE 1 MAXVALUE 2147483647 START WITH 1 CACHE 1), "name" varchar(12) NOT NULL, @@ -306,7 +189,7 @@ CREATE TABLE "player"."guild_grade" ( "guild_id" integer NOT NULL, "grade" integer DEFAULT 0 NOT NULL, "name" varchar(8) NOT NULL, - "auth" "guild_grade_auth"[] DEFAULT '{}' NOT NULL, + "auth" "player"."guild_grade_auth"[] DEFAULT '{}' NOT NULL, "auth_bits" bigint GENERATED ALWAYS AS (enum_array_to_bitmask("player"."guild_grade"."auth")) STORED ); --> statement-breakpoint @@ -321,7 +204,7 @@ CREATE TABLE "player"."guild_member" ( ); --> statement-breakpoint CREATE TABLE "player"."guild_war_bet" ( - "login" varchar(24) NOT NULL, + "login" varchar(30) NOT NULL, "gold" integer DEFAULT 0 NOT NULL, "guild_id" integer NOT NULL, "war_id" integer NOT NULL @@ -346,6 +229,16 @@ CREATE TABLE "player"."guild_war_reservation" ( "started_at" timestamp DEFAULT now() NOT NULL ); --> statement-breakpoint +CREATE TABLE "log"."hack_log" ( + "id" integer PRIMARY KEY GENERATED ALWAYS AS IDENTITY (sequence name "log"."hack_log_id_seq" INCREMENT BY 1 MINVALUE 1 MAXVALUE 2147483647 START WITH 1 CACHE 1), + "login" varchar(30) NOT NULL, + "name" char(24) NOT NULL, + "ip" char(15) NOT NULL, + "server" char(100) NOT NULL, + "why" char(191) NOT NULL, + "created_at" timestamp DEFAULT now() +); +--> statement-breakpoint CREATE TABLE "player"."horse_name" ( "player_id" integer NOT NULL, "name" varchar(24) DEFAULT 'NONAME' NOT NULL @@ -443,7 +336,7 @@ CREATE TABLE "player"."item_proto" ( "anti_flag" integer DEFAULT 0, "flag" integer DEFAULT 0, "wear_flag" integer DEFAULT 0, - "immune_flag" "item_proto_immune_flag"[] DEFAULT '{}' NOT NULL, + "immune_flag" "player"."item_proto_immune_flag"[] DEFAULT '{}' NOT NULL, "gold" integer DEFAULT 0, "shop_buy_price" integer DEFAULT 0 NOT NULL, "refined_vnum" integer DEFAULT 0 NOT NULL, @@ -490,6 +383,60 @@ CREATE TABLE "player"."land" ( "enabled" boolean DEFAULT false NOT NULL ); --> statement-breakpoint +CREATE TABLE "log"."level_log" ( + "id" integer PRIMARY KEY GENERATED ALWAYS AS IDENTITY (sequence name "log"."level_log_id_seq" INCREMENT BY 1 MINVALUE 1 MAXVALUE 2147483647 START WITH 1 CACHE 1), + "name" char(24) NOT NULL, + "level" integer DEFAULT 0 NOT NULL, + "playtime" integer DEFAULT 0 NOT NULL, + "player_id" integer NOT NULL, + "created_at" timestamp DEFAULT now() +); +--> statement-breakpoint +CREATE TABLE "common"."locale" ( + "key" varchar(191) NOT NULL, + "value" varchar(191) NOT NULL +); +--> statement-breakpoint +CREATE TABLE "log"."log" ( + "id" integer PRIMARY KEY GENERATED ALWAYS AS IDENTITY (sequence name "log"."log_id_seq" INCREMENT BY 1 MINVALUE 1 MAXVALUE 2147483647 START WITH 1 CACHE 1), + "type" "log"."log_type" DEFAULT 'ITEM' NOT NULL, + "who" integer DEFAULT 0 NOT NULL, + "x" integer DEFAULT 0 NOT NULL, + "y" integer DEFAULT 0 NOT NULL, + "what" integer DEFAULT 0 NOT NULL, + "how" varchar(50) NOT NULL, + "hint" varchar(70), + "ip" varchar(16), + "vnum" integer, + "created_at" timestamp DEFAULT now() +); +--> statement-breakpoint +CREATE TABLE "log"."login_log" ( + "id" integer PRIMARY KEY GENERATED ALWAYS AS IDENTITY (sequence name "log"."login_log_id_seq" INCREMENT BY 1 MINVALUE 1 MAXVALUE 2147483647 START WITH 1 CACHE 1), + "type" "log"."login_log_type", + "channel" integer, + "account_id" integer NOT NULL, + "player_id" integer NOT NULL, + "level" integer, + "job" integer, + "playtime" integer, + "created_at" timestamp DEFAULT now() +); +--> statement-breakpoint +CREATE TABLE "log"."login_log_2" ( + "id" integer PRIMARY KEY GENERATED ALWAYS AS IDENTITY (sequence name "log"."login_log_2_id_seq" INCREMENT BY 1 MINVALUE 1 MAXVALUE 2147483647 START WITH 1 CACHE 1), + "type" text, + "is_gm" boolean, + "channel" integer, + "account_id" integer NOT NULL, + "player_id" integer NOT NULL, + "ip" text, + "client_version" text, + "playtime" integer DEFAULT 0 NOT NULL, + "login_at" timestamp, + "logout_at" timestamp +); +--> statement-breakpoint CREATE TABLE "player"."lotto_list" ( "id" integer PRIMARY KEY GENERATED ALWAYS AS IDENTITY (sequence name "player"."lotto_list_id_seq" INCREMENT BY 1 MINVALUE 1 MAXVALUE 2147483647 START WITH 1 CACHE 1), "server" varchar(20), @@ -519,7 +466,7 @@ CREATE TABLE "player"."mob_proto" ( "battle_type" integer DEFAULT 0 NOT NULL, "level" integer DEFAULT 1 NOT NULL, "size" "player"."mob_size" DEFAULT 'SMALL', - "ai_flag" "mob_ai_flag"[] DEFAULT '{}' NOT NULL, + "ai_flag" "player"."mob_ai_flag"[] DEFAULT '{}' NOT NULL, "mount_capacity" integer DEFAULT 0 NOT NULL, "set_race_flag" "player"."mob_set_race_flag" NOT NULL, "set_immune_flag" "player"."mob_set_immune_flag", @@ -605,6 +552,14 @@ CREATE TABLE "player"."monarch_election" ( "election_at" timestamp DEFAULT now() ); --> statement-breakpoint +CREATE TABLE "log"."money_log" ( + "id" integer PRIMARY KEY GENERATED ALWAYS AS IDENTITY (sequence name "log"."money_log_id_seq" INCREMENT BY 1 MINVALUE 1 MAXVALUE 2147483647 START WITH 1 CACHE 1), + "type" "log"."money_log_type", + "vnum" integer DEFAULT 0 NOT NULL, + "gold" integer DEFAULT 0 NOT NULL, + "created_at" timestamp DEFAULT now() +); +--> statement-breakpoint CREATE TABLE "player"."myshop_pricelist" ( "owner_id" integer NOT NULL, "item_vnum" integer DEFAULT 0 NOT NULL, @@ -642,6 +597,14 @@ CREATE TABLE "player"."object_proto" ( "dependent_group" integer DEFAULT 0 NOT NULL ); --> statement-breakpoint +CREATE TABLE "web"."password_reset_session" ( + "id" text PRIMARY KEY NOT NULL, + "user_id" integer NOT NULL, + "email" text NOT NULL, + "code" text NOT NULL, + "expires_at" timestamp with time zone NOT NULL +); +--> statement-breakpoint CREATE TABLE "player"."player" ( "id" integer PRIMARY KEY GENERATED ALWAYS AS IDENTITY (sequence name "player"."player_id_seq" INCREMENT BY 1 MINVALUE 1 MAXVALUE 2147483647 START WITH 1 CACHE 1), "account_id" integer NOT NULL, @@ -673,7 +636,7 @@ CREATE TABLE "player"."player" ( "stat_point" integer NOT NULL, "skill_point" integer NOT NULL, "quick_slot" "bytea", - "ip" varchar(15) DEFAULT '0.0.0.0', + "ip" varchar(16) DEFAULT '0.0.0.0', "part_main" integer DEFAULT 0 NOT NULL, "part_base" integer DEFAULT 0 NOT NULL, "part_hair" integer DEFAULT 0 NOT NULL, @@ -693,6 +656,15 @@ CREATE TABLE "player"."player" ( "bank_value" integer DEFAULT 0 NOT NULL ); --> statement-breakpoint +CREATE TABLE "log"."player_count" ( + "id" integer PRIMARY KEY GENERATED ALWAYS AS IDENTITY (sequence name "log"."player_count_id_seq" INCREMENT BY 1 MINVALUE 1 MAXVALUE 2147483647 START WITH 1 CACHE 1), + "count_red" integer, + "count_yellow" integer, + "count_blue" integer, + "count_total" integer, + "created_at" timestamp DEFAULT now() +); +--> statement-breakpoint CREATE TABLE "player"."player_deleted" ( "id" integer PRIMARY KEY GENERATED ALWAYS AS IDENTITY (sequence name "player"."player_deleted_id_seq" INCREMENT BY 1 MINVALUE 1 MAXVALUE 2147483647 START WITH 1 CACHE 1), "account_id" integer NOT NULL, @@ -724,7 +696,7 @@ CREATE TABLE "player"."player_deleted" ( "stat_point" integer NOT NULL, "skill_point" integer NOT NULL, "quick_slot" integer, - "ip" varchar(15) DEFAULT '0.0.0.0', + "ip" varchar(16) DEFAULT '0.0.0.0', "part_main" integer NOT NULL, "part_base" integer DEFAULT 0 NOT NULL, "part_hair" integer NOT NULL, @@ -759,6 +731,28 @@ CREATE TABLE "player"."quest" ( "value" integer DEFAULT 0 NOT NULL ); --> statement-breakpoint +CREATE TABLE "log"."quest_reward_log" ( + "id" integer PRIMARY KEY GENERATED ALWAYS AS IDENTITY (sequence name "log"."quest_reward_log_id_seq" INCREMENT BY 1 MINVALUE 1 MAXVALUE 2147483647 START WITH 1 CACHE 1), + "quest_name" varchar(32), + "player_id" integer NOT NULL, + "player_level" integer, + "reward_type" "log"."reward_type", + "reward_value1" integer, + "reward_value2" integer, + "created_at" timestamp DEFAULT now() +); +--> statement-breakpoint +CREATE TABLE "log"."refine_log" ( + "id" integer PRIMARY KEY GENERATED ALWAYS AS IDENTITY (sequence name "log"."refine_log_id_seq" INCREMENT BY 1 MINVALUE 1 MAXVALUE 2147483647 START WITH 1 CACHE 1), + "player_id" integer NOT NULL, + "item_name" varchar(24) NOT NULL, + "item_id" integer DEFAULT 0 NOT NULL, + "step" varchar(50) NOT NULL, + "is_success" boolean NOT NULL, + "set_type" "log"."refine_log_set_type" NOT NULL, + "created_at" timestamp DEFAULT now() +); +--> statement-breakpoint CREATE TABLE "player"."refine_proto" ( "id" integer PRIMARY KEY NOT NULL, "vnum_0" integer DEFAULT 0 NOT NULL, @@ -784,6 +778,13 @@ CREATE TABLE "player"."safebox" ( "gold" integer DEFAULT 0 NOT NULL ); --> statement-breakpoint +CREATE TABLE "web"."session" ( + "id" text PRIMARY KEY NOT NULL, + "user_id" integer NOT NULL, + "ip" varchar(16) DEFAULT '0.0.0.0' NOT NULL, + "expires_at" timestamp with time zone NOT NULL +); +--> statement-breakpoint CREATE TABLE "player"."shop" ( "vnum" integer PRIMARY KEY NOT NULL, "name" varchar(32) DEFAULT 'NONAME' NOT NULL, @@ -797,6 +798,14 @@ CREATE TABLE "player"."shop_item" ( CONSTRAINT "shop_vnum_unique" UNIQUE("shop_vnum","item_vnum","count") ); --> statement-breakpoint +CREATE TABLE "log"."shout_log" ( + "id" integer PRIMARY KEY GENERATED ALWAYS AS IDENTITY (sequence name "log"."shout_log_id_seq" INCREMENT BY 1 MINVALUE 1 MAXVALUE 2147483647 START WITH 1 CACHE 1), + "channel" integer, + "empire" integer, + "shout" varchar(350), + "created_at" timestamp DEFAULT now() +); +--> statement-breakpoint CREATE TABLE "player"."skill_proto" ( "vnum" integer DEFAULT 0 NOT NULL, "name" text NOT NULL, @@ -812,7 +821,7 @@ CREATE TABLE "player"."skill_proto" ( "cooldown_poly" varchar(100) NOT NULL, "master_bonus_poly" varchar(100) NOT NULL, "attack_grade_poly" varchar(100) NOT NULL, - "set_flag" "skill_proto_set_flag"[] DEFAULT '{}' NOT NULL, + "set_flag" "player"."skill_proto_set_flag"[] DEFAULT '{}' NOT NULL, "set_flag_bits" bigint GENERATED ALWAYS AS (enum_array_to_bitmask("player"."skill_proto"."set_flag")) STORED, "set_affect_flag" "player"."skill_proto_set_affect_flag", "set_affect_flag_bits" bigint GENERATED ALWAYS AS (enum_to_bitmask("player"."skill_proto"."set_affect_flag")) STORED, @@ -835,30 +844,82 @@ CREATE TABLE "player"."skill_proto" ( "splash_range" integer DEFAULT 0 NOT NULL ); --> statement-breakpoint -ALTER TABLE "common"."gm_list" ADD CONSTRAINT "gm_list_player_id_player_id_fk" FOREIGN KEY ("player_id") REFERENCES "player"."player"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint +CREATE TABLE "common"."spam_db" ( + "type" "common"."spam_type" DEFAULT 'SPAM' NOT NULL, + "word" varchar(256) NOT NULL, + "score" integer DEFAULT 10 NOT NULL +); +--> statement-breakpoint +CREATE TABLE "log"."speed_hack_log" ( + "id" integer PRIMARY KEY GENERATED ALWAYS AS IDENTITY (sequence name "log"."speed_hack_log_id_seq" INCREMENT BY 1 MINVALUE 1 MAXVALUE 2147483647 START WITH 1 CACHE 1), + "player_id" integer NOT NULL, + "x" integer, + "y" integer, + "hack_count" integer, + "created_at" timestamp +); +--> statement-breakpoint +CREATE TABLE "web"."ticket" ( + "id" integer PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY (sequence name "web"."ticket_id_seq" INCREMENT BY 1 MINVALUE 1 MAXVALUE 2147483647 START WITH 1 CACHE 1), + "userId" integer NOT NULL, + "categoryId" integer NOT NULL, + "title" text NOT NULL, + "created_at" timestamp DEFAULT now() NOT NULL, + "updated_at" timestamp, + "closed_at" timestamp +); +--> statement-breakpoint +CREATE TABLE "web"."ticket_attachment" ( + "id" integer PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY (sequence name "web"."ticket_attachment_id_seq" INCREMENT BY 1 MINVALUE 1 MAXVALUE 2147483647 START WITH 1 CACHE 1), + "ticket_comment_id" integer NOT NULL, + "preview" jsonb, + "type" "web"."ticket_attachment_type" DEFAULT 'other' NOT NULL, + "size" integer NOT NULL, + "name" text NOT NULL, + "url" text NOT NULL +); +--> statement-breakpoint +CREATE TABLE "web"."ticket_category" ( + "id" integer PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY (sequence name "web"."ticket_category_id_seq" INCREMENT BY 1 MINVALUE 1 MAXVALUE 2147483647 START WITH 1 CACHE 1), + "label" text NOT NULL, + "description" text, + "published_at" timestamp +); +--> statement-breakpoint +CREATE TABLE "web"."ticket_comment" ( + "id" integer PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY (sequence name "web"."ticket_comment_id_seq" INCREMENT BY 1 MINVALUE 1 MAXVALUE 2147483647 START WITH 1 CACHE 1), + "userId" integer NOT NULL, + "ticketId" integer NOT NULL, + "comment" text NOT NULL, + "created_at" timestamp DEFAULT now() NOT NULL, + "updated_at" timestamp +); +--> statement-breakpoint +ALTER TABLE "player"."affect" ADD CONSTRAINT "affect_player_id_player_id_fk" FOREIGN KEY ("player_id") REFERENCES "player"."player"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint +ALTER TABLE "player"."change_empire" ADD CONSTRAINT "change_empire_account_id_account_id_fk" FOREIGN KEY ("account_id") REFERENCES "account"."account"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint ALTER TABLE "log"."change_name" ADD CONSTRAINT "change_name_player_id_player_id_fk" FOREIGN KEY ("player_id") REFERENCES "player"."player"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint ALTER TABLE "log"."command_log" ADD CONSTRAINT "command_log_player_id_player_id_fk" FOREIGN KEY ("player_id") REFERENCES "player"."player"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint ALTER TABLE "log"."fish_log" ADD CONSTRAINT "fish_log_player_id_player_id_fk" FOREIGN KEY ("player_id") REFERENCES "player"."player"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint +ALTER TABLE "common"."gm_list" ADD CONSTRAINT "gm_list_player_id_player_id_fk" FOREIGN KEY ("player_id") REFERENCES "player"."player"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint ALTER TABLE "log"."gold_log" ADD CONSTRAINT "gold_log_player_id_player_id_fk" FOREIGN KEY ("player_id") REFERENCES "player"."player"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint +ALTER TABLE "player"."guild_comment" ADD CONSTRAINT "guild_comment_guild_id_guild_id_fk" FOREIGN KEY ("guild_id") REFERENCES "player"."guild"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint +ALTER TABLE "player"."guild_grade" ADD CONSTRAINT "guild_grade_guild_id_guild_id_fk" FOREIGN KEY ("guild_id") REFERENCES "player"."guild"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint +ALTER TABLE "player"."guild_member" ADD CONSTRAINT "guild_member_player_id_player_id_fk" FOREIGN KEY ("player_id") REFERENCES "player"."player"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint +ALTER TABLE "player"."guild_member" ADD CONSTRAINT "guild_member_guild_id_guild_id_fk" FOREIGN KEY ("guild_id") REFERENCES "player"."guild"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint +ALTER TABLE "player"."guild_war_bet" ADD CONSTRAINT "guild_war_bet_login_account_login_fk" FOREIGN KEY ("login") REFERENCES "account"."account"("login") ON DELETE no action ON UPDATE no action;--> statement-breakpoint +ALTER TABLE "player"."guild_war_bet" ADD CONSTRAINT "guild_war_bet_guild_id_guild_id_fk" FOREIGN KEY ("guild_id") REFERENCES "player"."guild"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint +ALTER TABLE "player"."guild_war_bet" ADD CONSTRAINT "guild_war_bet_war_id_guild_war_reservation_id_fk" FOREIGN KEY ("war_id") REFERENCES "player"."guild_war_reservation"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint +ALTER TABLE "player"."guild_war_reservation" ADD CONSTRAINT "guild_war_reservation_guild1_guild_id_fk" FOREIGN KEY ("guild1") REFERENCES "player"."guild"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint +ALTER TABLE "player"."guild_war_reservation" ADD CONSTRAINT "guild_war_reservation_guild2_guild_id_fk" FOREIGN KEY ("guild2") REFERENCES "player"."guild"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint +ALTER TABLE "log"."hack_log" ADD CONSTRAINT "hack_log_login_account_login_fk" FOREIGN KEY ("login") REFERENCES "account"."account"("login") ON DELETE no action ON UPDATE no action;--> statement-breakpoint +ALTER TABLE "player"."horse_name" ADD CONSTRAINT "horse_name_player_id_player_id_fk" FOREIGN KEY ("player_id") REFERENCES "player"."player"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint +ALTER TABLE "player"."item_award" ADD CONSTRAINT "item_award_player_id_player_id_fk" FOREIGN KEY ("player_id") REFERENCES "player"."player"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint +ALTER TABLE "player"."item_award" ADD CONSTRAINT "item_award_login_account_login_fk" FOREIGN KEY ("login") REFERENCES "account"."account"("login") ON DELETE no action ON UPDATE no action;--> statement-breakpoint ALTER TABLE "log"."level_log" ADD CONSTRAINT "level_log_player_id_player_id_fk" FOREIGN KEY ("player_id") REFERENCES "player"."player"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint ALTER TABLE "log"."login_log" ADD CONSTRAINT "login_log_account_id_account_id_fk" FOREIGN KEY ("account_id") REFERENCES "account"."account"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint ALTER TABLE "log"."login_log" ADD CONSTRAINT "login_log_player_id_player_id_fk" FOREIGN KEY ("player_id") REFERENCES "player"."player"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint ALTER TABLE "log"."login_log_2" ADD CONSTRAINT "login_log_2_account_id_account_id_fk" FOREIGN KEY ("account_id") REFERENCES "account"."account"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint ALTER TABLE "log"."login_log_2" ADD CONSTRAINT "login_log_2_player_id_player_id_fk" FOREIGN KEY ("player_id") REFERENCES "player"."player"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint -ALTER TABLE "log"."refine_log" ADD CONSTRAINT "refine_log_player_id_player_id_fk" FOREIGN KEY ("player_id") REFERENCES "player"."player"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint -ALTER TABLE "log"."speed_hack_log" ADD CONSTRAINT "speed_hack_log_player_id_player_id_fk" FOREIGN KEY ("player_id") REFERENCES "player"."player"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint -ALTER TABLE "player"."affect" ADD CONSTRAINT "affect_player_id_player_id_fk" FOREIGN KEY ("player_id") REFERENCES "player"."player"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint -ALTER TABLE "player"."change_empire" ADD CONSTRAINT "change_empire_account_id_account_id_fk" FOREIGN KEY ("account_id") REFERENCES "account"."account"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint -ALTER TABLE "player"."guild_comment" ADD CONSTRAINT "guild_comment_guild_id_guild_id_fk" FOREIGN KEY ("guild_id") REFERENCES "player"."guild"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint -ALTER TABLE "player"."guild_grade" ADD CONSTRAINT "guild_grade_guild_id_guild_id_fk" FOREIGN KEY ("guild_id") REFERENCES "player"."guild"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint -ALTER TABLE "player"."guild_member" ADD CONSTRAINT "guild_member_player_id_player_id_fk" FOREIGN KEY ("player_id") REFERENCES "player"."player"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint -ALTER TABLE "player"."guild_member" ADD CONSTRAINT "guild_member_guild_id_guild_id_fk" FOREIGN KEY ("guild_id") REFERENCES "player"."guild"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint -ALTER TABLE "player"."guild_war_bet" ADD CONSTRAINT "guild_war_bet_guild_id_guild_id_fk" FOREIGN KEY ("guild_id") REFERENCES "player"."guild"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint -ALTER TABLE "player"."guild_war_bet" ADD CONSTRAINT "guild_war_bet_war_id_guild_war_reservation_id_fk" FOREIGN KEY ("war_id") REFERENCES "player"."guild_war_reservation"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint -ALTER TABLE "player"."guild_war_reservation" ADD CONSTRAINT "guild_war_reservation_guild1_guild_id_fk" FOREIGN KEY ("guild1") REFERENCES "player"."guild"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint -ALTER TABLE "player"."guild_war_reservation" ADD CONSTRAINT "guild_war_reservation_guild2_guild_id_fk" FOREIGN KEY ("guild2") REFERENCES "player"."guild"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint -ALTER TABLE "player"."horse_name" ADD CONSTRAINT "horse_name_player_id_player_id_fk" FOREIGN KEY ("player_id") REFERENCES "player"."player"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint -ALTER TABLE "player"."item_award" ADD CONSTRAINT "item_award_player_id_player_id_fk" FOREIGN KEY ("player_id") REFERENCES "player"."player"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint ALTER TABLE "player"."lotto_list" ADD CONSTRAINT "lotto_list_playerId_player_id_fk" FOREIGN KEY ("playerId") REFERENCES "player"."player"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint ALTER TABLE "player"."marriage" ADD CONSTRAINT "marriage_player_id_1_player_id_fk" FOREIGN KEY ("player_id_1") REFERENCES "player"."player"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint ALTER TABLE "player"."marriage" ADD CONSTRAINT "marriage_player_id_2_player_id_fk" FOREIGN KEY ("player_id_2") REFERENCES "player"."player"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint @@ -866,14 +927,22 @@ ALTER TABLE "player"."monarch" ADD CONSTRAINT "monarch_player_id_player_id_fk" F ALTER TABLE "player"."monarch_candidacy" ADD CONSTRAINT "monarch_candidacy_player_id_player_id_fk" FOREIGN KEY ("player_id") REFERENCES "player"."player"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint ALTER TABLE "player"."monarch_election" ADD CONSTRAINT "monarch_election_player_id_player_id_fk" FOREIGN KEY ("player_id") REFERENCES "player"."player"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint ALTER TABLE "player"."monarch_election" ADD CONSTRAINT "monarch_election_selected_player_id_player_id_fk" FOREIGN KEY ("selected_player_id") REFERENCES "player"."player"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint +ALTER TABLE "web"."password_reset_session" ADD CONSTRAINT "password_reset_session_user_id_account_id_fk" FOREIGN KEY ("user_id") REFERENCES "account"."account"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint ALTER TABLE "player"."player" ADD CONSTRAINT "player_account_id_account_id_fk" FOREIGN KEY ("account_id") REFERENCES "account"."account"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint ALTER TABLE "player"."player_deleted" ADD CONSTRAINT "player_deleted_account_id_account_id_fk" FOREIGN KEY ("account_id") REFERENCES "account"."account"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint ALTER TABLE "player"."player_index" ADD CONSTRAINT "player_index_account_id_account_id_fk" FOREIGN KEY ("account_id") REFERENCES "account"."account"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint ALTER TABLE "player"."quest" ADD CONSTRAINT "quest_player_id_player_id_fk" FOREIGN KEY ("player_id") REFERENCES "player"."player"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint +ALTER TABLE "log"."refine_log" ADD CONSTRAINT "refine_log_player_id_player_id_fk" FOREIGN KEY ("player_id") REFERENCES "player"."player"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint ALTER TABLE "player"."safebox" ADD CONSTRAINT "safebox_account_id_account_id_fk" FOREIGN KEY ("account_id") REFERENCES "account"."account"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint +ALTER TABLE "web"."session" ADD CONSTRAINT "session_user_id_account_id_fk" FOREIGN KEY ("user_id") REFERENCES "account"."account"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint ALTER TABLE "player"."shop_item" ADD CONSTRAINT "shop_item_shop_vnum_shop_vnum_fk" FOREIGN KEY ("shop_vnum") REFERENCES "player"."shop"("vnum") ON DELETE no action ON UPDATE no action;--> statement-breakpoint +ALTER TABLE "log"."speed_hack_log" ADD CONSTRAINT "speed_hack_log_player_id_player_id_fk" FOREIGN KEY ("player_id") REFERENCES "player"."player"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint +ALTER TABLE "web"."ticket" ADD CONSTRAINT "ticket_userId_account_id_fk" FOREIGN KEY ("userId") REFERENCES "account"."account"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint +ALTER TABLE "web"."ticket" ADD CONSTRAINT "ticket_categoryId_ticket_category_id_fk" FOREIGN KEY ("categoryId") REFERENCES "web"."ticket_category"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint +ALTER TABLE "web"."ticket_attachment" ADD CONSTRAINT "ticket_attachment_ticket_comment_id_ticket_comment_id_fk" FOREIGN KEY ("ticket_comment_id") REFERENCES "web"."ticket_comment"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint +ALTER TABLE "web"."ticket_comment" ADD CONSTRAINT "ticket_comment_userId_account_id_fk" FOREIGN KEY ("userId") REFERENCES "account"."account"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint +ALTER TABLE "web"."ticket_comment" ADD CONSTRAINT "ticket_comment_ticketId_ticket_id_fk" FOREIGN KEY ("ticketId") REFERENCES "web"."ticket"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint CREATE INDEX "account_social_id" ON "account"."account" USING btree ("social_id");--> statement-breakpoint -CREATE INDEX "locale_key" ON "common"."locale" USING btree ("key");--> statement-breakpoint CREATE INDEX "cube_log_player_id" ON "log"."cube_log" USING btree ("player_id");--> statement-breakpoint CREATE INDEX "cube_log_item_vnum" ON "log"."cube_log" USING btree ("item_vnum");--> statement-breakpoint CREATE INDEX "cube_log_item_uid" ON "log"."cube_log" USING btree ("item_uid");--> statement-breakpoint @@ -881,13 +950,6 @@ CREATE INDEX "gold_log_created_at" ON "log"."gold_log" USING btree ("created_at" CREATE INDEX "gold_log_player_id" ON "log"."gold_log" USING btree ("player_id");--> statement-breakpoint CREATE INDEX "gold_log_what" ON "log"."gold_log" USING btree ("what");--> statement-breakpoint CREATE INDEX "gold_log_how" ON "log"."gold_log" USING btree ("how");--> statement-breakpoint -CREATE INDEX "log_who" ON "log"."log" USING btree ("who");--> statement-breakpoint -CREATE INDEX "log_what" ON "log"."log" USING btree ("what");--> statement-breakpoint -CREATE INDEX "log_how" ON "log"."log" USING btree ("how");--> statement-breakpoint -CREATE INDEX "login_log_player_id" ON "log"."login_log" USING btree ("player_id","type");--> statement-breakpoint -CREATE INDEX "money_log_type" ON "log"."money_log" USING btree ("type","vnum");--> statement-breakpoint -CREATE INDEX "quest_reward_log_player_id" ON "log"."quest_reward_log" USING btree ("player_id");--> statement-breakpoint -CREATE INDEX "shout_log_created_at" ON "log"."shout_log" USING btree ("created_at");--> statement-breakpoint CREATE INDEX "aaa" ON "player"."guild_comment" USING btree ("notice","id","guild_id");--> statement-breakpoint CREATE INDEX "guild_comment_guild_id" ON "player"."guild_comment" USING btree ("guild_id");--> statement-breakpoint CREATE INDEX "item_owner_id" ON "player"."item" USING btree ("owner_id");--> statement-breakpoint @@ -896,6 +958,12 @@ CREATE INDEX "item_vnum" ON "player"."item" USING btree ("vnum");--> statement-b CREATE INDEX "item_award_player_id" ON "player"."item_award" USING btree ("player_id");--> statement-breakpoint CREATE INDEX "item_award_given_at" ON "player"."item_award" USING btree ("give_at");--> statement-breakpoint CREATE INDEX "item_award_taken_at" ON "player"."item_award" USING btree ("taken_at");--> statement-breakpoint +CREATE INDEX "locale_key" ON "common"."locale" USING btree ("key");--> statement-breakpoint +CREATE INDEX "log_who" ON "log"."log" USING btree ("who");--> statement-breakpoint +CREATE INDEX "log_what" ON "log"."log" USING btree ("what");--> statement-breakpoint +CREATE INDEX "log_how" ON "log"."log" USING btree ("how");--> statement-breakpoint +CREATE INDEX "login_log_player_id" ON "log"."login_log" USING btree ("player_id","type");--> statement-breakpoint +CREATE INDEX "money_log_type" ON "log"."money_log" USING btree ("type","vnum");--> statement-breakpoint CREATE INDEX "object_proto_vnum" ON "player"."object_proto" USING btree ("vnum");--> statement-breakpoint CREATE INDEX "object_proto_group_vnum" ON "player"."object_proto" USING btree ("group_vnum");--> statement-breakpoint CREATE INDEX "object_proto_upgrade_vnum" ON "player"."object_proto" USING btree ("upgrade_vnum");--> statement-breakpoint @@ -907,7 +975,9 @@ CREATE INDEX "player_index_empire" ON "player"."player_index" USING btree ("empi CREATE INDEX "quest_player_id" ON "player"."quest" USING btree ("player_id");--> statement-breakpoint CREATE INDEX "quest_name" ON "player"."quest" USING btree ("name");--> statement-breakpoint CREATE INDEX "quest_state" ON "player"."quest" USING btree ("state");--> statement-breakpoint +CREATE INDEX "quest_reward_log_player_id" ON "log"."quest_reward_log" USING btree ("player_id");--> statement-breakpoint CREATE INDEX "refine_proto_src_vnum" ON "player"."refine_proto" USING btree ("src_vnum");--> statement-breakpoint CREATE INDEX "refine_proto_result_vnum" ON "player"."refine_proto" USING btree ("result_vnum");--> statement-breakpoint CREATE INDEX "shop_vnum" ON "player"."shop" USING btree ("vnum");--> statement-breakpoint -CREATE INDEX "shop_item_item_vnum" ON "player"."shop_item" USING btree ("item_vnum"); \ No newline at end of file +CREATE INDEX "shop_item_item_vnum" ON "player"."shop_item" USING btree ("item_vnum");--> statement-breakpoint +CREATE INDEX "shout_log_created_at" ON "log"."shout_log" USING btree ("created_at"); \ No newline at end of file diff --git a/drizzle/0003_worried_hex.sql b/drizzle/0003_worried_hex.sql deleted file mode 100644 index 95dfeb4..0000000 --- a/drizzle/0003_worried_hex.sql +++ /dev/null @@ -1,30 +0,0 @@ -CREATE SCHEMA "web"; ---> statement-breakpoint -CREATE TABLE "web"."password_reset_session" ( - "id" text PRIMARY KEY NOT NULL, - "user_id" integer NOT NULL, - "email" text NOT NULL, - "code" text NOT NULL, - "expires_at" timestamp NOT NULL -); ---> statement-breakpoint -CREATE TABLE "web"."session" ( - "id" text PRIMARY KEY NOT NULL, - "user_id" integer NOT NULL, - "ip" varchar(16) DEFAULT '0.0.0.0' NOT NULL, - "expires_at" timestamp NOT NULL -); ---> statement-breakpoint -ALTER TABLE "account"."account" ALTER COLUMN "email" SET DATA TYPE text;--> statement-breakpoint -ALTER TABLE "account"."account" ALTER COLUMN "ip" SET DATA TYPE varchar(16);--> statement-breakpoint -ALTER TABLE "log"."change_name" ALTER COLUMN "ip" SET DATA TYPE varchar(16);--> statement-breakpoint -ALTER TABLE "log"."command_log" ALTER COLUMN "ip" SET DATA TYPE varchar(16);--> statement-breakpoint -ALTER TABLE "log"."log" ALTER COLUMN "ip" SET DATA TYPE varchar(16);--> statement-breakpoint -ALTER TABLE "player"."player" ALTER COLUMN "ip" SET DATA TYPE varchar(16);--> statement-breakpoint -ALTER TABLE "player"."player_deleted" ALTER COLUMN "ip" SET DATA TYPE varchar(16);--> statement-breakpoint -ALTER TABLE "web"."password_reset_session" ADD CONSTRAINT "password_reset_session_user_id_account_id_fk" FOREIGN KEY ("user_id") REFERENCES "account"."account"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint -ALTER TABLE "web"."session" ADD CONSTRAINT "session_user_id_account_id_fk" FOREIGN KEY ("user_id") REFERENCES "account"."account"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint -ALTER TABLE "player"."item_attr_rare" ALTER COLUMN "apply" SET DATA TYPE text;--> statement-breakpoint -DROP TYPE "player"."item_attr_rare_apply";--> statement-breakpoint -CREATE TYPE "player"."item_attr_rare_apply" AS ENUM('MAX_HP', 'MAX_SP', 'CON', 'INT', 'STR', 'DEX', 'ATT_SPEED', 'MOV_SPEED', 'CAST_SPEED', 'HP_REGEN', 'SP_REGEN', 'POISON_PCT', 'STUN_PCT', 'SLOW_PCT', 'CRITICAL_PCT', 'PENETRATE_PCT', 'ATTBONUS_HUMAN', 'ATTBONUS_ANIMAL', 'ATTBONUS_ORC', 'ATTBONUS_MILGYO', 'ATTBONUS_UNDEAD', 'ATTBONUS_DEVIL', 'STEAL_HP', 'STEAL_SP', 'MANA_BURN_PCT', 'DAMAGE_SP_RECOVER', 'BLOCK', 'DODGE', 'RESIST_SWORD', 'RESIST_TWOHAND', 'RESIST_DAGGER', 'RESIST_BELL', 'RESIST_FAN', 'RESIST_BOW', 'RESIST_FIRE', 'RESIST_ELEC', 'RESIST_MAGIC', 'RESIST_WIND', 'REFLECT_MELEE', 'REFLECT_CURSE', 'POISON_REDUCE', 'KILL_SP_RECOVER', 'EXP_DOUBLE_BONUS', 'GOLD_DOUBLE_BONUS', 'ITEM_DROP_BONUS', 'POTION_BONUS', 'KILL_HP_RECOVER', 'IMMUNE_STUN', 'IMMUNE_SLOW', 'IMMUNE_FALL', 'SKILL', 'BOW_DISTANCE', 'ATT_GRADE_BONUS', 'DEF_GRADE_BONUS', 'MAGIC_ATT_GRADE', 'MAGIC_DEF_GRADE', 'CURSE_PCT', 'MAX_STAMINA', 'ATT_BONUS_TO_WARRIOR', 'ATT_BONUS_TO_ASSASSIN', 'ATT_BONUS_TO_SURA', 'ATT_BONUS_TO_SHAMAN', 'ATT_BONUS_TO_MONSTER', 'NORMAL_HIT_DEFEND_BONUS', 'SKILL_DEFEND_BONUS', 'NOUSE2', 'NOUSE3', 'NOUSE4', 'NOUSE5', 'NOUSE6', 'NOUSE7', 'NOUSE8', 'NOUSE9', 'NOUSE10', 'NOUSE11', 'NOUSE12', 'NOUSE13', 'NOUSE14', 'RESIST_WARRIOR', 'RESIST_ASSASSIN', 'RESIST_SURA', 'RESIST_SHAMAN');--> statement-breakpoint -ALTER TABLE "player"."item_attr_rare" ALTER COLUMN "apply" SET DATA TYPE "player"."item_attr_rare_apply" USING "apply"::"player"."item_attr_rare_apply"; \ No newline at end of file diff --git a/drizzle/0004_mysterious_wallop.sql b/drizzle/0004_mysterious_wallop.sql deleted file mode 100644 index baceaf4..0000000 --- a/drizzle/0004_mysterious_wallop.sql +++ /dev/null @@ -1,2 +0,0 @@ -ALTER TABLE "web"."password_reset_session" ALTER COLUMN "expires_at" SET DATA TYPE timestamp with time zone;--> statement-breakpoint -ALTER TABLE "web"."session" ALTER COLUMN "expires_at" SET DATA TYPE timestamp with time zone; \ No newline at end of file diff --git a/drizzle/meta/0001_snapshot.json b/drizzle/meta/0001_snapshot.json index cecefd5..159a1dc 100644 --- a/drizzle/meta/0001_snapshot.json +++ b/drizzle/meta/0001_snapshot.json @@ -1,5 +1,5 @@ { - "id": "6b50e692-daa7-452f-a179-1d487e2e5538", + "id": "553d3d45-22ce-411b-89b8-c73d5658b388", "prevId": "7ae5f261-ddfc-44f3-a43d-41fb2f5e8eaa", "version": "7", "dialect": "postgresql", @@ -45,7 +45,7 @@ }, "email": { "name": "email", - "type": "varchar(64)", + "type": "text", "primaryKey": false, "notNull": true }, @@ -134,7 +134,7 @@ }, "ip": { "name": "ip", - "type": "varchar(191)", + "type": "varchar(16)", "primaryKey": false, "notNull": false }, @@ -191,28 +191,9 @@ "checkConstraints": {}, "isRLSEnabled": false }, - "common.gm_host": { - "name": "gm_host", - "schema": "common", - "columns": { - "ip": { - "name": "ip", - "type": "varchar(16)", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "common.gm_list": { - "name": "gm_list", - "schema": "common", + "player.affect": { + "name": "affect", + "schema": "player", "columns": { "player_id": { "name": "player_id", @@ -220,33 +201,53 @@ "primaryKey": false, "notNull": true }, - "contact_ip": { - "name": "contact_ip", - "type": "varchar(16)", + "type": { + "name": "type", + "type": "integer", "primaryKey": false, "notNull": true }, - "server_ip": { - "name": "server_ip", - "type": "varchar(16)", + "apply_on": { + "name": "apply_on", + "type": "integer", "primaryKey": false, "notNull": true, - "default": "'ALL'" + "default": 0 }, - "authority": { - "name": "authority", - "type": "gm_authority", - "typeSchema": "common", + "apply_value": { + "name": "apply_value", + "type": "integer", "primaryKey": false, - "notNull": false, - "default": "'PLAYER'" + "notNull": true, + "default": 0 + }, + "flag": { + "name": "flag", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "duration": { + "name": "duration", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "sp_cost": { + "name": "sp_cost", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 } }, "indexes": {}, "foreignKeys": { - "gm_list_player_id_player_id_fk": { - "name": "gm_list_player_id_player_id_fk", - "tableFrom": "gm_list", + "affect_player_id_player_id_fk": { + "name": "affect_player_id_player_id_fk", + "tableFrom": "affect", "tableTo": "player", "schemaTo": "player", "columnsFrom": [ @@ -265,71 +266,15 @@ "checkConstraints": {}, "isRLSEnabled": false }, - "common.locale": { - "name": "locale", - "schema": "common", + "player.banword": { + "name": "banword", + "schema": "player", "columns": { - "key": { - "name": "key", - "type": "varchar(191)", - "primaryKey": false, - "notNull": true - }, - "value": { - "name": "value", - "type": "varchar(191)", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "locale_key": { - "name": "locale_key", - "columns": [ - { - "expression": "key", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "common.spam_db": { - "name": "spam_db", - "schema": "common", - "columns": { - "type": { - "name": "type", - "type": "spam_type", - "typeSchema": "common", - "primaryKey": false, - "notNull": true, - "default": "'SPAM'" - }, "word": { "name": "word", - "type": "varchar(256)", + "type": "text", "primaryKey": false, "notNull": true - }, - "score": { - "name": "score", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 10 } }, "indexes": {}, @@ -391,6 +336,53 @@ "checkConstraints": {}, "isRLSEnabled": false }, + "player.change_empire": { + "name": "change_empire", + "schema": "player", + "columns": { + "account_id": { + "name": "account_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "change_count": { + "name": "change_count", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "change_empire_account_id_account_id_fk": { + "name": "change_empire_account_id_account_id_fk", + "tableFrom": "change_empire", + "tableTo": "account", + "schemaTo": "account", + "columnsFrom": [ + "account_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, "log.change_name": { "name": "change_name", "schema": "log", @@ -432,7 +424,7 @@ }, "ip": { "name": "ip", - "type": "varchar(20)", + "type": "varchar(16)", "primaryKey": false, "notNull": false }, @@ -502,7 +494,7 @@ }, "ip": { "name": "ip", - "type": "varchar(15)", + "type": "varchar(16)", "primaryKey": false, "notNull": true }, @@ -685,6 +677,48 @@ "checkConstraints": {}, "isRLSEnabled": false }, + "web.download": { + "name": "download", + "schema": "web", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "identity": { + "type": "byDefault", + "name": "download_id_seq", + "schema": "web", + "increment": "1", + "startWith": "1", + "minValue": "1", + "maxValue": "2147483647", + "cache": "1", + "cycle": false + } + }, + "label": { + "name": "label", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "url": { + "name": "url", + "type": "text", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, "log.dragon_slay_log": { "name": "dragon_slay_log", "schema": "log", @@ -839,6 +873,80 @@ "checkConstraints": {}, "isRLSEnabled": false }, + "common.gm_host": { + "name": "gm_host", + "schema": "common", + "columns": { + "ip": { + "name": "ip", + "type": "varchar(16)", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "common.gm_list": { + "name": "gm_list", + "schema": "common", + "columns": { + "player_id": { + "name": "player_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "contact_ip": { + "name": "contact_ip", + "type": "varchar(16)", + "primaryKey": false, + "notNull": true + }, + "server_ip": { + "name": "server_ip", + "type": "varchar(16)", + "primaryKey": false, + "notNull": true, + "default": "'ALL'" + }, + "authority": { + "name": "authority", + "type": "gm_authority", + "typeSchema": "common", + "primaryKey": false, + "notNull": false, + "default": "'PLAYER'" + } + }, + "indexes": {}, + "foreignKeys": { + "gm_list_player_id_player_id_fk": { + "name": "gm_list_player_id_player_id_fk", + "tableFrom": "gm_list", + "tableTo": "player", + "schemaTo": "player", + "columnsFrom": [ + "player_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, "log.gold_log": { "name": "gold_log", "schema": "log", @@ -978,1153 +1086,6 @@ "checkConstraints": {}, "isRLSEnabled": false }, - "log.hack_log": { - "name": "hack_log", - "schema": "log", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "hack_log_id_seq", - "schema": "log", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "login": { - "name": "login", - "type": "char(16)", - "primaryKey": false, - "notNull": true - }, - "name": { - "name": "name", - "type": "char(24)", - "primaryKey": false, - "notNull": true - }, - "ip": { - "name": "ip", - "type": "char(15)", - "primaryKey": false, - "notNull": true - }, - "server": { - "name": "server", - "type": "char(100)", - "primaryKey": false, - "notNull": true - }, - "why": { - "name": "why", - "type": "char(191)", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "log.level_log": { - "name": "level_log", - "schema": "log", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "level_log_id_seq", - "schema": "log", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "name": { - "name": "name", - "type": "char(24)", - "primaryKey": false, - "notNull": true - }, - "level": { - "name": "level", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "playtime": { - "name": "playtime", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "player_id": { - "name": "player_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "level_log_player_id_player_id_fk": { - "name": "level_log_player_id_player_id_fk", - "tableFrom": "level_log", - "tableTo": "player", - "schemaTo": "player", - "columnsFrom": [ - "player_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "log.log": { - "name": "log", - "schema": "log", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "log_id_seq", - "schema": "log", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "type": { - "name": "type", - "type": "log_type", - "typeSchema": "log", - "primaryKey": false, - "notNull": true, - "default": "'ITEM'" - }, - "who": { - "name": "who", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "x": { - "name": "x", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "y": { - "name": "y", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "what": { - "name": "what", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "how": { - "name": "how", - "type": "varchar(50)", - "primaryKey": false, - "notNull": true - }, - "hint": { - "name": "hint", - "type": "varchar(70)", - "primaryKey": false, - "notNull": false - }, - "ip": { - "name": "ip", - "type": "varchar(20)", - "primaryKey": false, - "notNull": false - }, - "vnum": { - "name": "vnum", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "default": "now()" - } - }, - "indexes": { - "log_who": { - "name": "log_who", - "columns": [ - { - "expression": "who", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "log_what": { - "name": "log_what", - "columns": [ - { - "expression": "what", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "log_how": { - "name": "log_how", - "columns": [ - { - "expression": "how", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "log.login_log": { - "name": "login_log", - "schema": "log", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "login_log_id_seq", - "schema": "log", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "type": { - "name": "type", - "type": "login_log_type", - "typeSchema": "log", - "primaryKey": false, - "notNull": false - }, - "channel": { - "name": "channel", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "account_id": { - "name": "account_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "player_id": { - "name": "player_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "level": { - "name": "level", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "job": { - "name": "job", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "playtime": { - "name": "playtime", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "default": "now()" - } - }, - "indexes": { - "login_log_player_id": { - "name": "login_log_player_id", - "columns": [ - { - "expression": "player_id", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "type", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "login_log_account_id_account_id_fk": { - "name": "login_log_account_id_account_id_fk", - "tableFrom": "login_log", - "tableTo": "account", - "schemaTo": "account", - "columnsFrom": [ - "account_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "login_log_player_id_player_id_fk": { - "name": "login_log_player_id_player_id_fk", - "tableFrom": "login_log", - "tableTo": "player", - "schemaTo": "player", - "columnsFrom": [ - "player_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "log.login_log_2": { - "name": "login_log_2", - "schema": "log", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "login_log_2_id_seq", - "schema": "log", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "type": { - "name": "type", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "is_gm": { - "name": "is_gm", - "type": "boolean", - "primaryKey": false, - "notNull": false - }, - "channel": { - "name": "channel", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "account_id": { - "name": "account_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "player_id": { - "name": "player_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "ip": { - "name": "ip", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "client_version": { - "name": "client_version", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "playtime": { - "name": "playtime", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "login_at": { - "name": "login_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false - }, - "logout_at": { - "name": "logout_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": { - "login_log_2_account_id_account_id_fk": { - "name": "login_log_2_account_id_account_id_fk", - "tableFrom": "login_log_2", - "tableTo": "account", - "schemaTo": "account", - "columnsFrom": [ - "account_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "login_log_2_player_id_player_id_fk": { - "name": "login_log_2_player_id_player_id_fk", - "tableFrom": "login_log_2", - "tableTo": "player", - "schemaTo": "player", - "columnsFrom": [ - "player_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "log.money_log": { - "name": "money_log", - "schema": "log", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "money_log_id_seq", - "schema": "log", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "type": { - "name": "type", - "type": "money_log_type", - "typeSchema": "log", - "primaryKey": false, - "notNull": false - }, - "vnum": { - "name": "vnum", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "gold": { - "name": "gold", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "default": "now()" - } - }, - "indexes": { - "money_log_type": { - "name": "money_log_type", - "columns": [ - { - "expression": "type", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "vnum", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "log.player_count": { - "name": "player_count", - "schema": "log", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "player_count_id_seq", - "schema": "log", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "count_red": { - "name": "count_red", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "count_yellow": { - "name": "count_yellow", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "count_blue": { - "name": "count_blue", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "count_total": { - "name": "count_total", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "log.quest_reward_log": { - "name": "quest_reward_log", - "schema": "log", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "quest_reward_log_id_seq", - "schema": "log", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "quest_name": { - "name": "quest_name", - "type": "varchar(32)", - "primaryKey": false, - "notNull": false - }, - "player_id": { - "name": "player_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "player_level": { - "name": "player_level", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "reward_type": { - "name": "reward_type", - "type": "reward_type", - "typeSchema": "log", - "primaryKey": false, - "notNull": false - }, - "reward_value1": { - "name": "reward_value1", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "reward_value2": { - "name": "reward_value2", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "default": "now()" - } - }, - "indexes": { - "quest_reward_log_player_id": { - "name": "quest_reward_log_player_id", - "columns": [ - { - "expression": "player_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "log.refine_log": { - "name": "refine_log", - "schema": "log", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "refine_log_id_seq", - "schema": "log", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "player_id": { - "name": "player_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "item_name": { - "name": "item_name", - "type": "varchar(24)", - "primaryKey": false, - "notNull": true - }, - "item_id": { - "name": "item_id", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "step": { - "name": "step", - "type": "varchar(50)", - "primaryKey": false, - "notNull": true - }, - "is_success": { - "name": "is_success", - "type": "boolean", - "primaryKey": false, - "notNull": true - }, - "set_type": { - "name": "set_type", - "type": "refine_log_set_type", - "typeSchema": "log", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "refine_log_player_id_player_id_fk": { - "name": "refine_log_player_id_player_id_fk", - "tableFrom": "refine_log", - "tableTo": "player", - "schemaTo": "player", - "columnsFrom": [ - "player_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "log.shout_log": { - "name": "shout_log", - "schema": "log", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "shout_log_id_seq", - "schema": "log", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "channel": { - "name": "channel", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "empire": { - "name": "empire", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "shout": { - "name": "shout", - "type": "varchar(350)", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "default": "now()" - } - }, - "indexes": { - "shout_log_created_at": { - "name": "shout_log_created_at", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "log.speed_hack_log": { - "name": "speed_hack_log", - "schema": "log", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "speed_hack_log_id_seq", - "schema": "log", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "player_id": { - "name": "player_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "x": { - "name": "x", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "y": { - "name": "y", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "hack_count": { - "name": "hack_count", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": { - "speed_hack_log_player_id_player_id_fk": { - "name": "speed_hack_log_player_id_player_id_fk", - "tableFrom": "speed_hack_log", - "tableTo": "player", - "schemaTo": "player", - "columnsFrom": [ - "player_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "player.affect": { - "name": "affect", - "schema": "player", - "columns": { - "player_id": { - "name": "player_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "type": { - "name": "type", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "apply_on": { - "name": "apply_on", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "apply_value": { - "name": "apply_value", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "flag": { - "name": "flag", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "duration": { - "name": "duration", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "sp_cost": { - "name": "sp_cost", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - } - }, - "indexes": {}, - "foreignKeys": { - "affect_player_id_player_id_fk": { - "name": "affect_player_id_player_id_fk", - "tableFrom": "affect", - "tableTo": "player", - "schemaTo": "player", - "columnsFrom": [ - "player_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "player.banword": { - "name": "banword", - "schema": "player", - "columns": { - "word": { - "name": "word", - "type": "text", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "player.change_empire": { - "name": "change_empire", - "schema": "player", - "columns": { - "account_id": { - "name": "account_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "change_count": { - "name": "change_count", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "change_empire_account_id_account_id_fk": { - "name": "change_empire_account_id_account_id_fk", - "tableFrom": "change_empire", - "tableTo": "account", - "schemaTo": "account", - "columnsFrom": [ - "account_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, "player.guild": { "name": "guild", "schema": "player", @@ -2513,7 +1474,7 @@ "columns": { "login": { "name": "login", - "type": "varchar(24)", + "type": "varchar(30)", "primaryKey": false, "notNull": true }, @@ -2539,6 +1500,20 @@ }, "indexes": {}, "foreignKeys": { + "guild_war_bet_login_account_login_fk": { + "name": "guild_war_bet_login_account_login_fk", + "tableFrom": "guild_war_bet", + "tableTo": "account", + "schemaTo": "account", + "columnsFrom": [ + "login" + ], + "columnsTo": [ + "login" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, "guild_war_bet_guild_id_guild_id_fk": { "name": "guild_war_bet_guild_id_guild_id_fk", "tableFrom": "guild_war_bet", @@ -2736,6 +1711,88 @@ "checkConstraints": {}, "isRLSEnabled": false }, + "log.hack_log": { + "name": "hack_log", + "schema": "log", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "identity": { + "type": "always", + "name": "hack_log_id_seq", + "schema": "log", + "increment": "1", + "startWith": "1", + "minValue": "1", + "maxValue": "2147483647", + "cache": "1", + "cycle": false + } + }, + "login": { + "name": "login", + "type": "varchar(30)", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "char(24)", + "primaryKey": false, + "notNull": true + }, + "ip": { + "name": "ip", + "type": "char(15)", + "primaryKey": false, + "notNull": true + }, + "server": { + "name": "server", + "type": "char(100)", + "primaryKey": false, + "notNull": true + }, + "why": { + "name": "why", + "type": "char(191)", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "hack_log_login_account_login_fk": { + "name": "hack_log_login_account_login_fk", + "tableFrom": "hack_log", + "tableTo": "account", + "schemaTo": "account", + "columnsFrom": [ + "login" + ], + "columnsTo": [ + "login" + ], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, "player.horse_name": { "name": "horse_name", "schema": "player", @@ -3399,6 +2456,20 @@ ], "onDelete": "no action", "onUpdate": "no action" + }, + "item_award_login_account_login_fk": { + "name": "item_award_login_account_login_fk", + "tableFrom": "item_award", + "tableTo": "account", + "schemaTo": "account", + "columnsFrom": [ + "login" + ], + "columnsTo": [ + "login" + ], + "onDelete": "no action", + "onUpdate": "no action" } }, "compositePrimaryKeys": {}, @@ -3791,6 +2862,519 @@ "checkConstraints": {}, "isRLSEnabled": false }, + "log.level_log": { + "name": "level_log", + "schema": "log", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "identity": { + "type": "always", + "name": "level_log_id_seq", + "schema": "log", + "increment": "1", + "startWith": "1", + "minValue": "1", + "maxValue": "2147483647", + "cache": "1", + "cycle": false + } + }, + "name": { + "name": "name", + "type": "char(24)", + "primaryKey": false, + "notNull": true + }, + "level": { + "name": "level", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "playtime": { + "name": "playtime", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "player_id": { + "name": "player_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "level_log_player_id_player_id_fk": { + "name": "level_log_player_id_player_id_fk", + "tableFrom": "level_log", + "tableTo": "player", + "schemaTo": "player", + "columnsFrom": [ + "player_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "common.locale": { + "name": "locale", + "schema": "common", + "columns": { + "key": { + "name": "key", + "type": "varchar(191)", + "primaryKey": false, + "notNull": true + }, + "value": { + "name": "value", + "type": "varchar(191)", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "locale_key": { + "name": "locale_key", + "columns": [ + { + "expression": "key", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "log.log": { + "name": "log", + "schema": "log", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "identity": { + "type": "always", + "name": "log_id_seq", + "schema": "log", + "increment": "1", + "startWith": "1", + "minValue": "1", + "maxValue": "2147483647", + "cache": "1", + "cycle": false + } + }, + "type": { + "name": "type", + "type": "log_type", + "typeSchema": "log", + "primaryKey": false, + "notNull": true, + "default": "'ITEM'" + }, + "who": { + "name": "who", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "x": { + "name": "x", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "y": { + "name": "y", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "what": { + "name": "what", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "how": { + "name": "how", + "type": "varchar(50)", + "primaryKey": false, + "notNull": true + }, + "hint": { + "name": "hint", + "type": "varchar(70)", + "primaryKey": false, + "notNull": false + }, + "ip": { + "name": "ip", + "type": "varchar(16)", + "primaryKey": false, + "notNull": false + }, + "vnum": { + "name": "vnum", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + } + }, + "indexes": { + "log_who": { + "name": "log_who", + "columns": [ + { + "expression": "who", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "log_what": { + "name": "log_what", + "columns": [ + { + "expression": "what", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "log_how": { + "name": "log_how", + "columns": [ + { + "expression": "how", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "log.login_log": { + "name": "login_log", + "schema": "log", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "identity": { + "type": "always", + "name": "login_log_id_seq", + "schema": "log", + "increment": "1", + "startWith": "1", + "minValue": "1", + "maxValue": "2147483647", + "cache": "1", + "cycle": false + } + }, + "type": { + "name": "type", + "type": "login_log_type", + "typeSchema": "log", + "primaryKey": false, + "notNull": false + }, + "channel": { + "name": "channel", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "account_id": { + "name": "account_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "player_id": { + "name": "player_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "level": { + "name": "level", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "job": { + "name": "job", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "playtime": { + "name": "playtime", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + } + }, + "indexes": { + "login_log_player_id": { + "name": "login_log_player_id", + "columns": [ + { + "expression": "player_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "type", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "login_log_account_id_account_id_fk": { + "name": "login_log_account_id_account_id_fk", + "tableFrom": "login_log", + "tableTo": "account", + "schemaTo": "account", + "columnsFrom": [ + "account_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "login_log_player_id_player_id_fk": { + "name": "login_log_player_id_player_id_fk", + "tableFrom": "login_log", + "tableTo": "player", + "schemaTo": "player", + "columnsFrom": [ + "player_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "log.login_log_2": { + "name": "login_log_2", + "schema": "log", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "identity": { + "type": "always", + "name": "login_log_2_id_seq", + "schema": "log", + "increment": "1", + "startWith": "1", + "minValue": "1", + "maxValue": "2147483647", + "cache": "1", + "cycle": false + } + }, + "type": { + "name": "type", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "is_gm": { + "name": "is_gm", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "channel": { + "name": "channel", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "account_id": { + "name": "account_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "player_id": { + "name": "player_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "ip": { + "name": "ip", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "client_version": { + "name": "client_version", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "playtime": { + "name": "playtime", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "login_at": { + "name": "login_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "logout_at": { + "name": "logout_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + } + }, + "indexes": {}, + "foreignKeys": { + "login_log_2_account_id_account_id_fk": { + "name": "login_log_2_account_id_account_id_fk", + "tableFrom": "login_log_2", + "tableTo": "account", + "schemaTo": "account", + "columnsFrom": [ + "account_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "login_log_2_player_id_player_id_fk": { + "name": "login_log_2_player_id_player_id_fk", + "tableFrom": "login_log_2", + "tableTo": "player", + "schemaTo": "player", + "columnsFrom": [ + "player_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, "player.lotto_list": { "name": "lotto_list", "schema": "player", @@ -4613,6 +4197,86 @@ "checkConstraints": {}, "isRLSEnabled": false }, + "log.money_log": { + "name": "money_log", + "schema": "log", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "identity": { + "type": "always", + "name": "money_log_id_seq", + "schema": "log", + "increment": "1", + "startWith": "1", + "minValue": "1", + "maxValue": "2147483647", + "cache": "1", + "cycle": false + } + }, + "type": { + "name": "type", + "type": "money_log_type", + "typeSchema": "log", + "primaryKey": false, + "notNull": false + }, + "vnum": { + "name": "vnum", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "gold": { + "name": "gold", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + } + }, + "indexes": { + "money_log_type": { + "name": "money_log_type", + "columns": [ + { + "expression": "type", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "vnum", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, "player.myshop_pricelist": { "name": "myshop_pricelist", "schema": "player", @@ -4900,6 +4564,64 @@ "checkConstraints": {}, "isRLSEnabled": false }, + "web.password_reset_session": { + "name": "password_reset_session", + "schema": "web", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "email": { + "name": "email", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "code": { + "name": "code", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "expires_at": { + "name": "expires_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "password_reset_session_user_id_account_id_fk": { + "name": "password_reset_session_user_id_account_id_fk", + "tableFrom": "password_reset_session", + "tableTo": "account", + "schemaTo": "account", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, "player.player": { "name": "player", "schema": "player", @@ -5113,7 +4835,7 @@ }, "ip": { "name": "ip", - "type": "varchar(15)", + "type": "varchar(16)", "primaryKey": false, "notNull": false, "default": "'0.0.0.0'" @@ -5287,6 +5009,67 @@ "checkConstraints": {}, "isRLSEnabled": false }, + "log.player_count": { + "name": "player_count", + "schema": "log", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "identity": { + "type": "always", + "name": "player_count_id_seq", + "schema": "log", + "increment": "1", + "startWith": "1", + "minValue": "1", + "maxValue": "2147483647", + "cache": "1", + "cycle": false + } + }, + "count_red": { + "name": "count_red", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "count_yellow": { + "name": "count_yellow", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "count_blue": { + "name": "count_blue", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "count_total": { + "name": "count_total", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, "player.player_deleted": { "name": "player_deleted", "schema": "player", @@ -5500,7 +5283,7 @@ }, "ip": { "name": "ip", - "type": "varchar(15)", + "type": "varchar(16)", "primaryKey": false, "notNull": false, "default": "'0.0.0.0'" @@ -5848,6 +5631,186 @@ "checkConstraints": {}, "isRLSEnabled": false }, + "log.quest_reward_log": { + "name": "quest_reward_log", + "schema": "log", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "identity": { + "type": "always", + "name": "quest_reward_log_id_seq", + "schema": "log", + "increment": "1", + "startWith": "1", + "minValue": "1", + "maxValue": "2147483647", + "cache": "1", + "cycle": false + } + }, + "quest_name": { + "name": "quest_name", + "type": "varchar(32)", + "primaryKey": false, + "notNull": false + }, + "player_id": { + "name": "player_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "player_level": { + "name": "player_level", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "reward_type": { + "name": "reward_type", + "type": "reward_type", + "typeSchema": "log", + "primaryKey": false, + "notNull": false + }, + "reward_value1": { + "name": "reward_value1", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "reward_value2": { + "name": "reward_value2", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + } + }, + "indexes": { + "quest_reward_log_player_id": { + "name": "quest_reward_log_player_id", + "columns": [ + { + "expression": "player_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "log.refine_log": { + "name": "refine_log", + "schema": "log", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "identity": { + "type": "always", + "name": "refine_log_id_seq", + "schema": "log", + "increment": "1", + "startWith": "1", + "minValue": "1", + "maxValue": "2147483647", + "cache": "1", + "cycle": false + } + }, + "player_id": { + "name": "player_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "item_name": { + "name": "item_name", + "type": "varchar(24)", + "primaryKey": false, + "notNull": true + }, + "item_id": { + "name": "item_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "step": { + "name": "step", + "type": "varchar(50)", + "primaryKey": false, + "notNull": true + }, + "is_success": { + "name": "is_success", + "type": "boolean", + "primaryKey": false, + "notNull": true + }, + "set_type": { + "name": "set_type", + "type": "refine_log_set_type", + "typeSchema": "log", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "refine_log_player_id_player_id_fk": { + "name": "refine_log_player_id_player_id_fk", + "tableFrom": "refine_log", + "tableTo": "player", + "schemaTo": "player", + "columnsFrom": [ + "player_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, "player.refine_proto": { "name": "refine_proto", "schema": "player", @@ -6045,6 +6008,59 @@ "checkConstraints": {}, "isRLSEnabled": false }, + "web.session": { + "name": "session", + "schema": "web", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "ip": { + "name": "ip", + "type": "varchar(16)", + "primaryKey": false, + "notNull": true, + "default": "'0.0.0.0'" + }, + "expires_at": { + "name": "expires_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "session_user_id_account_id_fk": { + "name": "session_user_id_account_id_fk", + "tableFrom": "session", + "tableTo": "account", + "schemaTo": "account", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, "player.shop": { "name": "shop", "schema": "player", @@ -6166,6 +6182,77 @@ "checkConstraints": {}, "isRLSEnabled": false }, + "log.shout_log": { + "name": "shout_log", + "schema": "log", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "identity": { + "type": "always", + "name": "shout_log_id_seq", + "schema": "log", + "increment": "1", + "startWith": "1", + "minValue": "1", + "maxValue": "2147483647", + "cache": "1", + "cycle": false + } + }, + "channel": { + "name": "channel", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "empire": { + "name": "empire", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "shout": { + "name": "shout", + "type": "varchar(350)", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + } + }, + "indexes": { + "shout_log_created_at": { + "name": "shout_log_created_at", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, "player.skill_proto": { "name": "skill_proto", "schema": "player", @@ -6423,6 +6510,432 @@ "policies": {}, "checkConstraints": {}, "isRLSEnabled": false + }, + "common.spam_db": { + "name": "spam_db", + "schema": "common", + "columns": { + "type": { + "name": "type", + "type": "spam_type", + "typeSchema": "common", + "primaryKey": false, + "notNull": true, + "default": "'SPAM'" + }, + "word": { + "name": "word", + "type": "varchar(256)", + "primaryKey": false, + "notNull": true + }, + "score": { + "name": "score", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 10 + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "log.speed_hack_log": { + "name": "speed_hack_log", + "schema": "log", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "identity": { + "type": "always", + "name": "speed_hack_log_id_seq", + "schema": "log", + "increment": "1", + "startWith": "1", + "minValue": "1", + "maxValue": "2147483647", + "cache": "1", + "cycle": false + } + }, + "player_id": { + "name": "player_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "x": { + "name": "x", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "y": { + "name": "y", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "hack_count": { + "name": "hack_count", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + } + }, + "indexes": {}, + "foreignKeys": { + "speed_hack_log_player_id_player_id_fk": { + "name": "speed_hack_log_player_id_player_id_fk", + "tableFrom": "speed_hack_log", + "tableTo": "player", + "schemaTo": "player", + "columnsFrom": [ + "player_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "web.ticket": { + "name": "ticket", + "schema": "web", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "identity": { + "type": "byDefault", + "name": "ticket_id_seq", + "schema": "web", + "increment": "1", + "startWith": "1", + "minValue": "1", + "maxValue": "2147483647", + "cache": "1", + "cycle": false + } + }, + "userId": { + "name": "userId", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "categoryId": { + "name": "categoryId", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "title": { + "name": "title", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "closed_at": { + "name": "closed_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + } + }, + "indexes": {}, + "foreignKeys": { + "ticket_userId_account_id_fk": { + "name": "ticket_userId_account_id_fk", + "tableFrom": "ticket", + "tableTo": "account", + "schemaTo": "account", + "columnsFrom": [ + "userId" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "ticket_categoryId_ticket_category_id_fk": { + "name": "ticket_categoryId_ticket_category_id_fk", + "tableFrom": "ticket", + "tableTo": "ticket_category", + "schemaTo": "web", + "columnsFrom": [ + "categoryId" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "web.ticket_attachment": { + "name": "ticket_attachment", + "schema": "web", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "identity": { + "type": "byDefault", + "name": "ticket_attachment_id_seq", + "schema": "web", + "increment": "1", + "startWith": "1", + "minValue": "1", + "maxValue": "2147483647", + "cache": "1", + "cycle": false + } + }, + "ticket_comment_id": { + "name": "ticket_comment_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "preview": { + "name": "preview", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "type": { + "name": "type", + "type": "ticket_attachment_type", + "typeSchema": "web", + "primaryKey": false, + "notNull": true, + "default": "'other'" + }, + "size": { + "name": "size", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "url": { + "name": "url", + "type": "text", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "ticket_attachment_ticket_comment_id_ticket_comment_id_fk": { + "name": "ticket_attachment_ticket_comment_id_ticket_comment_id_fk", + "tableFrom": "ticket_attachment", + "tableTo": "ticket_comment", + "schemaTo": "web", + "columnsFrom": [ + "ticket_comment_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "web.ticket_category": { + "name": "ticket_category", + "schema": "web", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "identity": { + "type": "byDefault", + "name": "ticket_category_id_seq", + "schema": "web", + "increment": "1", + "startWith": "1", + "minValue": "1", + "maxValue": "2147483647", + "cache": "1", + "cycle": false + } + }, + "label": { + "name": "label", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "published_at": { + "name": "published_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "web.ticket_comment": { + "name": "ticket_comment", + "schema": "web", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "identity": { + "type": "byDefault", + "name": "ticket_comment_id_seq", + "schema": "web", + "increment": "1", + "startWith": "1", + "minValue": "1", + "maxValue": "2147483647", + "cache": "1", + "cycle": false + } + }, + "userId": { + "name": "userId", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "ticketId": { + "name": "ticketId", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "comment": { + "name": "comment", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + } + }, + "indexes": {}, + "foreignKeys": { + "ticket_comment_userId_account_id_fk": { + "name": "ticket_comment_userId_account_id_fk", + "tableFrom": "ticket_comment", + "tableTo": "account", + "schemaTo": "account", + "columnsFrom": [ + "userId" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + }, + "ticket_comment_ticketId_ticket_id_fk": { + "name": "ticket_comment_ticketId_ticket_id_fk", + "tableFrom": "ticket_comment", + "tableTo": "ticket", + "schemaTo": "web", + "columnsFrom": [ + "ticketId" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false } }, "enums": { @@ -6437,14 +6950,6 @@ "PLAYER" ] }, - "common.spam_type": { - "name": "spam_type", - "schema": "common", - "values": [ - "GOOD", - "SPAM" - ] - }, "log.gold_log_how": { "name": "gold_log_how", "schema": "log", @@ -6458,58 +6963,6 @@ "QUEST" ] }, - "log.log_type": { - "name": "log_type", - "schema": "log", - "values": [ - "ITEM", - "CHARACTER" - ] - }, - "log.login_log_type": { - "name": "login_log_type", - "schema": "log", - "values": [ - "LOGIN", - "LOGOUT" - ] - }, - "log.money_log_type": { - "name": "money_log_type", - "schema": "log", - "values": [ - "MONSTER", - "SHOP", - "REFINE", - "QUEST", - "GUILD", - "MISC", - "KILL", - "DROP" - ] - }, - "log.refine_log_set_type": { - "name": "refine_log_set_type", - "schema": "log", - "values": [ - "SOCKET", - "POWER", - "ROD", - "GUILD", - "SCROLL", - "HYUNIRON", - "GOD_SCROLL", - "MUSIN_SCROLL" - ] - }, - "log.reward_type": { - "name": "reward_type", - "schema": "log", - "values": [ - "EXP", - "ITEM" - ] - }, "player.guild_grade_auth": { "name": "guild_grade_auth", "schema": "player", @@ -6699,7 +7152,8 @@ "ATT_BONUS_TO_MONSTER", "NORMAL_HIT_DEFEND_BONUS", "SKILL_DEFEND_BONUS", - "NOUSE2'NOUSE3", + "NOUSE2", + "NOUSE3", "NOUSE4", "NOUSE5", "NOUSE6", @@ -6729,6 +7183,22 @@ "BELT_INVENTORY" ] }, + "log.log_type": { + "name": "log_type", + "schema": "log", + "values": [ + "ITEM", + "CHARACTER" + ] + }, + "log.login_log_type": { + "name": "login_log_type", + "schema": "log", + "values": [ + "LOGIN", + "LOGOUT" + ] + }, "player.mob_ai_flag": { "name": "mob_ai_flag", "schema": "player", @@ -6791,6 +7261,42 @@ "BIG" ] }, + "log.money_log_type": { + "name": "money_log_type", + "schema": "log", + "values": [ + "MONSTER", + "SHOP", + "REFINE", + "QUEST", + "GUILD", + "MISC", + "KILL", + "DROP" + ] + }, + "log.refine_log_set_type": { + "name": "refine_log_set_type", + "schema": "log", + "values": [ + "SOCKET", + "POWER", + "ROD", + "GUILD", + "SCROLL", + "HYUNIRON", + "GOD_SCROLL", + "MUSIN_SCROLL" + ] + }, + "log.reward_type": { + "name": "reward_type", + "schema": "log", + "values": [ + "EXP", + "ITEM" + ] + }, "player.skill_proto_set_affect_flag": { "name": "skill_proto_set_affect_flag", "schema": "player", @@ -6899,13 +7405,32 @@ "RANGE", "MAGIC" ] + }, + "common.spam_type": { + "name": "spam_type", + "schema": "common", + "values": [ + "GOOD", + "SPAM" + ] + }, + "web.ticket_attachment_type": { + "name": "ticket_attachment_type", + "schema": "web", + "values": [ + "image", + "video", + "document", + "other" + ] } }, "schemas": { "account": "account", "common": "common", "log": "log", - "player": "player" + "player": "player", + "web": "web" }, "sequences": {}, "roles": {}, diff --git a/drizzle/meta/0002_snapshot.json b/drizzle/meta/0002_snapshot.json index 05cf1af..3aa50a5 100644 --- a/drizzle/meta/0002_snapshot.json +++ b/drizzle/meta/0002_snapshot.json @@ -1,6 +1,6 @@ { - "id": "99735262-8eca-4ff6-b898-cdd59013b677", - "prevId": "6b50e692-daa7-452f-a179-1d487e2e5538", + "id": "b6bb1610-e364-435d-b74a-caec31981776", + "prevId": "553d3d45-22ce-411b-89b8-c73d5658b388", "version": "7", "dialect": "postgresql", "tables": { @@ -45,7 +45,7 @@ }, "email": { "name": "email", - "type": "varchar(64)", + "type": "text", "primaryKey": false, "notNull": true }, @@ -134,7 +134,7 @@ }, "ip": { "name": "ip", - "type": "varchar(191)", + "type": "varchar(16)", "primaryKey": false, "notNull": false }, @@ -191,28 +191,9 @@ "checkConstraints": {}, "isRLSEnabled": false }, - "common.gm_host": { - "name": "gm_host", - "schema": "common", - "columns": { - "ip": { - "name": "ip", - "type": "varchar(16)", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "common.gm_list": { - "name": "gm_list", - "schema": "common", + "player.affect": { + "name": "affect", + "schema": "player", "columns": { "player_id": { "name": "player_id", @@ -220,33 +201,53 @@ "primaryKey": false, "notNull": true }, - "contact_ip": { - "name": "contact_ip", - "type": "varchar(16)", + "type": { + "name": "type", + "type": "integer", "primaryKey": false, "notNull": true }, - "server_ip": { - "name": "server_ip", - "type": "varchar(16)", + "apply_on": { + "name": "apply_on", + "type": "integer", "primaryKey": false, "notNull": true, - "default": "'ALL'" + "default": 0 }, - "authority": { - "name": "authority", - "type": "gm_authority", - "typeSchema": "common", + "apply_value": { + "name": "apply_value", + "type": "integer", "primaryKey": false, - "notNull": false, - "default": "'PLAYER'" + "notNull": true, + "default": 0 + }, + "flag": { + "name": "flag", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "duration": { + "name": "duration", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "sp_cost": { + "name": "sp_cost", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 } }, "indexes": {}, "foreignKeys": { - "gm_list_player_id_player_id_fk": { - "name": "gm_list_player_id_player_id_fk", - "tableFrom": "gm_list", + "affect_player_id_player_id_fk": { + "name": "affect_player_id_player_id_fk", + "tableFrom": "affect", "columnsFrom": [ "player_id" ], @@ -265,71 +266,15 @@ "checkConstraints": {}, "isRLSEnabled": false }, - "common.locale": { - "name": "locale", - "schema": "common", + "player.banword": { + "name": "banword", + "schema": "player", "columns": { - "key": { - "name": "key", - "type": "varchar(191)", - "primaryKey": false, - "notNull": true - }, - "value": { - "name": "value", - "type": "varchar(191)", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "locale_key": { - "name": "locale_key", - "columns": [ - { - "expression": "key", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "with": {}, - "method": "btree", - "concurrently": false - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "common.spam_db": { - "name": "spam_db", - "schema": "common", - "columns": { - "type": { - "name": "type", - "type": "spam_type", - "typeSchema": "common", - "primaryKey": false, - "notNull": true, - "default": "'SPAM'" - }, "word": { "name": "word", - "type": "varchar(256)", + "type": "text", "primaryKey": false, "notNull": true - }, - "score": { - "name": "score", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 10 } }, "indexes": {}, @@ -391,6 +336,53 @@ "checkConstraints": {}, "isRLSEnabled": false }, + "player.change_empire": { + "name": "change_empire", + "schema": "player", + "columns": { + "account_id": { + "name": "account_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "change_count": { + "name": "change_count", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "change_empire_account_id_account_id_fk": { + "name": "change_empire_account_id_account_id_fk", + "tableFrom": "change_empire", + "columnsFrom": [ + "account_id" + ], + "tableTo": "account", + "schemaTo": "account", + "columnsTo": [ + "id" + ], + "onUpdate": "no action", + "onDelete": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, "log.change_name": { "name": "change_name", "schema": "log", @@ -432,7 +424,7 @@ }, "ip": { "name": "ip", - "type": "varchar(20)", + "type": "varchar(16)", "primaryKey": false, "notNull": false }, @@ -502,7 +494,7 @@ }, "ip": { "name": "ip", - "type": "varchar(15)", + "type": "varchar(16)", "primaryKey": false, "notNull": true }, @@ -685,6 +677,48 @@ "checkConstraints": {}, "isRLSEnabled": false }, + "web.download": { + "name": "download", + "schema": "web", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "identity": { + "name": "download_id_seq", + "increment": "1", + "minValue": "1", + "maxValue": "2147483647", + "startWith": "1", + "cache": "1", + "cycle": false, + "schema": "web", + "type": "byDefault" + } + }, + "label": { + "name": "label", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "url": { + "name": "url", + "type": "text", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, "log.dragon_slay_log": { "name": "dragon_slay_log", "schema": "log", @@ -839,6 +873,80 @@ "checkConstraints": {}, "isRLSEnabled": false }, + "common.gm_host": { + "name": "gm_host", + "schema": "common", + "columns": { + "ip": { + "name": "ip", + "type": "varchar(16)", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "common.gm_list": { + "name": "gm_list", + "schema": "common", + "columns": { + "player_id": { + "name": "player_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "contact_ip": { + "name": "contact_ip", + "type": "varchar(16)", + "primaryKey": false, + "notNull": true + }, + "server_ip": { + "name": "server_ip", + "type": "varchar(16)", + "primaryKey": false, + "notNull": true, + "default": "'ALL'" + }, + "authority": { + "name": "authority", + "type": "gm_authority", + "typeSchema": "common", + "primaryKey": false, + "notNull": false, + "default": "'PLAYER'" + } + }, + "indexes": {}, + "foreignKeys": { + "gm_list_player_id_player_id_fk": { + "name": "gm_list_player_id_player_id_fk", + "tableFrom": "gm_list", + "columnsFrom": [ + "player_id" + ], + "tableTo": "player", + "schemaTo": "player", + "columnsTo": [ + "id" + ], + "onUpdate": "no action", + "onDelete": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, "log.gold_log": { "name": "gold_log", "schema": "log", @@ -978,1153 +1086,6 @@ "checkConstraints": {}, "isRLSEnabled": false }, - "log.hack_log": { - "name": "hack_log", - "schema": "log", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "name": "hack_log_id_seq", - "increment": "1", - "minValue": "1", - "maxValue": "2147483647", - "startWith": "1", - "cache": "1", - "cycle": false, - "schema": "log", - "type": "always" - } - }, - "login": { - "name": "login", - "type": "char(16)", - "primaryKey": false, - "notNull": true - }, - "name": { - "name": "name", - "type": "char(24)", - "primaryKey": false, - "notNull": true - }, - "ip": { - "name": "ip", - "type": "char(15)", - "primaryKey": false, - "notNull": true - }, - "server": { - "name": "server", - "type": "char(100)", - "primaryKey": false, - "notNull": true - }, - "why": { - "name": "why", - "type": "char(191)", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "log.level_log": { - "name": "level_log", - "schema": "log", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "name": "level_log_id_seq", - "increment": "1", - "minValue": "1", - "maxValue": "2147483647", - "startWith": "1", - "cache": "1", - "cycle": false, - "schema": "log", - "type": "always" - } - }, - "name": { - "name": "name", - "type": "char(24)", - "primaryKey": false, - "notNull": true - }, - "level": { - "name": "level", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "playtime": { - "name": "playtime", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "player_id": { - "name": "player_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "level_log_player_id_player_id_fk": { - "name": "level_log_player_id_player_id_fk", - "tableFrom": "level_log", - "columnsFrom": [ - "player_id" - ], - "tableTo": "player", - "schemaTo": "player", - "columnsTo": [ - "id" - ], - "onUpdate": "no action", - "onDelete": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "log.log": { - "name": "log", - "schema": "log", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "name": "log_id_seq", - "increment": "1", - "minValue": "1", - "maxValue": "2147483647", - "startWith": "1", - "cache": "1", - "cycle": false, - "schema": "log", - "type": "always" - } - }, - "type": { - "name": "type", - "type": "log_type", - "typeSchema": "log", - "primaryKey": false, - "notNull": true, - "default": "'ITEM'" - }, - "who": { - "name": "who", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "x": { - "name": "x", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "y": { - "name": "y", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "what": { - "name": "what", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "how": { - "name": "how", - "type": "varchar(50)", - "primaryKey": false, - "notNull": true - }, - "hint": { - "name": "hint", - "type": "varchar(70)", - "primaryKey": false, - "notNull": false - }, - "ip": { - "name": "ip", - "type": "varchar(20)", - "primaryKey": false, - "notNull": false - }, - "vnum": { - "name": "vnum", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "default": "now()" - } - }, - "indexes": { - "log_who": { - "name": "log_who", - "columns": [ - { - "expression": "who", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "with": {}, - "method": "btree", - "concurrently": false - }, - "log_what": { - "name": "log_what", - "columns": [ - { - "expression": "what", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "with": {}, - "method": "btree", - "concurrently": false - }, - "log_how": { - "name": "log_how", - "columns": [ - { - "expression": "how", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "with": {}, - "method": "btree", - "concurrently": false - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "log.login_log": { - "name": "login_log", - "schema": "log", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "name": "login_log_id_seq", - "increment": "1", - "minValue": "1", - "maxValue": "2147483647", - "startWith": "1", - "cache": "1", - "cycle": false, - "schema": "log", - "type": "always" - } - }, - "type": { - "name": "type", - "type": "login_log_type", - "typeSchema": "log", - "primaryKey": false, - "notNull": false - }, - "channel": { - "name": "channel", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "account_id": { - "name": "account_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "player_id": { - "name": "player_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "level": { - "name": "level", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "job": { - "name": "job", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "playtime": { - "name": "playtime", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "default": "now()" - } - }, - "indexes": { - "login_log_player_id": { - "name": "login_log_player_id", - "columns": [ - { - "expression": "player_id", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "type", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "with": {}, - "method": "btree", - "concurrently": false - } - }, - "foreignKeys": { - "login_log_account_id_account_id_fk": { - "name": "login_log_account_id_account_id_fk", - "tableFrom": "login_log", - "columnsFrom": [ - "account_id" - ], - "tableTo": "account", - "schemaTo": "account", - "columnsTo": [ - "id" - ], - "onUpdate": "no action", - "onDelete": "no action" - }, - "login_log_player_id_player_id_fk": { - "name": "login_log_player_id_player_id_fk", - "tableFrom": "login_log", - "columnsFrom": [ - "player_id" - ], - "tableTo": "player", - "schemaTo": "player", - "columnsTo": [ - "id" - ], - "onUpdate": "no action", - "onDelete": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "log.login_log_2": { - "name": "login_log_2", - "schema": "log", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "name": "login_log_2_id_seq", - "increment": "1", - "minValue": "1", - "maxValue": "2147483647", - "startWith": "1", - "cache": "1", - "cycle": false, - "schema": "log", - "type": "always" - } - }, - "type": { - "name": "type", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "is_gm": { - "name": "is_gm", - "type": "boolean", - "primaryKey": false, - "notNull": false - }, - "channel": { - "name": "channel", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "account_id": { - "name": "account_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "player_id": { - "name": "player_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "ip": { - "name": "ip", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "client_version": { - "name": "client_version", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "playtime": { - "name": "playtime", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "login_at": { - "name": "login_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false - }, - "logout_at": { - "name": "logout_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": { - "login_log_2_account_id_account_id_fk": { - "name": "login_log_2_account_id_account_id_fk", - "tableFrom": "login_log_2", - "columnsFrom": [ - "account_id" - ], - "tableTo": "account", - "schemaTo": "account", - "columnsTo": [ - "id" - ], - "onUpdate": "no action", - "onDelete": "no action" - }, - "login_log_2_player_id_player_id_fk": { - "name": "login_log_2_player_id_player_id_fk", - "tableFrom": "login_log_2", - "columnsFrom": [ - "player_id" - ], - "tableTo": "player", - "schemaTo": "player", - "columnsTo": [ - "id" - ], - "onUpdate": "no action", - "onDelete": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "log.money_log": { - "name": "money_log", - "schema": "log", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "name": "money_log_id_seq", - "increment": "1", - "minValue": "1", - "maxValue": "2147483647", - "startWith": "1", - "cache": "1", - "cycle": false, - "schema": "log", - "type": "always" - } - }, - "type": { - "name": "type", - "type": "money_log_type", - "typeSchema": "log", - "primaryKey": false, - "notNull": false - }, - "vnum": { - "name": "vnum", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "gold": { - "name": "gold", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "default": "now()" - } - }, - "indexes": { - "money_log_type": { - "name": "money_log_type", - "columns": [ - { - "expression": "type", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "vnum", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "with": {}, - "method": "btree", - "concurrently": false - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "log.player_count": { - "name": "player_count", - "schema": "log", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "name": "player_count_id_seq", - "increment": "1", - "minValue": "1", - "maxValue": "2147483647", - "startWith": "1", - "cache": "1", - "cycle": false, - "schema": "log", - "type": "always" - } - }, - "count_red": { - "name": "count_red", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "count_yellow": { - "name": "count_yellow", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "count_blue": { - "name": "count_blue", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "count_total": { - "name": "count_total", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "log.quest_reward_log": { - "name": "quest_reward_log", - "schema": "log", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "name": "quest_reward_log_id_seq", - "increment": "1", - "minValue": "1", - "maxValue": "2147483647", - "startWith": "1", - "cache": "1", - "cycle": false, - "schema": "log", - "type": "always" - } - }, - "quest_name": { - "name": "quest_name", - "type": "varchar(32)", - "primaryKey": false, - "notNull": false - }, - "player_id": { - "name": "player_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "player_level": { - "name": "player_level", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "reward_type": { - "name": "reward_type", - "type": "reward_type", - "typeSchema": "log", - "primaryKey": false, - "notNull": false - }, - "reward_value1": { - "name": "reward_value1", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "reward_value2": { - "name": "reward_value2", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "default": "now()" - } - }, - "indexes": { - "quest_reward_log_player_id": { - "name": "quest_reward_log_player_id", - "columns": [ - { - "expression": "player_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "with": {}, - "method": "btree", - "concurrently": false - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "log.refine_log": { - "name": "refine_log", - "schema": "log", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "name": "refine_log_id_seq", - "increment": "1", - "minValue": "1", - "maxValue": "2147483647", - "startWith": "1", - "cache": "1", - "cycle": false, - "schema": "log", - "type": "always" - } - }, - "player_id": { - "name": "player_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "item_name": { - "name": "item_name", - "type": "varchar(24)", - "primaryKey": false, - "notNull": true - }, - "item_id": { - "name": "item_id", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "step": { - "name": "step", - "type": "varchar(50)", - "primaryKey": false, - "notNull": true - }, - "is_success": { - "name": "is_success", - "type": "boolean", - "primaryKey": false, - "notNull": true - }, - "set_type": { - "name": "set_type", - "type": "refine_log_set_type", - "typeSchema": "log", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "refine_log_player_id_player_id_fk": { - "name": "refine_log_player_id_player_id_fk", - "tableFrom": "refine_log", - "columnsFrom": [ - "player_id" - ], - "tableTo": "player", - "schemaTo": "player", - "columnsTo": [ - "id" - ], - "onUpdate": "no action", - "onDelete": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "log.shout_log": { - "name": "shout_log", - "schema": "log", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "name": "shout_log_id_seq", - "increment": "1", - "minValue": "1", - "maxValue": "2147483647", - "startWith": "1", - "cache": "1", - "cycle": false, - "schema": "log", - "type": "always" - } - }, - "channel": { - "name": "channel", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "empire": { - "name": "empire", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "shout": { - "name": "shout", - "type": "varchar(350)", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "default": "now()" - } - }, - "indexes": { - "shout_log_created_at": { - "name": "shout_log_created_at", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "with": {}, - "method": "btree", - "concurrently": false - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "log.speed_hack_log": { - "name": "speed_hack_log", - "schema": "log", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "name": "speed_hack_log_id_seq", - "increment": "1", - "minValue": "1", - "maxValue": "2147483647", - "startWith": "1", - "cache": "1", - "cycle": false, - "schema": "log", - "type": "always" - } - }, - "player_id": { - "name": "player_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "x": { - "name": "x", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "y": { - "name": "y", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "hack_count": { - "name": "hack_count", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": { - "speed_hack_log_player_id_player_id_fk": { - "name": "speed_hack_log_player_id_player_id_fk", - "tableFrom": "speed_hack_log", - "columnsFrom": [ - "player_id" - ], - "tableTo": "player", - "schemaTo": "player", - "columnsTo": [ - "id" - ], - "onUpdate": "no action", - "onDelete": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "player.affect": { - "name": "affect", - "schema": "player", - "columns": { - "player_id": { - "name": "player_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "type": { - "name": "type", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "apply_on": { - "name": "apply_on", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "apply_value": { - "name": "apply_value", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "flag": { - "name": "flag", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "duration": { - "name": "duration", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "sp_cost": { - "name": "sp_cost", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - } - }, - "indexes": {}, - "foreignKeys": { - "affect_player_id_player_id_fk": { - "name": "affect_player_id_player_id_fk", - "tableFrom": "affect", - "columnsFrom": [ - "player_id" - ], - "tableTo": "player", - "schemaTo": "player", - "columnsTo": [ - "id" - ], - "onUpdate": "no action", - "onDelete": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "player.banword": { - "name": "banword", - "schema": "player", - "columns": { - "word": { - "name": "word", - "type": "text", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "player.change_empire": { - "name": "change_empire", - "schema": "player", - "columns": { - "account_id": { - "name": "account_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "change_count": { - "name": "change_count", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "change_empire_account_id_account_id_fk": { - "name": "change_empire_account_id_account_id_fk", - "tableFrom": "change_empire", - "columnsFrom": [ - "account_id" - ], - "tableTo": "account", - "schemaTo": "account", - "columnsTo": [ - "id" - ], - "onUpdate": "no action", - "onDelete": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, "player.guild": { "name": "guild", "schema": "player", @@ -2513,7 +1474,7 @@ "columns": { "login": { "name": "login", - "type": "varchar(24)", + "type": "varchar(30)", "primaryKey": false, "notNull": true }, @@ -2539,6 +1500,20 @@ }, "indexes": {}, "foreignKeys": { + "guild_war_bet_login_account_login_fk": { + "name": "guild_war_bet_login_account_login_fk", + "tableFrom": "guild_war_bet", + "columnsFrom": [ + "login" + ], + "tableTo": "account", + "schemaTo": "account", + "columnsTo": [ + "login" + ], + "onUpdate": "no action", + "onDelete": "no action" + }, "guild_war_bet_guild_id_guild_id_fk": { "name": "guild_war_bet_guild_id_guild_id_fk", "tableFrom": "guild_war_bet", @@ -2736,6 +1711,88 @@ "checkConstraints": {}, "isRLSEnabled": false }, + "log.hack_log": { + "name": "hack_log", + "schema": "log", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "identity": { + "name": "hack_log_id_seq", + "increment": "1", + "minValue": "1", + "maxValue": "2147483647", + "startWith": "1", + "cache": "1", + "cycle": false, + "schema": "log", + "type": "always" + } + }, + "login": { + "name": "login", + "type": "varchar(30)", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "char(24)", + "primaryKey": false, + "notNull": true + }, + "ip": { + "name": "ip", + "type": "char(15)", + "primaryKey": false, + "notNull": true + }, + "server": { + "name": "server", + "type": "char(100)", + "primaryKey": false, + "notNull": true + }, + "why": { + "name": "why", + "type": "char(191)", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "hack_log_login_account_login_fk": { + "name": "hack_log_login_account_login_fk", + "tableFrom": "hack_log", + "columnsFrom": [ + "login" + ], + "tableTo": "account", + "schemaTo": "account", + "columnsTo": [ + "login" + ], + "onUpdate": "no action", + "onDelete": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, "player.horse_name": { "name": "horse_name", "schema": "player", @@ -3399,6 +2456,20 @@ ], "onUpdate": "no action", "onDelete": "no action" + }, + "item_award_login_account_login_fk": { + "name": "item_award_login_account_login_fk", + "tableFrom": "item_award", + "columnsFrom": [ + "login" + ], + "tableTo": "account", + "schemaTo": "account", + "columnsTo": [ + "login" + ], + "onUpdate": "no action", + "onDelete": "no action" } }, "compositePrimaryKeys": {}, @@ -3791,6 +2862,519 @@ "checkConstraints": {}, "isRLSEnabled": false }, + "log.level_log": { + "name": "level_log", + "schema": "log", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "identity": { + "name": "level_log_id_seq", + "increment": "1", + "minValue": "1", + "maxValue": "2147483647", + "startWith": "1", + "cache": "1", + "cycle": false, + "schema": "log", + "type": "always" + } + }, + "name": { + "name": "name", + "type": "char(24)", + "primaryKey": false, + "notNull": true + }, + "level": { + "name": "level", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "playtime": { + "name": "playtime", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "player_id": { + "name": "player_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "level_log_player_id_player_id_fk": { + "name": "level_log_player_id_player_id_fk", + "tableFrom": "level_log", + "columnsFrom": [ + "player_id" + ], + "tableTo": "player", + "schemaTo": "player", + "columnsTo": [ + "id" + ], + "onUpdate": "no action", + "onDelete": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "common.locale": { + "name": "locale", + "schema": "common", + "columns": { + "key": { + "name": "key", + "type": "varchar(191)", + "primaryKey": false, + "notNull": true + }, + "value": { + "name": "value", + "type": "varchar(191)", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "locale_key": { + "name": "locale_key", + "columns": [ + { + "expression": "key", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "with": {}, + "method": "btree", + "concurrently": false + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "log.log": { + "name": "log", + "schema": "log", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "identity": { + "name": "log_id_seq", + "increment": "1", + "minValue": "1", + "maxValue": "2147483647", + "startWith": "1", + "cache": "1", + "cycle": false, + "schema": "log", + "type": "always" + } + }, + "type": { + "name": "type", + "type": "log_type", + "typeSchema": "log", + "primaryKey": false, + "notNull": true, + "default": "'ITEM'" + }, + "who": { + "name": "who", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "x": { + "name": "x", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "y": { + "name": "y", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "what": { + "name": "what", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "how": { + "name": "how", + "type": "varchar(50)", + "primaryKey": false, + "notNull": true + }, + "hint": { + "name": "hint", + "type": "varchar(70)", + "primaryKey": false, + "notNull": false + }, + "ip": { + "name": "ip", + "type": "varchar(16)", + "primaryKey": false, + "notNull": false + }, + "vnum": { + "name": "vnum", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + } + }, + "indexes": { + "log_who": { + "name": "log_who", + "columns": [ + { + "expression": "who", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "with": {}, + "method": "btree", + "concurrently": false + }, + "log_what": { + "name": "log_what", + "columns": [ + { + "expression": "what", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "with": {}, + "method": "btree", + "concurrently": false + }, + "log_how": { + "name": "log_how", + "columns": [ + { + "expression": "how", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "with": {}, + "method": "btree", + "concurrently": false + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "log.login_log": { + "name": "login_log", + "schema": "log", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "identity": { + "name": "login_log_id_seq", + "increment": "1", + "minValue": "1", + "maxValue": "2147483647", + "startWith": "1", + "cache": "1", + "cycle": false, + "schema": "log", + "type": "always" + } + }, + "type": { + "name": "type", + "type": "login_log_type", + "typeSchema": "log", + "primaryKey": false, + "notNull": false + }, + "channel": { + "name": "channel", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "account_id": { + "name": "account_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "player_id": { + "name": "player_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "level": { + "name": "level", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "job": { + "name": "job", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "playtime": { + "name": "playtime", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + } + }, + "indexes": { + "login_log_player_id": { + "name": "login_log_player_id", + "columns": [ + { + "expression": "player_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "type", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "with": {}, + "method": "btree", + "concurrently": false + } + }, + "foreignKeys": { + "login_log_account_id_account_id_fk": { + "name": "login_log_account_id_account_id_fk", + "tableFrom": "login_log", + "columnsFrom": [ + "account_id" + ], + "tableTo": "account", + "schemaTo": "account", + "columnsTo": [ + "id" + ], + "onUpdate": "no action", + "onDelete": "no action" + }, + "login_log_player_id_player_id_fk": { + "name": "login_log_player_id_player_id_fk", + "tableFrom": "login_log", + "columnsFrom": [ + "player_id" + ], + "tableTo": "player", + "schemaTo": "player", + "columnsTo": [ + "id" + ], + "onUpdate": "no action", + "onDelete": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "log.login_log_2": { + "name": "login_log_2", + "schema": "log", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "identity": { + "name": "login_log_2_id_seq", + "increment": "1", + "minValue": "1", + "maxValue": "2147483647", + "startWith": "1", + "cache": "1", + "cycle": false, + "schema": "log", + "type": "always" + } + }, + "type": { + "name": "type", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "is_gm": { + "name": "is_gm", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "channel": { + "name": "channel", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "account_id": { + "name": "account_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "player_id": { + "name": "player_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "ip": { + "name": "ip", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "client_version": { + "name": "client_version", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "playtime": { + "name": "playtime", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "login_at": { + "name": "login_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "logout_at": { + "name": "logout_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + } + }, + "indexes": {}, + "foreignKeys": { + "login_log_2_account_id_account_id_fk": { + "name": "login_log_2_account_id_account_id_fk", + "tableFrom": "login_log_2", + "columnsFrom": [ + "account_id" + ], + "tableTo": "account", + "schemaTo": "account", + "columnsTo": [ + "id" + ], + "onUpdate": "no action", + "onDelete": "no action" + }, + "login_log_2_player_id_player_id_fk": { + "name": "login_log_2_player_id_player_id_fk", + "tableFrom": "login_log_2", + "columnsFrom": [ + "player_id" + ], + "tableTo": "player", + "schemaTo": "player", + "columnsTo": [ + "id" + ], + "onUpdate": "no action", + "onDelete": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, "player.lotto_list": { "name": "lotto_list", "schema": "player", @@ -4613,6 +4197,86 @@ "checkConstraints": {}, "isRLSEnabled": false }, + "log.money_log": { + "name": "money_log", + "schema": "log", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "identity": { + "name": "money_log_id_seq", + "increment": "1", + "minValue": "1", + "maxValue": "2147483647", + "startWith": "1", + "cache": "1", + "cycle": false, + "schema": "log", + "type": "always" + } + }, + "type": { + "name": "type", + "type": "money_log_type", + "typeSchema": "log", + "primaryKey": false, + "notNull": false + }, + "vnum": { + "name": "vnum", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "gold": { + "name": "gold", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + } + }, + "indexes": { + "money_log_type": { + "name": "money_log_type", + "columns": [ + { + "expression": "type", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "vnum", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "with": {}, + "method": "btree", + "concurrently": false + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, "player.myshop_pricelist": { "name": "myshop_pricelist", "schema": "player", @@ -4900,6 +4564,64 @@ "checkConstraints": {}, "isRLSEnabled": false }, + "web.password_reset_session": { + "name": "password_reset_session", + "schema": "web", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "email": { + "name": "email", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "code": { + "name": "code", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "expires_at": { + "name": "expires_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "password_reset_session_user_id_account_id_fk": { + "name": "password_reset_session_user_id_account_id_fk", + "tableFrom": "password_reset_session", + "columnsFrom": [ + "user_id" + ], + "tableTo": "account", + "schemaTo": "account", + "columnsTo": [ + "id" + ], + "onUpdate": "no action", + "onDelete": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, "player.player": { "name": "player", "schema": "player", @@ -5113,7 +4835,7 @@ }, "ip": { "name": "ip", - "type": "varchar(15)", + "type": "varchar(16)", "primaryKey": false, "notNull": false, "default": "'0.0.0.0'" @@ -5287,6 +5009,67 @@ "checkConstraints": {}, "isRLSEnabled": false }, + "log.player_count": { + "name": "player_count", + "schema": "log", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "identity": { + "name": "player_count_id_seq", + "increment": "1", + "minValue": "1", + "maxValue": "2147483647", + "startWith": "1", + "cache": "1", + "cycle": false, + "schema": "log", + "type": "always" + } + }, + "count_red": { + "name": "count_red", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "count_yellow": { + "name": "count_yellow", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "count_blue": { + "name": "count_blue", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "count_total": { + "name": "count_total", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, "player.player_deleted": { "name": "player_deleted", "schema": "player", @@ -5500,7 +5283,7 @@ }, "ip": { "name": "ip", - "type": "varchar(15)", + "type": "varchar(16)", "primaryKey": false, "notNull": false, "default": "'0.0.0.0'" @@ -5848,6 +5631,186 @@ "checkConstraints": {}, "isRLSEnabled": false }, + "log.quest_reward_log": { + "name": "quest_reward_log", + "schema": "log", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "identity": { + "name": "quest_reward_log_id_seq", + "increment": "1", + "minValue": "1", + "maxValue": "2147483647", + "startWith": "1", + "cache": "1", + "cycle": false, + "schema": "log", + "type": "always" + } + }, + "quest_name": { + "name": "quest_name", + "type": "varchar(32)", + "primaryKey": false, + "notNull": false + }, + "player_id": { + "name": "player_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "player_level": { + "name": "player_level", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "reward_type": { + "name": "reward_type", + "type": "reward_type", + "typeSchema": "log", + "primaryKey": false, + "notNull": false + }, + "reward_value1": { + "name": "reward_value1", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "reward_value2": { + "name": "reward_value2", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + } + }, + "indexes": { + "quest_reward_log_player_id": { + "name": "quest_reward_log_player_id", + "columns": [ + { + "expression": "player_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "with": {}, + "method": "btree", + "concurrently": false + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "log.refine_log": { + "name": "refine_log", + "schema": "log", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "identity": { + "name": "refine_log_id_seq", + "increment": "1", + "minValue": "1", + "maxValue": "2147483647", + "startWith": "1", + "cache": "1", + "cycle": false, + "schema": "log", + "type": "always" + } + }, + "player_id": { + "name": "player_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "item_name": { + "name": "item_name", + "type": "varchar(24)", + "primaryKey": false, + "notNull": true + }, + "item_id": { + "name": "item_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "step": { + "name": "step", + "type": "varchar(50)", + "primaryKey": false, + "notNull": true + }, + "is_success": { + "name": "is_success", + "type": "boolean", + "primaryKey": false, + "notNull": true + }, + "set_type": { + "name": "set_type", + "type": "refine_log_set_type", + "typeSchema": "log", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "refine_log_player_id_player_id_fk": { + "name": "refine_log_player_id_player_id_fk", + "tableFrom": "refine_log", + "columnsFrom": [ + "player_id" + ], + "tableTo": "player", + "schemaTo": "player", + "columnsTo": [ + "id" + ], + "onUpdate": "no action", + "onDelete": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, "player.refine_proto": { "name": "refine_proto", "schema": "player", @@ -6045,6 +6008,59 @@ "checkConstraints": {}, "isRLSEnabled": false }, + "web.session": { + "name": "session", + "schema": "web", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "ip": { + "name": "ip", + "type": "varchar(16)", + "primaryKey": false, + "notNull": true, + "default": "'0.0.0.0'" + }, + "expires_at": { + "name": "expires_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "session_user_id_account_id_fk": { + "name": "session_user_id_account_id_fk", + "tableFrom": "session", + "columnsFrom": [ + "user_id" + ], + "tableTo": "account", + "schemaTo": "account", + "columnsTo": [ + "id" + ], + "onUpdate": "no action", + "onDelete": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, "player.shop": { "name": "shop", "schema": "player", @@ -6166,6 +6182,77 @@ "checkConstraints": {}, "isRLSEnabled": false }, + "log.shout_log": { + "name": "shout_log", + "schema": "log", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "identity": { + "name": "shout_log_id_seq", + "increment": "1", + "minValue": "1", + "maxValue": "2147483647", + "startWith": "1", + "cache": "1", + "cycle": false, + "schema": "log", + "type": "always" + } + }, + "channel": { + "name": "channel", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "empire": { + "name": "empire", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "shout": { + "name": "shout", + "type": "varchar(350)", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + } + }, + "indexes": { + "shout_log_created_at": { + "name": "shout_log_created_at", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "with": {}, + "method": "btree", + "concurrently": false + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, "player.skill_proto": { "name": "skill_proto", "schema": "player", @@ -6423,6 +6510,432 @@ "policies": {}, "checkConstraints": {}, "isRLSEnabled": false + }, + "common.spam_db": { + "name": "spam_db", + "schema": "common", + "columns": { + "type": { + "name": "type", + "type": "spam_type", + "typeSchema": "common", + "primaryKey": false, + "notNull": true, + "default": "'SPAM'" + }, + "word": { + "name": "word", + "type": "varchar(256)", + "primaryKey": false, + "notNull": true + }, + "score": { + "name": "score", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 10 + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "log.speed_hack_log": { + "name": "speed_hack_log", + "schema": "log", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "identity": { + "name": "speed_hack_log_id_seq", + "increment": "1", + "minValue": "1", + "maxValue": "2147483647", + "startWith": "1", + "cache": "1", + "cycle": false, + "schema": "log", + "type": "always" + } + }, + "player_id": { + "name": "player_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "x": { + "name": "x", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "y": { + "name": "y", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "hack_count": { + "name": "hack_count", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + } + }, + "indexes": {}, + "foreignKeys": { + "speed_hack_log_player_id_player_id_fk": { + "name": "speed_hack_log_player_id_player_id_fk", + "tableFrom": "speed_hack_log", + "columnsFrom": [ + "player_id" + ], + "tableTo": "player", + "schemaTo": "player", + "columnsTo": [ + "id" + ], + "onUpdate": "no action", + "onDelete": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "web.ticket": { + "name": "ticket", + "schema": "web", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "identity": { + "name": "ticket_id_seq", + "increment": "1", + "minValue": "1", + "maxValue": "2147483647", + "startWith": "1", + "cache": "1", + "cycle": false, + "schema": "web", + "type": "byDefault" + } + }, + "userId": { + "name": "userId", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "categoryId": { + "name": "categoryId", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "title": { + "name": "title", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "closed_at": { + "name": "closed_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + } + }, + "indexes": {}, + "foreignKeys": { + "ticket_userId_account_id_fk": { + "name": "ticket_userId_account_id_fk", + "tableFrom": "ticket", + "columnsFrom": [ + "userId" + ], + "tableTo": "account", + "schemaTo": "account", + "columnsTo": [ + "id" + ], + "onUpdate": "no action", + "onDelete": "no action" + }, + "ticket_categoryId_ticket_category_id_fk": { + "name": "ticket_categoryId_ticket_category_id_fk", + "tableFrom": "ticket", + "columnsFrom": [ + "categoryId" + ], + "tableTo": "ticket_category", + "schemaTo": "web", + "columnsTo": [ + "id" + ], + "onUpdate": "no action", + "onDelete": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "web.ticket_attachment": { + "name": "ticket_attachment", + "schema": "web", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "identity": { + "name": "ticket_attachment_id_seq", + "increment": "1", + "minValue": "1", + "maxValue": "2147483647", + "startWith": "1", + "cache": "1", + "cycle": false, + "schema": "web", + "type": "byDefault" + } + }, + "ticket_comment_id": { + "name": "ticket_comment_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "preview": { + "name": "preview", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "type": { + "name": "type", + "type": "ticket_attachment_type", + "typeSchema": "web", + "primaryKey": false, + "notNull": true, + "default": "'other'" + }, + "size": { + "name": "size", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "url": { + "name": "url", + "type": "text", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "ticket_attachment_ticket_comment_id_ticket_comment_id_fk": { + "name": "ticket_attachment_ticket_comment_id_ticket_comment_id_fk", + "tableFrom": "ticket_attachment", + "columnsFrom": [ + "ticket_comment_id" + ], + "tableTo": "ticket_comment", + "schemaTo": "web", + "columnsTo": [ + "id" + ], + "onUpdate": "no action", + "onDelete": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "web.ticket_category": { + "name": "ticket_category", + "schema": "web", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "identity": { + "name": "ticket_category_id_seq", + "increment": "1", + "minValue": "1", + "maxValue": "2147483647", + "startWith": "1", + "cache": "1", + "cycle": false, + "schema": "web", + "type": "byDefault" + } + }, + "label": { + "name": "label", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "published_at": { + "name": "published_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "web.ticket_comment": { + "name": "ticket_comment", + "schema": "web", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "identity": { + "name": "ticket_comment_id_seq", + "increment": "1", + "minValue": "1", + "maxValue": "2147483647", + "startWith": "1", + "cache": "1", + "cycle": false, + "schema": "web", + "type": "byDefault" + } + }, + "userId": { + "name": "userId", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "ticketId": { + "name": "ticketId", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "comment": { + "name": "comment", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + } + }, + "indexes": {}, + "foreignKeys": { + "ticket_comment_userId_account_id_fk": { + "name": "ticket_comment_userId_account_id_fk", + "tableFrom": "ticket_comment", + "columnsFrom": [ + "userId" + ], + "tableTo": "account", + "schemaTo": "account", + "columnsTo": [ + "id" + ], + "onUpdate": "no action", + "onDelete": "no action" + }, + "ticket_comment_ticketId_ticket_id_fk": { + "name": "ticket_comment_ticketId_ticket_id_fk", + "tableFrom": "ticket_comment", + "columnsFrom": [ + "ticketId" + ], + "tableTo": "ticket", + "schemaTo": "web", + "columnsTo": [ + "id" + ], + "onUpdate": "no action", + "onDelete": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false } }, "enums": { @@ -6437,14 +6950,6 @@ "PLAYER" ] }, - "common.spam_type": { - "name": "spam_type", - "schema": "common", - "values": [ - "GOOD", - "SPAM" - ] - }, "log.gold_log_how": { "name": "gold_log_how", "schema": "log", @@ -6458,58 +6963,6 @@ "QUEST" ] }, - "log.log_type": { - "name": "log_type", - "schema": "log", - "values": [ - "ITEM", - "CHARACTER" - ] - }, - "log.login_log_type": { - "name": "login_log_type", - "schema": "log", - "values": [ - "LOGIN", - "LOGOUT" - ] - }, - "log.money_log_type": { - "name": "money_log_type", - "schema": "log", - "values": [ - "MONSTER", - "SHOP", - "REFINE", - "QUEST", - "GUILD", - "MISC", - "KILL", - "DROP" - ] - }, - "log.refine_log_set_type": { - "name": "refine_log_set_type", - "schema": "log", - "values": [ - "SOCKET", - "POWER", - "ROD", - "GUILD", - "SCROLL", - "HYUNIRON", - "GOD_SCROLL", - "MUSIN_SCROLL" - ] - }, - "log.reward_type": { - "name": "reward_type", - "schema": "log", - "values": [ - "EXP", - "ITEM" - ] - }, "player.guild_grade_auth": { "name": "guild_grade_auth", "schema": "player", @@ -6699,7 +7152,8 @@ "ATT_BONUS_TO_MONSTER", "NORMAL_HIT_DEFEND_BONUS", "SKILL_DEFEND_BONUS", - "NOUSE2'NOUSE3", + "NOUSE2", + "NOUSE3", "NOUSE4", "NOUSE5", "NOUSE6", @@ -6729,6 +7183,22 @@ "BELT_INVENTORY" ] }, + "log.log_type": { + "name": "log_type", + "schema": "log", + "values": [ + "ITEM", + "CHARACTER" + ] + }, + "log.login_log_type": { + "name": "login_log_type", + "schema": "log", + "values": [ + "LOGIN", + "LOGOUT" + ] + }, "player.mob_ai_flag": { "name": "mob_ai_flag", "schema": "player", @@ -6791,6 +7261,42 @@ "BIG" ] }, + "log.money_log_type": { + "name": "money_log_type", + "schema": "log", + "values": [ + "MONSTER", + "SHOP", + "REFINE", + "QUEST", + "GUILD", + "MISC", + "KILL", + "DROP" + ] + }, + "log.refine_log_set_type": { + "name": "refine_log_set_type", + "schema": "log", + "values": [ + "SOCKET", + "POWER", + "ROD", + "GUILD", + "SCROLL", + "HYUNIRON", + "GOD_SCROLL", + "MUSIN_SCROLL" + ] + }, + "log.reward_type": { + "name": "reward_type", + "schema": "log", + "values": [ + "EXP", + "ITEM" + ] + }, "player.skill_proto_set_affect_flag": { "name": "skill_proto_set_affect_flag", "schema": "player", @@ -6899,13 +7405,32 @@ "RANGE", "MAGIC" ] + }, + "common.spam_type": { + "name": "spam_type", + "schema": "common", + "values": [ + "GOOD", + "SPAM" + ] + }, + "web.ticket_attachment_type": { + "name": "ticket_attachment_type", + "schema": "web", + "values": [ + "image", + "video", + "document", + "other" + ] } }, "schemas": { "account": "account", "common": "common", "log": "log", - "player": "player" + "player": "player", + "web": "web" }, "views": {}, "sequences": {}, diff --git a/drizzle/meta/0003_snapshot.json b/drizzle/meta/0003_snapshot.json deleted file mode 100644 index aeba155..0000000 --- a/drizzle/meta/0003_snapshot.json +++ /dev/null @@ -1,7032 +0,0 @@ -{ - "id": "b2190459-5f76-4356-ace7-01a59190976a", - "prevId": "99735262-8eca-4ff6-b898-cdd59013b677", - "version": "7", - "dialect": "postgresql", - "tables": { - "account.account": { - "name": "account", - "schema": "account", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "account_id_seq", - "schema": "account", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "login": { - "name": "login", - "type": "varchar(30)", - "primaryKey": false, - "notNull": true - }, - "password": { - "name": "password", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "social_id": { - "name": "social_id", - "type": "varchar(13)", - "primaryKey": false, - "notNull": true - }, - "email": { - "name": "email", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "status": { - "name": "status", - "type": "varchar(8)", - "primaryKey": false, - "notNull": true, - "default": "'OK'" - }, - "security_code": { - "name": "security_code", - "type": "varchar(192)", - "primaryKey": false, - "notNull": false - }, - "available_dt": { - "name": "available_dt", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "mileage": { - "name": "mileage", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "cash": { - "name": "cash", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "gold_expired_at": { - "name": "gold_expired_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "silver_expired_at": { - "name": "silver_expired_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "safebox_expired_at": { - "name": "safebox_expired_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "autoloot_expired_at": { - "name": "autoloot_expired_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "fish_mind_expired_at": { - "name": "fish_mind_expired_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "marriage_fast_expired_at": { - "name": "marriage_fast_expired_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "money_drop_rate_expired_at": { - "name": "money_drop_rate_expired_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "ip": { - "name": "ip", - "type": "varchar(16)", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "last_played_at": { - "name": "last_played_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "account_social_id": { - "name": "account_social_id", - "columns": [ - { - "expression": "social_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "account_login": { - "name": "account_login", - "nullsNotDistinct": false, - "columns": [ - "login" - ] - }, - "account_email": { - "name": "account_email", - "nullsNotDistinct": false, - "columns": [ - "email" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "player.affect": { - "name": "affect", - "schema": "player", - "columns": { - "player_id": { - "name": "player_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "type": { - "name": "type", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "apply_on": { - "name": "apply_on", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "apply_value": { - "name": "apply_value", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "flag": { - "name": "flag", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "duration": { - "name": "duration", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "sp_cost": { - "name": "sp_cost", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - } - }, - "indexes": {}, - "foreignKeys": { - "affect_player_id_player_id_fk": { - "name": "affect_player_id_player_id_fk", - "tableFrom": "affect", - "tableTo": "player", - "schemaTo": "player", - "columnsFrom": [ - "player_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "player.banword": { - "name": "banword", - "schema": "player", - "columns": { - "word": { - "name": "word", - "type": "text", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "log.boot_log": { - "name": "boot_log", - "schema": "log", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "boot_log_id_seq", - "schema": "log", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "hostname": { - "name": "hostname", - "type": "char(128)", - "primaryKey": false, - "notNull": true, - "default": "'UNKNOWN'" - }, - "channel": { - "name": "channel", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "player.change_empire": { - "name": "change_empire", - "schema": "player", - "columns": { - "account_id": { - "name": "account_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "change_count": { - "name": "change_count", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "change_empire_account_id_account_id_fk": { - "name": "change_empire_account_id_account_id_fk", - "tableFrom": "change_empire", - "tableTo": "account", - "schemaTo": "account", - "columnsFrom": [ - "account_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "log.change_name": { - "name": "change_name", - "schema": "log", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "change_name_id_seq", - "schema": "log", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "player_id": { - "name": "player_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "old_name": { - "name": "old_name", - "type": "varchar(191)", - "primaryKey": false, - "notNull": false - }, - "new_name": { - "name": "new_name", - "type": "varchar(191)", - "primaryKey": false, - "notNull": false - }, - "ip": { - "name": "ip", - "type": "varchar(16)", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "change_name_player_id_player_id_fk": { - "name": "change_name_player_id_player_id_fk", - "tableFrom": "change_name", - "tableTo": "player", - "schemaTo": "player", - "columnsFrom": [ - "player_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "log.command_log": { - "name": "command_log", - "schema": "log", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "command_log_id_seq", - "schema": "log", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "player_id": { - "name": "player_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "server": { - "name": "server", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "ip": { - "name": "ip", - "type": "varchar(16)", - "primaryKey": false, - "notNull": true - }, - "port": { - "name": "port", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "username": { - "name": "username", - "type": "varchar(50)", - "primaryKey": false, - "notNull": true - }, - "command": { - "name": "command", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "command_log_player_id_player_id_fk": { - "name": "command_log_player_id_player_id_fk", - "tableFrom": "command_log", - "tableTo": "player", - "schemaTo": "player", - "columnsFrom": [ - "player_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "log.cube_log": { - "name": "cube_log", - "schema": "log", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "cube_log_id_seq", - "schema": "log", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "player_id": { - "name": "player_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "x": { - "name": "x", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "y": { - "name": "y", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "item_vnum": { - "name": "item_vnum", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "item_uid": { - "name": "item_uid", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "item_count": { - "name": "item_count", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "success": { - "name": "success", - "type": "boolean", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "default": "now()" - } - }, - "indexes": { - "cube_log_player_id": { - "name": "cube_log_player_id", - "columns": [ - { - "expression": "player_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "cube_log_item_vnum": { - "name": "cube_log_item_vnum", - "columns": [ - { - "expression": "item_vnum", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "cube_log_item_uid": { - "name": "cube_log_item_uid", - "columns": [ - { - "expression": "item_uid", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "log.dragon_slay_log": { - "name": "dragon_slay_log", - "schema": "log", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "dragon_slay_log_id_seq", - "schema": "log", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "guild_id": { - "name": "guild_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "vnum": { - "name": "vnum", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "start_time": { - "name": "start_time", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "end_time": { - "name": "end_time", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "log.fish_log": { - "name": "fish_log", - "schema": "log", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "fish_log_id_seq", - "schema": "log", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "player_id": { - "name": "player_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "map_index": { - "name": "map_index", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "fish_id": { - "name": "fish_id", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "fishing_level": { - "name": "fishing_level", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "waiting_time": { - "name": "waiting_time", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "success": { - "name": "success", - "type": "boolean", - "primaryKey": false, - "notNull": true - }, - "size": { - "name": "size", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "fish_log_player_id_player_id_fk": { - "name": "fish_log_player_id_player_id_fk", - "tableFrom": "fish_log", - "tableTo": "player", - "schemaTo": "player", - "columnsFrom": [ - "player_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "common.gm_host": { - "name": "gm_host", - "schema": "common", - "columns": { - "ip": { - "name": "ip", - "type": "varchar(16)", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "common.gm_list": { - "name": "gm_list", - "schema": "common", - "columns": { - "player_id": { - "name": "player_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "contact_ip": { - "name": "contact_ip", - "type": "varchar(16)", - "primaryKey": false, - "notNull": true - }, - "server_ip": { - "name": "server_ip", - "type": "varchar(16)", - "primaryKey": false, - "notNull": true, - "default": "'ALL'" - }, - "authority": { - "name": "authority", - "type": "gm_authority", - "typeSchema": "common", - "primaryKey": false, - "notNull": false, - "default": "'PLAYER'" - } - }, - "indexes": {}, - "foreignKeys": { - "gm_list_player_id_player_id_fk": { - "name": "gm_list_player_id_player_id_fk", - "tableFrom": "gm_list", - "tableTo": "player", - "schemaTo": "player", - "columnsFrom": [ - "player_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "log.gold_log": { - "name": "gold_log", - "schema": "log", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "gold_log_id_seq", - "schema": "log", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "player_id": { - "name": "player_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "what": { - "name": "what", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "how": { - "name": "how", - "type": "gold_log_how", - "typeSchema": "log", - "primaryKey": false, - "notNull": true - }, - "hint": { - "name": "hint", - "type": "varchar(50)", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "default": "now()" - } - }, - "indexes": { - "gold_log_created_at": { - "name": "gold_log_created_at", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "gold_log_player_id": { - "name": "gold_log_player_id", - "columns": [ - { - "expression": "player_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "gold_log_what": { - "name": "gold_log_what", - "columns": [ - { - "expression": "what", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "gold_log_how": { - "name": "gold_log_how", - "columns": [ - { - "expression": "how", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "gold_log_player_id_player_id_fk": { - "name": "gold_log_player_id_player_id_fk", - "tableFrom": "gold_log", - "tableTo": "player", - "schemaTo": "player", - "columnsFrom": [ - "player_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "player.guild": { - "name": "guild", - "schema": "player", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "guild_id_seq", - "schema": "player", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "name": { - "name": "name", - "type": "varchar(12)", - "primaryKey": false, - "notNull": true - }, - "sp": { - "name": "sp", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 1000 - }, - "master": { - "name": "master", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "level": { - "name": "level", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "exp": { - "name": "exp", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "skill_point": { - "name": "skill_point", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "skill": { - "name": "skill", - "type": "bytea", - "primaryKey": false, - "notNull": false - }, - "win": { - "name": "win", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "draw": { - "name": "draw", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "loss": { - "name": "loss", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "ladder_point": { - "name": "ladder_point", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "gold": { - "name": "gold", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "player.guild_comment": { - "name": "guild_comment", - "schema": "player", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "guild_comment_id_seq", - "schema": "player", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "guild_id": { - "name": "guild_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "name": { - "name": "name", - "type": "varchar(8)", - "primaryKey": false, - "notNull": false - }, - "notice": { - "name": "notice", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "content": { - "name": "content", - "type": "varchar(50)", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "aaa": { - "name": "aaa", - "columns": [ - { - "expression": "notice", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "id", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "guild_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "guild_comment_guild_id": { - "name": "guild_comment_guild_id", - "columns": [ - { - "expression": "guild_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "guild_comment_guild_id_guild_id_fk": { - "name": "guild_comment_guild_id_guild_id_fk", - "tableFrom": "guild_comment", - "tableTo": "guild", - "schemaTo": "player", - "columnsFrom": [ - "guild_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "player.guild_grade": { - "name": "guild_grade", - "schema": "player", - "columns": { - "guild_id": { - "name": "guild_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "grade": { - "name": "grade", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "name": { - "name": "name", - "type": "varchar(8)", - "primaryKey": false, - "notNull": true - }, - "auth": { - "name": "auth", - "type": "guild_grade_auth[]", - "primaryKey": false, - "notNull": true, - "default": "'{}'" - }, - "auth_bits": { - "name": "auth_bits", - "type": "bigint", - "primaryKey": false, - "notNull": false, - "generated": { - "as": "enum_array_to_bitmask(\"player\".\"guild_grade\".\"auth\")", - "type": "stored" - } - } - }, - "indexes": {}, - "foreignKeys": { - "guild_grade_guild_id_guild_id_fk": { - "name": "guild_grade_guild_id_guild_id_fk", - "tableFrom": "guild_grade", - "tableTo": "guild", - "schemaTo": "player", - "columnsFrom": [ - "guild_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "player.guild_member": { - "name": "guild_member", - "schema": "player", - "columns": { - "player_id": { - "name": "player_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "guild_id": { - "name": "guild_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "grade": { - "name": "grade", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "is_general": { - "name": "is_general", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "offer": { - "name": "offer", - "type": "integer", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": { - "guild_member_player_id_player_id_fk": { - "name": "guild_member_player_id_player_id_fk", - "tableFrom": "guild_member", - "tableTo": "player", - "schemaTo": "player", - "columnsFrom": [ - "player_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "guild_member_guild_id_guild_id_fk": { - "name": "guild_member_guild_id_guild_id_fk", - "tableFrom": "guild_member", - "tableTo": "guild", - "schemaTo": "player", - "columnsFrom": [ - "guild_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "guild_member_player_id_guild_id_pk": { - "name": "guild_member_player_id_guild_id_pk", - "columns": [ - "player_id", - "guild_id" - ] - } - }, - "uniqueConstraints": { - "player_id": { - "name": "player_id", - "nullsNotDistinct": false, - "columns": [ - "player_id" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "player.guild_war_bet": { - "name": "guild_war_bet", - "schema": "player", - "columns": { - "login": { - "name": "login", - "type": "varchar(24)", - "primaryKey": false, - "notNull": true - }, - "gold": { - "name": "gold", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "guild_id": { - "name": "guild_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "war_id": { - "name": "war_id", - "type": "integer", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "guild_war_bet_guild_id_guild_id_fk": { - "name": "guild_war_bet_guild_id_guild_id_fk", - "tableFrom": "guild_war_bet", - "tableTo": "guild", - "schemaTo": "player", - "columnsFrom": [ - "guild_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "guild_war_bet_war_id_guild_war_reservation_id_fk": { - "name": "guild_war_bet_war_id_guild_war_reservation_id_fk", - "tableFrom": "guild_war_bet", - "tableTo": "guild_war_reservation", - "schemaTo": "player", - "columnsFrom": [ - "war_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "player.guild_war_reservation": { - "name": "guild_war_reservation", - "schema": "player", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "guild_war_reservation_id_seq", - "schema": "player", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "guild1": { - "name": "guild1", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "guild2": { - "name": "guild2", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "type": { - "name": "type", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "warprice": { - "name": "warprice", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "initial_score": { - "name": "initial_score", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "started": { - "name": "started", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "bet_from": { - "name": "bet_from", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "bet_to": { - "name": "bet_to", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "winner": { - "name": "winner", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": -1 - }, - "power_from": { - "name": "power_from", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "power_to": { - "name": "power_to", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "handicap": { - "name": "handicap", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "result_1": { - "name": "result_1", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "result_2": { - "name": "result_2", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "started_at": { - "name": "started_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "guild_war_reservation_guild1_guild_id_fk": { - "name": "guild_war_reservation_guild1_guild_id_fk", - "tableFrom": "guild_war_reservation", - "tableTo": "guild", - "schemaTo": "player", - "columnsFrom": [ - "guild1" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "guild_war_reservation_guild2_guild_id_fk": { - "name": "guild_war_reservation_guild2_guild_id_fk", - "tableFrom": "guild_war_reservation", - "tableTo": "guild", - "schemaTo": "player", - "columnsFrom": [ - "guild2" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "log.hack_log": { - "name": "hack_log", - "schema": "log", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "hack_log_id_seq", - "schema": "log", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "login": { - "name": "login", - "type": "char(16)", - "primaryKey": false, - "notNull": true - }, - "name": { - "name": "name", - "type": "char(24)", - "primaryKey": false, - "notNull": true - }, - "ip": { - "name": "ip", - "type": "char(15)", - "primaryKey": false, - "notNull": true - }, - "server": { - "name": "server", - "type": "char(100)", - "primaryKey": false, - "notNull": true - }, - "why": { - "name": "why", - "type": "char(191)", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "player.horse_name": { - "name": "horse_name", - "schema": "player", - "columns": { - "player_id": { - "name": "player_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "name": { - "name": "name", - "type": "varchar(24)", - "primaryKey": false, - "notNull": true, - "default": "'NONAME'" - } - }, - "indexes": {}, - "foreignKeys": { - "horse_name_player_id_player_id_fk": { - "name": "horse_name_player_id_player_id_fk", - "tableFrom": "horse_name", - "tableTo": "player", - "schemaTo": "player", - "columnsFrom": [ - "player_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "player.item": { - "name": "item", - "schema": "player", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "item_id_seq", - "schema": "player", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "owner_id": { - "name": "owner_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "window": { - "name": "window", - "type": "item_window", - "typeSchema": "player", - "primaryKey": false, - "notNull": true, - "default": "'INVENTORY'" - }, - "position": { - "name": "position", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "count": { - "name": "count", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "vnum": { - "name": "vnum", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "socket_0": { - "name": "socket_0", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "socket_1": { - "name": "socket_1", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "socket_2": { - "name": "socket_2", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "socket_3": { - "name": "socket_3", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "socket_4": { - "name": "socket_4", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "socket_5": { - "name": "socket_5", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "attr_type_0": { - "name": "attr_type_0", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "attr_value_0": { - "name": "attr_value_0", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "attr_type_1": { - "name": "attr_type_1", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "attr_value_1": { - "name": "attr_value_1", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "attr_type_2": { - "name": "attr_type_2", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "attr_value_2": { - "name": "attr_value_2", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "attr_type_3": { - "name": "attr_type_3", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "attr_value_3": { - "name": "attr_value_3", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "attr_type_4": { - "name": "attr_type_4", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "attr_value_4": { - "name": "attr_value_4", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "attr_type_5": { - "name": "attr_type_5", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "attr_value_5": { - "name": "attr_value_5", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "attr_type_6": { - "name": "attr_type_6", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "attr_value_6": { - "name": "attr_value_6", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - } - }, - "indexes": { - "item_owner_id": { - "name": "item_owner_id", - "columns": [ - { - "expression": "owner_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "item_window": { - "name": "item_window", - "columns": [ - { - "expression": "window", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "item_vnum": { - "name": "item_vnum", - "columns": [ - { - "expression": "vnum", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "player.item_attr": { - "name": "item_attr", - "schema": "player", - "columns": { - "apply": { - "name": "apply", - "type": "item_attr_apply", - "typeSchema": "player", - "primaryKey": false, - "notNull": true, - "default": "'MAX_HP'" - }, - "probability": { - "name": "probability", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "lvl_1": { - "name": "lvl_1", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "lvl_2": { - "name": "lvl_2", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "lvl_3": { - "name": "lvl_3", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "lvl_4": { - "name": "lvl_4", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "lvl_5": { - "name": "lvl_5", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "weapon": { - "name": "weapon", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "body": { - "name": "body", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "wrist": { - "name": "wrist", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "foots": { - "name": "foots", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "neck": { - "name": "neck", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "head": { - "name": "head", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "shield": { - "name": "shield", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "ear": { - "name": "ear", - "type": "integer", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "player.item_attr_rare": { - "name": "item_attr_rare", - "schema": "player", - "columns": { - "apply": { - "name": "apply", - "type": "item_attr_rare_apply", - "typeSchema": "player", - "primaryKey": false, - "notNull": true, - "default": "'MAX_HP'" - }, - "probability": { - "name": "probability", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "lvl_1": { - "name": "lvl_1", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "lvl_2": { - "name": "lvl_2", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "lvl_3": { - "name": "lvl_3", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "lvl_4": { - "name": "lvl_4", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "lvl_5": { - "name": "lvl_5", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "weapon": { - "name": "weapon", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "body": { - "name": "body", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "wrist": { - "name": "wrist", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "foots": { - "name": "foots", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "neck": { - "name": "neck", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "head": { - "name": "head", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "shield": { - "name": "shield", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "ear": { - "name": "ear", - "type": "integer", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "player.item_award": { - "name": "item_award", - "schema": "player", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "item_award_id_seq", - "schema": "player", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "player_id": { - "name": "player_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "login": { - "name": "login", - "type": "varchar(30)", - "primaryKey": false, - "notNull": true - }, - "vnum": { - "name": "vnum", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "count": { - "name": "count", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "give_at": { - "name": "give_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "taken_at": { - "name": "taken_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false - }, - "item_id": { - "name": "item_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "why": { - "name": "why", - "type": "varchar(128)", - "primaryKey": false, - "notNull": false - }, - "socket_0": { - "name": "socket_0", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "socket_1": { - "name": "socket_1", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "socket_2": { - "name": "socket_2", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "mall": { - "name": "mall", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - } - }, - "indexes": { - "item_award_player_id": { - "name": "item_award_player_id", - "columns": [ - { - "expression": "player_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "item_award_given_at": { - "name": "item_award_given_at", - "columns": [ - { - "expression": "give_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "item_award_taken_at": { - "name": "item_award_taken_at", - "columns": [ - { - "expression": "taken_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "item_award_player_id_player_id_fk": { - "name": "item_award_player_id_player_id_fk", - "tableFrom": "item_award", - "tableTo": "player", - "schemaTo": "player", - "columnsFrom": [ - "player_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "player.item_proto": { - "name": "item_proto", - "schema": "player", - "columns": { - "vnum": { - "name": "vnum", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "locale_name": { - "name": "locale_name", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "type": { - "name": "type", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "sub_type": { - "name": "sub_type", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "weight": { - "name": "weight", - "type": "integer", - "primaryKey": false, - "notNull": false, - "default": 0 - }, - "size": { - "name": "size", - "type": "integer", - "primaryKey": false, - "notNull": false, - "default": 0 - }, - "anti_flag": { - "name": "anti_flag", - "type": "integer", - "primaryKey": false, - "notNull": false, - "default": 0 - }, - "flag": { - "name": "flag", - "type": "integer", - "primaryKey": false, - "notNull": false, - "default": 0 - }, - "wear_flag": { - "name": "wear_flag", - "type": "integer", - "primaryKey": false, - "notNull": false, - "default": 0 - }, - "immune_flag": { - "name": "immune_flag", - "type": "item_proto_immune_flag[]", - "primaryKey": false, - "notNull": true, - "default": "'{}'" - }, - "gold": { - "name": "gold", - "type": "integer", - "primaryKey": false, - "notNull": false, - "default": 0 - }, - "shop_buy_price": { - "name": "shop_buy_price", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "refined_vnum": { - "name": "refined_vnum", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "refine_set": { - "name": "refine_set", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "refine_set2": { - "name": "refine_set2", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "magic_percentage": { - "name": "magic_percentage", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "limit_type_0": { - "name": "limit_type_0", - "type": "integer", - "primaryKey": false, - "notNull": false, - "default": 0 - }, - "limit_value_0": { - "name": "limit_value_0", - "type": "integer", - "primaryKey": false, - "notNull": false, - "default": 0 - }, - "limit_type_1": { - "name": "limit_type_1", - "type": "integer", - "primaryKey": false, - "notNull": false, - "default": 0 - }, - "limit_value_1": { - "name": "limit_value_1", - "type": "integer", - "primaryKey": false, - "notNull": false, - "default": 0 - }, - "apply_type_0": { - "name": "apply_type_0", - "type": "integer", - "primaryKey": false, - "notNull": false, - "default": 0 - }, - "apply_value_0": { - "name": "apply_value_0", - "type": "integer", - "primaryKey": false, - "notNull": false, - "default": 0 - }, - "apply_type_1": { - "name": "apply_type_1", - "type": "integer", - "primaryKey": false, - "notNull": false, - "default": 0 - }, - "apply_value_1": { - "name": "apply_value_1", - "type": "integer", - "primaryKey": false, - "notNull": false, - "default": 0 - }, - "apply_type_2": { - "name": "apply_type_2", - "type": "integer", - "primaryKey": false, - "notNull": false, - "default": 0 - }, - "apply_value_2": { - "name": "apply_value_2", - "type": "integer", - "primaryKey": false, - "notNull": false, - "default": 0 - }, - "value_0": { - "name": "value_0", - "type": "integer", - "primaryKey": false, - "notNull": false, - "default": 0 - }, - "value_1": { - "name": "value_1", - "type": "integer", - "primaryKey": false, - "notNull": false, - "default": 0 - }, - "value_2": { - "name": "value_2", - "type": "integer", - "primaryKey": false, - "notNull": false, - "default": 0 - }, - "value_3": { - "name": "value_3", - "type": "integer", - "primaryKey": false, - "notNull": false, - "default": 0 - }, - "value_4": { - "name": "value_4", - "type": "integer", - "primaryKey": false, - "notNull": false, - "default": 0 - }, - "value_5": { - "name": "value_5", - "type": "integer", - "primaryKey": false, - "notNull": false, - "default": 0 - }, - "socket_0": { - "name": "socket_0", - "type": "integer", - "primaryKey": false, - "notNull": false, - "default": -1 - }, - "socket_1": { - "name": "socket_1", - "type": "integer", - "primaryKey": false, - "notNull": false, - "default": -1 - }, - "socket_2": { - "name": "socket_2", - "type": "integer", - "primaryKey": false, - "notNull": false, - "default": -1 - }, - "socket_3": { - "name": "socket_3", - "type": "integer", - "primaryKey": false, - "notNull": false, - "default": -1 - }, - "socket_4": { - "name": "socket_4", - "type": "integer", - "primaryKey": false, - "notNull": false, - "default": -1 - }, - "socket_5": { - "name": "socket_5", - "type": "integer", - "primaryKey": false, - "notNull": false, - "default": -1 - }, - "specular": { - "name": "specular", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "socket_percentage": { - "name": "socket_percentage", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "addon_type": { - "name": "addon_type", - "type": "integer", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "player.land": { - "name": "land", - "schema": "player", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true - }, - "map_index": { - "name": "map_index", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "x": { - "name": "x", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "y": { - "name": "y", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "width": { - "name": "width", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "height": { - "name": "height", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "guild_id": { - "name": "guild_id", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "guild_level_limit": { - "name": "guild_level_limit", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "price": { - "name": "price", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "enabled": { - "name": "enabled", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "log.level_log": { - "name": "level_log", - "schema": "log", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "level_log_id_seq", - "schema": "log", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "name": { - "name": "name", - "type": "char(24)", - "primaryKey": false, - "notNull": true - }, - "level": { - "name": "level", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "playtime": { - "name": "playtime", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "player_id": { - "name": "player_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "level_log_player_id_player_id_fk": { - "name": "level_log_player_id_player_id_fk", - "tableFrom": "level_log", - "tableTo": "player", - "schemaTo": "player", - "columnsFrom": [ - "player_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "common.locale": { - "name": "locale", - "schema": "common", - "columns": { - "key": { - "name": "key", - "type": "varchar(191)", - "primaryKey": false, - "notNull": true - }, - "value": { - "name": "value", - "type": "varchar(191)", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "locale_key": { - "name": "locale_key", - "columns": [ - { - "expression": "key", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "log.log": { - "name": "log", - "schema": "log", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "log_id_seq", - "schema": "log", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "type": { - "name": "type", - "type": "log_type", - "typeSchema": "log", - "primaryKey": false, - "notNull": true, - "default": "'ITEM'" - }, - "who": { - "name": "who", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "x": { - "name": "x", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "y": { - "name": "y", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "what": { - "name": "what", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "how": { - "name": "how", - "type": "varchar(50)", - "primaryKey": false, - "notNull": true - }, - "hint": { - "name": "hint", - "type": "varchar(70)", - "primaryKey": false, - "notNull": false - }, - "ip": { - "name": "ip", - "type": "varchar(16)", - "primaryKey": false, - "notNull": false - }, - "vnum": { - "name": "vnum", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "default": "now()" - } - }, - "indexes": { - "log_who": { - "name": "log_who", - "columns": [ - { - "expression": "who", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "log_what": { - "name": "log_what", - "columns": [ - { - "expression": "what", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "log_how": { - "name": "log_how", - "columns": [ - { - "expression": "how", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "log.login_log": { - "name": "login_log", - "schema": "log", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "login_log_id_seq", - "schema": "log", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "type": { - "name": "type", - "type": "login_log_type", - "typeSchema": "log", - "primaryKey": false, - "notNull": false - }, - "channel": { - "name": "channel", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "account_id": { - "name": "account_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "player_id": { - "name": "player_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "level": { - "name": "level", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "job": { - "name": "job", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "playtime": { - "name": "playtime", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "default": "now()" - } - }, - "indexes": { - "login_log_player_id": { - "name": "login_log_player_id", - "columns": [ - { - "expression": "player_id", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "type", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "login_log_account_id_account_id_fk": { - "name": "login_log_account_id_account_id_fk", - "tableFrom": "login_log", - "tableTo": "account", - "schemaTo": "account", - "columnsFrom": [ - "account_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "login_log_player_id_player_id_fk": { - "name": "login_log_player_id_player_id_fk", - "tableFrom": "login_log", - "tableTo": "player", - "schemaTo": "player", - "columnsFrom": [ - "player_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "log.login_log_2": { - "name": "login_log_2", - "schema": "log", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "login_log_2_id_seq", - "schema": "log", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "type": { - "name": "type", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "is_gm": { - "name": "is_gm", - "type": "boolean", - "primaryKey": false, - "notNull": false - }, - "channel": { - "name": "channel", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "account_id": { - "name": "account_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "player_id": { - "name": "player_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "ip": { - "name": "ip", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "client_version": { - "name": "client_version", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "playtime": { - "name": "playtime", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "login_at": { - "name": "login_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false - }, - "logout_at": { - "name": "logout_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": { - "login_log_2_account_id_account_id_fk": { - "name": "login_log_2_account_id_account_id_fk", - "tableFrom": "login_log_2", - "tableTo": "account", - "schemaTo": "account", - "columnsFrom": [ - "account_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "login_log_2_player_id_player_id_fk": { - "name": "login_log_2_player_id_player_id_fk", - "tableFrom": "login_log_2", - "tableTo": "player", - "schemaTo": "player", - "columnsFrom": [ - "player_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "player.lotto_list": { - "name": "lotto_list", - "schema": "player", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "lotto_list_id_seq", - "schema": "player", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "server": { - "name": "server", - "type": "varchar(20)", - "primaryKey": false, - "notNull": false - }, - "playerId": { - "name": "playerId", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "lotto_list_playerId_player_id_fk": { - "name": "lotto_list_playerId_player_id_fk", - "tableFrom": "lotto_list", - "tableTo": "player", - "schemaTo": "player", - "columnsFrom": [ - "playerId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "player.marriage": { - "name": "marriage", - "schema": "player", - "columns": { - "is_married": { - "name": "is_married", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "player_id_1": { - "name": "player_id_1", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "player_id_2": { - "name": "player_id_2", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "love_points": { - "name": "love_points", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "marriage_player_id_1_player_id_fk": { - "name": "marriage_player_id_1_player_id_fk", - "tableFrom": "marriage", - "tableTo": "player", - "schemaTo": "player", - "columnsFrom": [ - "player_id_1" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "marriage_player_id_2_player_id_fk": { - "name": "marriage_player_id_2_player_id_fk", - "tableFrom": "marriage", - "tableTo": "player", - "schemaTo": "player", - "columnsFrom": [ - "player_id_2" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "player.messenger_list": { - "name": "messenger_list", - "schema": "player", - "columns": { - "account": { - "name": "account", - "type": "varchar(16)", - "primaryKey": false, - "notNull": true - }, - "companion": { - "name": "companion", - "type": "varchar(16)", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "player.mob_proto": { - "name": "mob_proto", - "schema": "player", - "columns": { - "vnum": { - "name": "vnum", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "locale_name": { - "name": "locale_name", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "rank": { - "name": "rank", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "type": { - "name": "type", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "battle_type": { - "name": "battle_type", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "level": { - "name": "level", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 1 - }, - "size": { - "name": "size", - "type": "mob_size", - "typeSchema": "player", - "primaryKey": false, - "notNull": false, - "default": "'SMALL'" - }, - "ai_flag": { - "name": "ai_flag", - "type": "mob_ai_flag[]", - "primaryKey": false, - "notNull": true, - "default": "'{}'" - }, - "mount_capacity": { - "name": "mount_capacity", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "set_race_flag": { - "name": "set_race_flag", - "type": "mob_set_race_flag", - "typeSchema": "player", - "primaryKey": false, - "notNull": true - }, - "set_immune_flag": { - "name": "set_immune_flag", - "type": "mob_set_immune_flag", - "typeSchema": "player", - "primaryKey": false, - "notNull": false - }, - "empire": { - "name": "empire", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "folder": { - "name": "folder", - "type": "varchar(100)", - "primaryKey": false, - "notNull": true - }, - "on_click": { - "name": "on_click", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "st": { - "name": "st", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "dx": { - "name": "dx", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "ht": { - "name": "ht", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "iq": { - "name": "iq", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "damage_min": { - "name": "damage_min", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "damage_max": { - "name": "damage_max", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "max_hp": { - "name": "max_hp", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "regen_cycle": { - "name": "regen_cycle", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "regen_percent": { - "name": "regen_percent", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "gold_min": { - "name": "gold_min", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "gold_max": { - "name": "gold_max", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "exp": { - "name": "exp", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "def": { - "name": "def", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "attack_speed": { - "name": "attack_speed", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 100 - }, - "move_speed": { - "name": "move_speed", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 100 - }, - "aggressive_hp_percentage": { - "name": "aggressive_hp_percentage", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "aggressive_sight": { - "name": "aggressive_sight", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "attack_range": { - "name": "attack_range", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "drop_item": { - "name": "drop_item", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "resurrection_vnum": { - "name": "resurrection_vnum", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "enchant_curse": { - "name": "enchant_curse", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "enchant_slow": { - "name": "enchant_slow", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "enchant_poison": { - "name": "enchant_poison", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "enchant_stun": { - "name": "enchant_stun", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "enchant_critical": { - "name": "enchant_critical", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "enchant_penetrate": { - "name": "enchant_penetrate", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "resist_sword": { - "name": "resist_sword", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "resist_twohand": { - "name": "resist_twohand", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "resist_dagger": { - "name": "resist_dagger", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "resist_bell": { - "name": "resist_bell", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "resist_fan": { - "name": "resist_fan", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "resist_bow": { - "name": "resist_bow", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "resist_fire": { - "name": "resist_fire", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "resist_elect": { - "name": "resist_elect", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "resist_magic": { - "name": "resist_magic", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "resist_wind": { - "name": "resist_wind", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "resist_poison": { - "name": "resist_poison", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "dam_multiply": { - "name": "dam_multiply", - "type": "double precision", - "primaryKey": false, - "notNull": false - }, - "summon": { - "name": "summon", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "drain_sp": { - "name": "drain_sp", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "mob_color": { - "name": "mob_color", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "polymorph_item": { - "name": "polymorph_item", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "skill_level0": { - "name": "skill_level0", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "skill_vnum0": { - "name": "skill_vnum0", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "skill_level1": { - "name": "skill_level1", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "skill_vnum1": { - "name": "skill_vnum1", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "skill_level2": { - "name": "skill_level2", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "skill_vnum2": { - "name": "skill_vnum2", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "skill_level3": { - "name": "skill_level3", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "skill_vnum3": { - "name": "skill_vnum3", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "skill_level4": { - "name": "skill_level4", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "skill_vnum4": { - "name": "skill_vnum4", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "sp_berserk": { - "name": "sp_berserk", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "sp_stoneskin": { - "name": "sp_stoneskin", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "sp_godspeed": { - "name": "sp_godspeed", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "sp_deathblow": { - "name": "sp_deathblow", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "sp_revive": { - "name": "sp_revive", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "player.monarch": { - "name": "monarch", - "schema": "player", - "columns": { - "empire": { - "name": "empire", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "player_id": { - "name": "player_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "win_at": { - "name": "win_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false - }, - "money": { - "name": "money", - "type": "integer", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": { - "monarch_player_id_player_id_fk": { - "name": "monarch_player_id_player_id_fk", - "tableFrom": "monarch", - "tableTo": "player", - "schemaTo": "player", - "columnsFrom": [ - "player_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "player.monarch_candidacy": { - "name": "monarch_candidacy", - "schema": "player", - "columns": { - "player_id": { - "name": "player_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "date": { - "name": "date", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "default": "now()" - }, - "name": { - "name": "name", - "type": "varchar(16)", - "primaryKey": false, - "notNull": false - }, - "win_at": { - "name": "win_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": { - "monarch_candidacy_player_id_player_id_fk": { - "name": "monarch_candidacy_player_id_player_id_fk", - "tableFrom": "monarch_candidacy", - "tableTo": "player", - "schemaTo": "player", - "columnsFrom": [ - "player_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "player.monarch_election": { - "name": "monarch_election", - "schema": "player", - "columns": { - "player_id": { - "name": "player_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "selected_player_id": { - "name": "selected_player_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "election_at": { - "name": "election_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "monarch_election_player_id_player_id_fk": { - "name": "monarch_election_player_id_player_id_fk", - "tableFrom": "monarch_election", - "tableTo": "player", - "schemaTo": "player", - "columnsFrom": [ - "player_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "monarch_election_selected_player_id_player_id_fk": { - "name": "monarch_election_selected_player_id_player_id_fk", - "tableFrom": "monarch_election", - "tableTo": "player", - "schemaTo": "player", - "columnsFrom": [ - "selected_player_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "log.money_log": { - "name": "money_log", - "schema": "log", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "money_log_id_seq", - "schema": "log", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "type": { - "name": "type", - "type": "money_log_type", - "typeSchema": "log", - "primaryKey": false, - "notNull": false - }, - "vnum": { - "name": "vnum", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "gold": { - "name": "gold", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "default": "now()" - } - }, - "indexes": { - "money_log_type": { - "name": "money_log_type", - "columns": [ - { - "expression": "type", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "vnum", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "player.myshop_pricelist": { - "name": "myshop_pricelist", - "schema": "player", - "columns": { - "owner_id": { - "name": "owner_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "item_vnum": { - "name": "item_vnum", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "price": { - "name": "price", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "list_id": { - "name": "list_id", - "nullsNotDistinct": false, - "columns": [ - "owner_id", - "item_vnum" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "player.object": { - "name": "object", - "schema": "player", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "object_id_seq", - "schema": "player", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "land_id": { - "name": "land_id", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "vnum": { - "name": "vnum", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "map_index": { - "name": "map_index", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "x": { - "name": "x", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "y": { - "name": "y", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "x_rot": { - "name": "x_rot", - "type": "double precision", - "primaryKey": false, - "notNull": true - }, - "y_rot": { - "name": "y_rot", - "type": "double precision", - "primaryKey": false, - "notNull": true - }, - "z_rot": { - "name": "z_rot", - "type": "double precision", - "primaryKey": false, - "notNull": true - }, - "life": { - "name": "life", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "player.object_proto": { - "name": "object_proto", - "schema": "player", - "columns": { - "vnum": { - "name": "vnum", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "name": { - "name": "name", - "type": "varchar(32)", - "primaryKey": false, - "notNull": true - }, - "price": { - "name": "price", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "materials": { - "name": "materials", - "type": "varchar(64)", - "primaryKey": false, - "notNull": true - }, - "upgrade_vnum": { - "name": "upgrade_vnum", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "upgrade_limit_time": { - "name": "upgrade_limit_time", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "life": { - "name": "life", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "reg_1": { - "name": "reg_1", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "reg_2": { - "name": "reg_2", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "reg_3": { - "name": "reg_3", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "reg_4": { - "name": "reg_4", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "npc": { - "name": "npc", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "group_vnum": { - "name": "group_vnum", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "dependent_group": { - "name": "dependent_group", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - } - }, - "indexes": { - "object_proto_vnum": { - "name": "object_proto_vnum", - "columns": [ - { - "expression": "vnum", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "object_proto_group_vnum": { - "name": "object_proto_group_vnum", - "columns": [ - { - "expression": "group_vnum", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "object_proto_upgrade_vnum": { - "name": "object_proto_upgrade_vnum", - "columns": [ - { - "expression": "upgrade_vnum", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "web.password_reset_session": { - "name": "password_reset_session", - "schema": "web", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "user_id": { - "name": "user_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "email": { - "name": "email", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "code": { - "name": "code", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "expires_at": { - "name": "expires_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "password_reset_session_user_id_account_id_fk": { - "name": "password_reset_session_user_id_account_id_fk", - "tableFrom": "password_reset_session", - "tableTo": "account", - "schemaTo": "account", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "player.player": { - "name": "player", - "schema": "player", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "player_id_seq", - "schema": "player", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "account_id": { - "name": "account_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "name": { - "name": "name", - "type": "varchar(24)", - "primaryKey": false, - "notNull": true, - "default": "'NONAME'" - }, - "job": { - "name": "job", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "voice": { - "name": "voice", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "dir": { - "name": "dir", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "x": { - "name": "x", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "y": { - "name": "y", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "z": { - "name": "z", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "map_index": { - "name": "map_index", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "exit_x": { - "name": "exit_x", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "exit_y": { - "name": "exit_y", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "exit_map_index": { - "name": "exit_map_index", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "hp": { - "name": "hp", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "mp": { - "name": "mp", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "stamina": { - "name": "stamina", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "random_hp": { - "name": "random_hp", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "random_sp": { - "name": "random_sp", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "playtime": { - "name": "playtime", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "level": { - "name": "level", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 1 - }, - "level_step": { - "name": "level_step", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "st": { - "name": "st", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "ht": { - "name": "ht", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "dx": { - "name": "dx", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "iq": { - "name": "iq", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "exp": { - "name": "exp", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "gold": { - "name": "gold", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "stat_point": { - "name": "stat_point", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "skill_point": { - "name": "skill_point", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "quick_slot": { - "name": "quick_slot", - "type": "bytea", - "primaryKey": false, - "notNull": false - }, - "ip": { - "name": "ip", - "type": "varchar(16)", - "primaryKey": false, - "notNull": false, - "default": "'0.0.0.0'" - }, - "part_main": { - "name": "part_main", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "part_base": { - "name": "part_base", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "part_hair": { - "name": "part_hair", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "skill_group": { - "name": "skill_group", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "skill_level": { - "name": "skill_level", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "alignment": { - "name": "alignment", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "last_played_at": { - "name": "last_played_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "change_name": { - "name": "change_name", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "sub_skill_point": { - "name": "sub_skill_point", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "stat_reset_count": { - "name": "stat_reset_count", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "horse_hp": { - "name": "horse_hp", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "horse_stamina": { - "name": "horse_stamina", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "horse_level": { - "name": "horse_level", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "horse_hp_droptime": { - "name": "horse_hp_droptime", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "horse_riding": { - "name": "horse_riding", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "horse_skill_point": { - "name": "horse_skill_point", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "bank_value": { - "name": "bank_value", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - } - }, - "indexes": { - "player_account_id": { - "name": "player_account_id", - "columns": [ - { - "expression": "account_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "player_name": { - "name": "player_name", - "columns": [ - { - "expression": "name", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "player_account_id_account_id_fk": { - "name": "player_account_id_account_id_fk", - "tableFrom": "player", - "tableTo": "account", - "schemaTo": "account", - "columnsFrom": [ - "account_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "log.player_count": { - "name": "player_count", - "schema": "log", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "player_count_id_seq", - "schema": "log", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "count_red": { - "name": "count_red", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "count_yellow": { - "name": "count_yellow", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "count_blue": { - "name": "count_blue", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "count_total": { - "name": "count_total", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "player.player_deleted": { - "name": "player_deleted", - "schema": "player", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "player_deleted_id_seq", - "schema": "player", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "account_id": { - "name": "account_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "name": { - "name": "name", - "type": "varchar(24)", - "primaryKey": false, - "notNull": true, - "default": "'NONAME'" - }, - "job": { - "name": "job", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "voice": { - "name": "voice", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "dir": { - "name": "dir", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "x": { - "name": "x", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "y": { - "name": "y", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "z": { - "name": "z", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "map_index": { - "name": "map_index", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "exit_x": { - "name": "exit_x", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "exit_y": { - "name": "exit_y", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "exit_map_index": { - "name": "exit_map_index", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "hp": { - "name": "hp", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "mp": { - "name": "mp", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "stamina": { - "name": "stamina", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "random_hp": { - "name": "random_hp", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "random_sp": { - "name": "random_sp", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "playtime": { - "name": "playtime", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "level": { - "name": "level", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 1 - }, - "level_step": { - "name": "level_step", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "st": { - "name": "st", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "ht": { - "name": "ht", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "dx": { - "name": "dx", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "iq": { - "name": "iq", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "exp": { - "name": "exp", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "gold": { - "name": "gold", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "stat_point": { - "name": "stat_point", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "skill_point": { - "name": "skill_point", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "quick_slot": { - "name": "quick_slot", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "ip": { - "name": "ip", - "type": "varchar(16)", - "primaryKey": false, - "notNull": false, - "default": "'0.0.0.0'" - }, - "part_main": { - "name": "part_main", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "part_base": { - "name": "part_base", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "part_hair": { - "name": "part_hair", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "skill_group": { - "name": "skill_group", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "skill_level": { - "name": "skill_level", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "alignment": { - "name": "alignment", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "last_played_at": { - "name": "last_played_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "change_name": { - "name": "change_name", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "sub_skill_point": { - "name": "sub_skill_point", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "stat_reset_count": { - "name": "stat_reset_count", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "horse_hp": { - "name": "horse_hp", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "horse_stamina": { - "name": "horse_stamina", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "horse_level": { - "name": "horse_level", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "horse_hp_droptime": { - "name": "horse_hp_droptime", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "horse_riding": { - "name": "horse_riding", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "horse_skill_point": { - "name": "horse_skill_point", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "bank_value": { - "name": "bank_value", - "type": "integer", - "primaryKey": false, - "notNull": false, - "default": 0 - } - }, - "indexes": { - "player_deleted_account_id": { - "name": "player_deleted_account_id", - "columns": [ - { - "expression": "account_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "player_deleted_name": { - "name": "player_deleted_name", - "columns": [ - { - "expression": "name", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "player_deleted_account_id_account_id_fk": { - "name": "player_deleted_account_id_account_id_fk", - "tableFrom": "player_deleted", - "tableTo": "account", - "schemaTo": "account", - "columnsFrom": [ - "account_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "player.player_index": { - "name": "player_index", - "schema": "player", - "columns": { - "account_id": { - "name": "account_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "player_id": { - "name": "player_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "empire": { - "name": "empire", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "last_played_at": { - "name": "last_played_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "player_index_empire": { - "name": "player_index_empire", - "columns": [ - { - "expression": "empire", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "player_index_account_id_account_id_fk": { - "name": "player_index_account_id_account_id_fk", - "tableFrom": "player_index", - "tableTo": "account", - "schemaTo": "account", - "columnsFrom": [ - "account_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "player_index_account_id_player_id_pk": { - "name": "player_index_account_id_player_id_pk", - "columns": [ - "account_id", - "player_id" - ] - } - }, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "player.quest": { - "name": "quest", - "schema": "player", - "columns": { - "player_id": { - "name": "player_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "name": { - "name": "name", - "type": "varchar(32)", - "primaryKey": false, - "notNull": true - }, - "state": { - "name": "state", - "type": "varchar(64)", - "primaryKey": false, - "notNull": true - }, - "value": { - "name": "value", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - } - }, - "indexes": { - "quest_player_id": { - "name": "quest_player_id", - "columns": [ - { - "expression": "player_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "quest_name": { - "name": "quest_name", - "columns": [ - { - "expression": "name", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "quest_state": { - "name": "quest_state", - "columns": [ - { - "expression": "state", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "quest_player_id_player_id_fk": { - "name": "quest_player_id_player_id_fk", - "tableFrom": "quest", - "tableTo": "player", - "schemaTo": "player", - "columnsFrom": [ - "player_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "log.quest_reward_log": { - "name": "quest_reward_log", - "schema": "log", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "quest_reward_log_id_seq", - "schema": "log", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "quest_name": { - "name": "quest_name", - "type": "varchar(32)", - "primaryKey": false, - "notNull": false - }, - "player_id": { - "name": "player_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "player_level": { - "name": "player_level", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "reward_type": { - "name": "reward_type", - "type": "reward_type", - "typeSchema": "log", - "primaryKey": false, - "notNull": false - }, - "reward_value1": { - "name": "reward_value1", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "reward_value2": { - "name": "reward_value2", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "default": "now()" - } - }, - "indexes": { - "quest_reward_log_player_id": { - "name": "quest_reward_log_player_id", - "columns": [ - { - "expression": "player_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "log.refine_log": { - "name": "refine_log", - "schema": "log", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "refine_log_id_seq", - "schema": "log", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "player_id": { - "name": "player_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "item_name": { - "name": "item_name", - "type": "varchar(24)", - "primaryKey": false, - "notNull": true - }, - "item_id": { - "name": "item_id", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "step": { - "name": "step", - "type": "varchar(50)", - "primaryKey": false, - "notNull": true - }, - "is_success": { - "name": "is_success", - "type": "boolean", - "primaryKey": false, - "notNull": true - }, - "set_type": { - "name": "set_type", - "type": "refine_log_set_type", - "typeSchema": "log", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "refine_log_player_id_player_id_fk": { - "name": "refine_log_player_id_player_id_fk", - "tableFrom": "refine_log", - "tableTo": "player", - "schemaTo": "player", - "columnsFrom": [ - "player_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "player.refine_proto": { - "name": "refine_proto", - "schema": "player", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true - }, - "vnum_0": { - "name": "vnum_0", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "count_0": { - "name": "count_0", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "vnum_1": { - "name": "vnum_1", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "count_1": { - "name": "count_1", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "vnum_2": { - "name": "vnum_2", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "count_2": { - "name": "count_2", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "vnum_3": { - "name": "vnum_3", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "count_3": { - "name": "count_3", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "vnum_4": { - "name": "vnum_4", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "count_4": { - "name": "count_4", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "cost": { - "name": "cost", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "src_vnum": { - "name": "src_vnum", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "result_vnum": { - "name": "result_vnum", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "probability": { - "name": "probability", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 100 - } - }, - "indexes": { - "refine_proto_src_vnum": { - "name": "refine_proto_src_vnum", - "columns": [ - { - "expression": "src_vnum", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "refine_proto_result_vnum": { - "name": "refine_proto_result_vnum", - "columns": [ - { - "expression": "result_vnum", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "player.safebox": { - "name": "safebox", - "schema": "player", - "columns": { - "account_id": { - "name": "account_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "size": { - "name": "size", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "password": { - "name": "password", - "type": "varchar(6)", - "primaryKey": false, - "notNull": true - }, - "gold": { - "name": "gold", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - } - }, - "indexes": {}, - "foreignKeys": { - "safebox_account_id_account_id_fk": { - "name": "safebox_account_id_account_id_fk", - "tableFrom": "safebox", - "tableTo": "account", - "schemaTo": "account", - "columnsFrom": [ - "account_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "web.session": { - "name": "session", - "schema": "web", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "user_id": { - "name": "user_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "ip": { - "name": "ip", - "type": "varchar(16)", - "primaryKey": false, - "notNull": true, - "default": "'0.0.0.0'" - }, - "expires_at": { - "name": "expires_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "session_user_id_account_id_fk": { - "name": "session_user_id_account_id_fk", - "tableFrom": "session", - "tableTo": "account", - "schemaTo": "account", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "player.shop": { - "name": "shop", - "schema": "player", - "columns": { - "vnum": { - "name": "vnum", - "type": "integer", - "primaryKey": true, - "notNull": true - }, - "name": { - "name": "name", - "type": "varchar(32)", - "primaryKey": false, - "notNull": true, - "default": "'NONAME'" - }, - "npc_vnum": { - "name": "npc_vnum", - "type": "integer", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "shop_vnum": { - "name": "shop_vnum", - "columns": [ - { - "expression": "vnum", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "player.shop_item": { - "name": "shop_item", - "schema": "player", - "columns": { - "shop_vnum": { - "name": "shop_vnum", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "item_vnum": { - "name": "item_vnum", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "count": { - "name": "count", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 1 - } - }, - "indexes": { - "shop_item_item_vnum": { - "name": "shop_item_item_vnum", - "columns": [ - { - "expression": "item_vnum", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "shop_item_shop_vnum_shop_vnum_fk": { - "name": "shop_item_shop_vnum_shop_vnum_fk", - "tableFrom": "shop_item", - "tableTo": "shop", - "schemaTo": "player", - "columnsFrom": [ - "shop_vnum" - ], - "columnsTo": [ - "vnum" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "shop_vnum_unique": { - "name": "shop_vnum_unique", - "nullsNotDistinct": false, - "columns": [ - "shop_vnum", - "item_vnum", - "count" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "log.shout_log": { - "name": "shout_log", - "schema": "log", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "shout_log_id_seq", - "schema": "log", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "channel": { - "name": "channel", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "empire": { - "name": "empire", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "shout": { - "name": "shout", - "type": "varchar(350)", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "default": "now()" - } - }, - "indexes": { - "shout_log_created_at": { - "name": "shout_log_created_at", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "player.skill_proto": { - "name": "skill_proto", - "schema": "player", - "columns": { - "vnum": { - "name": "vnum", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "type": { - "name": "type", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "level_step": { - "name": "level_step", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "max_level": { - "name": "max_level", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "level_limit": { - "name": "level_limit", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "point_on": { - "name": "point_on", - "type": "varchar(100)", - "primaryKey": false, - "notNull": true, - "default": "'0'" - }, - "point_poly": { - "name": "point_poly", - "type": "varchar(100)", - "primaryKey": false, - "notNull": true - }, - "sp_cost_poly": { - "name": "sp_cost_poly", - "type": "varchar(100)", - "primaryKey": false, - "notNull": true - }, - "duration_poly": { - "name": "duration_poly", - "type": "varchar(100)", - "primaryKey": false, - "notNull": true - }, - "duration_sp_cost_poly": { - "name": "duration_sp_cost_poly", - "type": "varchar(100)", - "primaryKey": false, - "notNull": true - }, - "cooldown_poly": { - "name": "cooldown_poly", - "type": "varchar(100)", - "primaryKey": false, - "notNull": true - }, - "master_bonus_poly": { - "name": "master_bonus_poly", - "type": "varchar(100)", - "primaryKey": false, - "notNull": true - }, - "attack_grade_poly": { - "name": "attack_grade_poly", - "type": "varchar(100)", - "primaryKey": false, - "notNull": true - }, - "set_flag": { - "name": "set_flag", - "type": "skill_proto_set_flag[]", - "primaryKey": false, - "notNull": true, - "default": "'{}'" - }, - "set_flag_bits": { - "name": "set_flag_bits", - "type": "bigint", - "primaryKey": false, - "notNull": false, - "generated": { - "as": "enum_array_to_bitmask(\"player\".\"skill_proto\".\"set_flag\")", - "type": "stored" - } - }, - "set_affect_flag": { - "name": "set_affect_flag", - "type": "skill_proto_set_affect_flag", - "typeSchema": "player", - "primaryKey": false, - "notNull": false - }, - "set_affect_flag_bits": { - "name": "set_affect_flag_bits", - "type": "bigint", - "primaryKey": false, - "notNull": false, - "generated": { - "as": "enum_to_bitmask(\"player\".\"skill_proto\".\"set_affect_flag\")", - "type": "stored" - } - }, - "point_on_2": { - "name": "point_on_2", - "type": "varchar(100)", - "primaryKey": false, - "notNull": true, - "default": "'NONE'" - }, - "point_poly_2": { - "name": "point_poly_2", - "type": "varchar(100)", - "primaryKey": false, - "notNull": true - }, - "duration_poly_2": { - "name": "duration_poly_2", - "type": "varchar(100)", - "primaryKey": false, - "notNull": true - }, - "set_affect_flag_2": { - "name": "set_affect_flag_2", - "type": "skill_proto_set_affect_flag_2", - "typeSchema": "player", - "primaryKey": false, - "notNull": false - }, - "set_affect_flag_2_bits": { - "name": "set_affect_flag_2_bits", - "type": "bigint", - "primaryKey": false, - "notNull": false, - "generated": { - "as": "enum_to_bitmask(\"player\".\"skill_proto\".\"set_affect_flag_2\")", - "type": "stored" - } - }, - "point_on_3": { - "name": "point_on_3", - "type": "varchar(100)", - "primaryKey": false, - "notNull": true, - "default": "'NONE'" - }, - "point_poly_3": { - "name": "point_poly_3", - "type": "varchar(100)", - "primaryKey": false, - "notNull": true - }, - "duration_poly_3": { - "name": "duration_poly_3", - "type": "varchar(100)", - "primaryKey": false, - "notNull": true - }, - "grand_master_add_sp_cost_poly": { - "name": "grand_master_add_sp_cost_poly", - "type": "varchar(100)", - "primaryKey": false, - "notNull": true - }, - "prerequisite_skill_vnum": { - "name": "prerequisite_skill_vnum", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "prerequisite_skill_level": { - "name": "prerequisite_skill_level", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "skill_type": { - "name": "skill_type", - "type": "skill_proto_skill_type", - "typeSchema": "player", - "primaryKey": false, - "notNull": true, - "default": "'NORMAL'" - }, - "skill_type_bits": { - "name": "skill_type_bits", - "type": "bigint", - "primaryKey": false, - "notNull": false, - "generated": { - "as": "enum_to_bitmask(\"player\".\"skill_proto\".\"skill_type\")", - "type": "stored" - } - }, - "max_hit": { - "name": "max_hit", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "splash_around_damage_adjust_poly": { - "name": "splash_around_damage_adjust_poly", - "type": "varchar(100)", - "primaryKey": false, - "notNull": true, - "default": "'1'" - }, - "target_range": { - "name": "target_range", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 1000 - }, - "splash_range": { - "name": "splash_range", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "common.spam_db": { - "name": "spam_db", - "schema": "common", - "columns": { - "type": { - "name": "type", - "type": "spam_type", - "typeSchema": "common", - "primaryKey": false, - "notNull": true, - "default": "'SPAM'" - }, - "word": { - "name": "word", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true - }, - "score": { - "name": "score", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 10 - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "log.speed_hack_log": { - "name": "speed_hack_log", - "schema": "log", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "speed_hack_log_id_seq", - "schema": "log", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "player_id": { - "name": "player_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "x": { - "name": "x", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "y": { - "name": "y", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "hack_count": { - "name": "hack_count", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": { - "speed_hack_log_player_id_player_id_fk": { - "name": "speed_hack_log_player_id_player_id_fk", - "tableFrom": "speed_hack_log", - "tableTo": "player", - "schemaTo": "player", - "columnsFrom": [ - "player_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - } - }, - "enums": { - "common.gm_authority": { - "name": "gm_authority", - "schema": "common", - "values": [ - "IMPLEMENTOR", - "HIGH_WIZARD", - "GOD", - "LOW_WIZARD", - "PLAYER" - ] - }, - "log.gold_log_how": { - "name": "gold_log_how", - "schema": "log", - "values": [ - "BUY", - "SELL", - "SHOP_SELL", - "SHOP_BUY", - "EXCHANGE_TAKE", - "EXCHANGE_GIVE", - "QUEST" - ] - }, - "player.guild_grade_auth": { - "name": "guild_grade_auth", - "schema": "player", - "values": [ - "ADD_MEMBER", - "REMOVE_MEMEBER", - "NOTICE", - "USE_SKILL" - ] - }, - "player.item_proto_immune_flag": { - "name": "item_proto_immune_flag", - "schema": "player", - "values": [ - "PARA", - "CURSE", - "STUN", - "SLEEP", - "SLOW", - "POISON", - "TERROR" - ] - }, - "player.item_attr_apply": { - "name": "item_attr_apply", - "schema": "player", - "values": [ - "MAX_HP", - "MAX_SP", - "CON", - "INT", - "STR", - "DEX", - "ATT_SPEED", - "MOV_SPEED", - "CAST_SPEED", - "HP_REGEN", - "SP_REGEN", - "POISON_PCT", - "STUN_PCT", - "SLOW_PCT", - "CRITICAL_PCT", - "PENETRATE_PCT", - "ATTBONUS_HUMAN", - "ATTBONUS_ANIMAL", - "ATTBONUS_ORC", - "ATTBONUS_MILGYO", - "ATTBONUS_UNDEAD", - "ATTBONUS_DEVIL", - "STEAL_HP", - "STEAL_SP", - "MANA_BURN_PCT", - "DAMAGE_SP_RECOVER", - "BLOCK", - "DODGE", - "RESIST_SWORD", - "RESIST_TWOHAND", - "RESIST_DAGGER", - "RESIST_BELL", - "RESIST_FAN", - "RESIST_BOW", - "RESIST_FIRE", - "RESIST_ELEC", - "RESIST_MAGIC", - "RESIST_WIND", - "REFLECT_MELEE", - "REFLECT_CURSE", - "POISON_REDUCE", - "KILL_SP_RECOVER", - "EXP_DOUBLE_BONUS", - "GOLD_DOUBLE_BONUS", - "ITEM_DROP_BONUS", - "POTION_BONUS", - "KILL_HP_RECOVER", - "IMMUNE_STUN", - "IMMUNE_SLOW", - "IMMUNE_FALL", - "SKILL", - "BOW_DISTANCE", - "ATT_GRADE_BONUS", - "DEF_GRADE_BONUS", - "MAGIC_ATT_GRADE", - "MAGIC_DEF_GRADE", - "CURSE_PCT", - "MAX_STAMINA", - "ATTBONUS_WARRIOR", - "ATTBONUS_ASSASSIN", - "ATTBONUS_SURA", - "ATTBONUS_SHAMAN", - "ATTBONUS_MONSTER", - "MALL_ATTBONUS", - "MALL_DEFBONUS", - "MALL_EXPBONUS", - "MALL_ITEMBONUS", - "MALL_GOLDBONUS", - "MAX_HP_PCT", - "MAX_SP_PCT", - "SKILL_DAMAGE_BONUS", - "NORMAL_HIT_DAMAGE_BONUS", - "SKILL_DEFEND_BONUS", - "NORMAL_HIT_DEFEND_BONUS", - "PC_BANG_EXP_BONUS", - "PC_BANG_DROP_BONUS", - "EXTRACT_HP_PCT", - "RESIST_WARRIOR", - "RESIST_ASSASSIN", - "RESIST_SURA", - "RESIST_SHAMAN", - "ENERGY", - "DEF_GRADE", - "COSTUME_ATTR_BONUS", - "MAGIC_ATTBONUS_PER", - "MELEE_MAGIC_ATTBONUS_PER", - "RESIST_ICE", - "RESIST_EARTH", - "RESIST_DARK", - "ANTI_CRITICAL_PCT", - "ANTI_PENETRATE_PCT" - ] - }, - "player.item_attr_rare_apply": { - "name": "item_attr_rare_apply", - "schema": "player", - "values": [ - "MAX_HP", - "MAX_SP", - "CON", - "INT", - "STR", - "DEX", - "ATT_SPEED", - "MOV_SPEED", - "CAST_SPEED", - "HP_REGEN", - "SP_REGEN", - "POISON_PCT", - "STUN_PCT", - "SLOW_PCT", - "CRITICAL_PCT", - "PENETRATE_PCT", - "ATTBONUS_HUMAN", - "ATTBONUS_ANIMAL", - "ATTBONUS_ORC", - "ATTBONUS_MILGYO", - "ATTBONUS_UNDEAD", - "ATTBONUS_DEVIL", - "STEAL_HP", - "STEAL_SP", - "MANA_BURN_PCT", - "DAMAGE_SP_RECOVER", - "BLOCK", - "DODGE", - "RESIST_SWORD", - "RESIST_TWOHAND", - "RESIST_DAGGER", - "RESIST_BELL", - "RESIST_FAN", - "RESIST_BOW", - "RESIST_FIRE", - "RESIST_ELEC", - "RESIST_MAGIC", - "RESIST_WIND", - "REFLECT_MELEE", - "REFLECT_CURSE", - "POISON_REDUCE", - "KILL_SP_RECOVER", - "EXP_DOUBLE_BONUS", - "GOLD_DOUBLE_BONUS", - "ITEM_DROP_BONUS", - "POTION_BONUS", - "KILL_HP_RECOVER", - "IMMUNE_STUN", - "IMMUNE_SLOW", - "IMMUNE_FALL", - "SKILL", - "BOW_DISTANCE", - "ATT_GRADE_BONUS", - "DEF_GRADE_BONUS", - "MAGIC_ATT_GRADE", - "MAGIC_DEF_GRADE", - "CURSE_PCT", - "MAX_STAMINA", - "ATT_BONUS_TO_WARRIOR", - "ATT_BONUS_TO_ASSASSIN", - "ATT_BONUS_TO_SURA", - "ATT_BONUS_TO_SHAMAN", - "ATT_BONUS_TO_MONSTER", - "NORMAL_HIT_DEFEND_BONUS", - "SKILL_DEFEND_BONUS", - "NOUSE2", - "NOUSE3", - "NOUSE4", - "NOUSE5", - "NOUSE6", - "NOUSE7", - "NOUSE8", - "NOUSE9", - "NOUSE10", - "NOUSE11", - "NOUSE12", - "NOUSE13", - "NOUSE14", - "RESIST_WARRIOR", - "RESIST_ASSASSIN", - "RESIST_SURA", - "RESIST_SHAMAN" - ] - }, - "player.item_window": { - "name": "item_window", - "schema": "player", - "values": [ - "INVENTORY", - "EQUIPMENT", - "SAFEBOX", - "MALL", - "DRAGON_SOUL_INVENTORY", - "BELT_INVENTORY" - ] - }, - "log.log_type": { - "name": "log_type", - "schema": "log", - "values": [ - "ITEM", - "CHARACTER" - ] - }, - "log.login_log_type": { - "name": "login_log_type", - "schema": "log", - "values": [ - "LOGIN", - "LOGOUT" - ] - }, - "player.mob_ai_flag": { - "name": "mob_ai_flag", - "schema": "player", - "values": [ - "AGGR", - "NOMOVE", - "COWARD", - "NOATTSHINSU", - "NOATTCHUNJO", - "NOATTJINNO", - "ATTMOB", - "BERSERK", - "STONESKIN", - "GODSPEED", - "DEATHBLOW", - "REVIVE" - ] - }, - "player.mob_set_immune_flag": { - "name": "mob_set_immune_flag", - "schema": "player", - "values": [ - "STUN", - "SLOW", - "FALL", - "CURSE", - "POISON", - "TERROR" - ] - }, - "player.mob_set_race_flag": { - "name": "mob_set_race_flag", - "schema": "player", - "values": [ - "ANIMAL", - "UNDEAD", - "DEVIL", - "HUMAN", - "ORC", - "MILGYO", - "INSECT", - "FIRE", - "ICE", - "DESERT", - "TREE", - "ATT_ELEC", - "ATT_FIRE", - "ATT_ICE", - "ATT_WIND", - "ATT_EARTH", - "ATT_DARK" - ] - }, - "player.mob_size": { - "name": "mob_size", - "schema": "player", - "values": [ - "SMALL", - "MEDIUM", - "BIG" - ] - }, - "log.money_log_type": { - "name": "money_log_type", - "schema": "log", - "values": [ - "MONSTER", - "SHOP", - "REFINE", - "QUEST", - "GUILD", - "MISC", - "KILL", - "DROP" - ] - }, - "log.refine_log_set_type": { - "name": "refine_log_set_type", - "schema": "log", - "values": [ - "SOCKET", - "POWER", - "ROD", - "GUILD", - "SCROLL", - "HYUNIRON", - "GOD_SCROLL", - "MUSIN_SCROLL" - ] - }, - "log.reward_type": { - "name": "reward_type", - "schema": "log", - "values": [ - "EXP", - "ITEM" - ] - }, - "player.skill_proto_set_affect_flag": { - "name": "skill_proto_set_affect_flag", - "schema": "player", - "values": [ - "YMIR", - "INVISIBILITY", - "SPAWN", - "POISON", - "SLOW", - "STUN", - "DUNGEON_READY", - "FORCE_VISIBLE", - "BUILDING_CONSTRUCTION_SMALL", - "BUILDING_CONSTRUCTION_LARGE", - "BUILDING_UPGRADE", - "MOV_SPEED_POTION", - "ATT_SPEED_POTION", - "FISH_MIDE", - "JEONGWIHON", - "GEOMGYEONG", - "CHEONGEUN", - "GYEONGGONG", - "EUNHYUNG", - "GWIGUM", - "TERROR", - "JUMAGAP", - "HOSIN", - "BOHO", - "KWAESOK", - "MANASHIELD", - "MUYEONG", - "REVIVE_INVISIBLE", - "FIRE", - "GICHEON", - "JEUNGRYEOK" - ] - }, - "player.skill_proto_set_affect_flag_2": { - "name": "skill_proto_set_affect_flag_2", - "schema": "player", - "values": [ - "YMIR", - "INVISIBILITY", - "SPAWN", - "POISON", - "SLOW", - "STUN", - "DUNGEON_READY", - "FORCE_VISIBLE", - "BUILDING_CONSTRUCTION_SMALL", - "BUILDING_CONSTRUCTION_LARGE", - "BUILDING_UPGRADE", - "MOV_SPEED_POTION", - "ATT_SPEED_POTION", - "FISH_MIDE", - "JEONGWIHON", - "GEOMGYEONG", - "CHEONGEUN", - "GYEONGGONG", - "EUNHYUNG", - "GWIGUM", - "TERROR", - "JUMAGAP", - "HOSIN", - "BOHO", - "KWAESOK", - "MANASHIELD" - ] - }, - "player.skill_proto_set_flag": { - "name": "skill_proto_set_flag", - "schema": "player", - "values": [ - "ATTACK", - "USE_MELEE_DAMAGE", - "COMPUTE_ATTGRADE", - "SELFONLY", - "USE_MAGIC_DAMAGE", - "USE_HP_AS_COST", - "COMPUTE_MAGIC_DAMAGE", - "SPLASH", - "GIVE_PENALTY", - "USE_ARROW_DAMAGE", - "PENETRATE", - "IGNORE_TARGET_RATING", - "ATTACK_SLOW", - "ATTACK_STUN", - "HP_ABSORB", - "SP_ABSORB", - "ATTACK_FIRE_CONT", - "REMOVE_BAD_AFFECT", - "REMOVE_GOOD_AFFECT", - "CRUSH", - "ATTACK_POISON", - "TOGGLE", - "DISABLE_BY_POINT_UP", - "CRUSH_LONG" - ] - }, - "player.skill_proto_skill_type": { - "name": "skill_proto_skill_type", - "schema": "player", - "values": [ - "NORMAL", - "MELEE", - "RANGE", - "MAGIC" - ] - }, - "common.spam_type": { - "name": "spam_type", - "schema": "common", - "values": [ - "GOOD", - "SPAM" - ] - } - }, - "schemas": { - "account": "account", - "common": "common", - "log": "log", - "player": "player", - "web": "web" - }, - "sequences": {}, - "roles": {}, - "policies": {}, - "views": {}, - "_meta": { - "columns": {}, - "schemas": {}, - "tables": {} - } -} \ No newline at end of file diff --git a/drizzle/meta/0004_snapshot.json b/drizzle/meta/0004_snapshot.json deleted file mode 100644 index ab05f5c..0000000 --- a/drizzle/meta/0004_snapshot.json +++ /dev/null @@ -1,7032 +0,0 @@ -{ - "id": "eaa3e55d-2ec1-4695-b294-878e27e5f2c7", - "prevId": "b2190459-5f76-4356-ace7-01a59190976a", - "version": "7", - "dialect": "postgresql", - "tables": { - "account.account": { - "name": "account", - "schema": "account", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "account_id_seq", - "schema": "account", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "login": { - "name": "login", - "type": "varchar(30)", - "primaryKey": false, - "notNull": true - }, - "password": { - "name": "password", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "social_id": { - "name": "social_id", - "type": "varchar(13)", - "primaryKey": false, - "notNull": true - }, - "email": { - "name": "email", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "status": { - "name": "status", - "type": "varchar(8)", - "primaryKey": false, - "notNull": true, - "default": "'OK'" - }, - "security_code": { - "name": "security_code", - "type": "varchar(192)", - "primaryKey": false, - "notNull": false - }, - "available_dt": { - "name": "available_dt", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "mileage": { - "name": "mileage", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "cash": { - "name": "cash", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "gold_expired_at": { - "name": "gold_expired_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "silver_expired_at": { - "name": "silver_expired_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "safebox_expired_at": { - "name": "safebox_expired_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "autoloot_expired_at": { - "name": "autoloot_expired_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "fish_mind_expired_at": { - "name": "fish_mind_expired_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "marriage_fast_expired_at": { - "name": "marriage_fast_expired_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "money_drop_rate_expired_at": { - "name": "money_drop_rate_expired_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "ip": { - "name": "ip", - "type": "varchar(16)", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "last_played_at": { - "name": "last_played_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "account_social_id": { - "name": "account_social_id", - "columns": [ - { - "expression": "social_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "account_login": { - "name": "account_login", - "nullsNotDistinct": false, - "columns": [ - "login" - ] - }, - "account_email": { - "name": "account_email", - "nullsNotDistinct": false, - "columns": [ - "email" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "player.affect": { - "name": "affect", - "schema": "player", - "columns": { - "player_id": { - "name": "player_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "type": { - "name": "type", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "apply_on": { - "name": "apply_on", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "apply_value": { - "name": "apply_value", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "flag": { - "name": "flag", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "duration": { - "name": "duration", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "sp_cost": { - "name": "sp_cost", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - } - }, - "indexes": {}, - "foreignKeys": { - "affect_player_id_player_id_fk": { - "name": "affect_player_id_player_id_fk", - "tableFrom": "affect", - "tableTo": "player", - "schemaTo": "player", - "columnsFrom": [ - "player_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "player.banword": { - "name": "banword", - "schema": "player", - "columns": { - "word": { - "name": "word", - "type": "text", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "log.boot_log": { - "name": "boot_log", - "schema": "log", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "boot_log_id_seq", - "schema": "log", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "hostname": { - "name": "hostname", - "type": "char(128)", - "primaryKey": false, - "notNull": true, - "default": "'UNKNOWN'" - }, - "channel": { - "name": "channel", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "player.change_empire": { - "name": "change_empire", - "schema": "player", - "columns": { - "account_id": { - "name": "account_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "change_count": { - "name": "change_count", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "change_empire_account_id_account_id_fk": { - "name": "change_empire_account_id_account_id_fk", - "tableFrom": "change_empire", - "tableTo": "account", - "schemaTo": "account", - "columnsFrom": [ - "account_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "log.change_name": { - "name": "change_name", - "schema": "log", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "change_name_id_seq", - "schema": "log", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "player_id": { - "name": "player_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "old_name": { - "name": "old_name", - "type": "varchar(191)", - "primaryKey": false, - "notNull": false - }, - "new_name": { - "name": "new_name", - "type": "varchar(191)", - "primaryKey": false, - "notNull": false - }, - "ip": { - "name": "ip", - "type": "varchar(16)", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "change_name_player_id_player_id_fk": { - "name": "change_name_player_id_player_id_fk", - "tableFrom": "change_name", - "tableTo": "player", - "schemaTo": "player", - "columnsFrom": [ - "player_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "log.command_log": { - "name": "command_log", - "schema": "log", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "command_log_id_seq", - "schema": "log", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "player_id": { - "name": "player_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "server": { - "name": "server", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "ip": { - "name": "ip", - "type": "varchar(16)", - "primaryKey": false, - "notNull": true - }, - "port": { - "name": "port", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "username": { - "name": "username", - "type": "varchar(50)", - "primaryKey": false, - "notNull": true - }, - "command": { - "name": "command", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "command_log_player_id_player_id_fk": { - "name": "command_log_player_id_player_id_fk", - "tableFrom": "command_log", - "tableTo": "player", - "schemaTo": "player", - "columnsFrom": [ - "player_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "log.cube_log": { - "name": "cube_log", - "schema": "log", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "cube_log_id_seq", - "schema": "log", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "player_id": { - "name": "player_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "x": { - "name": "x", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "y": { - "name": "y", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "item_vnum": { - "name": "item_vnum", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "item_uid": { - "name": "item_uid", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "item_count": { - "name": "item_count", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "success": { - "name": "success", - "type": "boolean", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "default": "now()" - } - }, - "indexes": { - "cube_log_player_id": { - "name": "cube_log_player_id", - "columns": [ - { - "expression": "player_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "cube_log_item_vnum": { - "name": "cube_log_item_vnum", - "columns": [ - { - "expression": "item_vnum", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "cube_log_item_uid": { - "name": "cube_log_item_uid", - "columns": [ - { - "expression": "item_uid", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "log.dragon_slay_log": { - "name": "dragon_slay_log", - "schema": "log", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "dragon_slay_log_id_seq", - "schema": "log", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "guild_id": { - "name": "guild_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "vnum": { - "name": "vnum", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "start_time": { - "name": "start_time", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "end_time": { - "name": "end_time", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "log.fish_log": { - "name": "fish_log", - "schema": "log", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "fish_log_id_seq", - "schema": "log", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "player_id": { - "name": "player_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "map_index": { - "name": "map_index", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "fish_id": { - "name": "fish_id", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "fishing_level": { - "name": "fishing_level", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "waiting_time": { - "name": "waiting_time", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "success": { - "name": "success", - "type": "boolean", - "primaryKey": false, - "notNull": true - }, - "size": { - "name": "size", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "fish_log_player_id_player_id_fk": { - "name": "fish_log_player_id_player_id_fk", - "tableFrom": "fish_log", - "tableTo": "player", - "schemaTo": "player", - "columnsFrom": [ - "player_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "common.gm_host": { - "name": "gm_host", - "schema": "common", - "columns": { - "ip": { - "name": "ip", - "type": "varchar(16)", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "common.gm_list": { - "name": "gm_list", - "schema": "common", - "columns": { - "player_id": { - "name": "player_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "contact_ip": { - "name": "contact_ip", - "type": "varchar(16)", - "primaryKey": false, - "notNull": true - }, - "server_ip": { - "name": "server_ip", - "type": "varchar(16)", - "primaryKey": false, - "notNull": true, - "default": "'ALL'" - }, - "authority": { - "name": "authority", - "type": "gm_authority", - "typeSchema": "common", - "primaryKey": false, - "notNull": false, - "default": "'PLAYER'" - } - }, - "indexes": {}, - "foreignKeys": { - "gm_list_player_id_player_id_fk": { - "name": "gm_list_player_id_player_id_fk", - "tableFrom": "gm_list", - "tableTo": "player", - "schemaTo": "player", - "columnsFrom": [ - "player_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "log.gold_log": { - "name": "gold_log", - "schema": "log", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "gold_log_id_seq", - "schema": "log", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "player_id": { - "name": "player_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "what": { - "name": "what", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "how": { - "name": "how", - "type": "gold_log_how", - "typeSchema": "log", - "primaryKey": false, - "notNull": true - }, - "hint": { - "name": "hint", - "type": "varchar(50)", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "default": "now()" - } - }, - "indexes": { - "gold_log_created_at": { - "name": "gold_log_created_at", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "gold_log_player_id": { - "name": "gold_log_player_id", - "columns": [ - { - "expression": "player_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "gold_log_what": { - "name": "gold_log_what", - "columns": [ - { - "expression": "what", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "gold_log_how": { - "name": "gold_log_how", - "columns": [ - { - "expression": "how", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "gold_log_player_id_player_id_fk": { - "name": "gold_log_player_id_player_id_fk", - "tableFrom": "gold_log", - "tableTo": "player", - "schemaTo": "player", - "columnsFrom": [ - "player_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "player.guild": { - "name": "guild", - "schema": "player", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "guild_id_seq", - "schema": "player", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "name": { - "name": "name", - "type": "varchar(12)", - "primaryKey": false, - "notNull": true - }, - "sp": { - "name": "sp", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 1000 - }, - "master": { - "name": "master", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "level": { - "name": "level", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "exp": { - "name": "exp", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "skill_point": { - "name": "skill_point", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "skill": { - "name": "skill", - "type": "bytea", - "primaryKey": false, - "notNull": false - }, - "win": { - "name": "win", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "draw": { - "name": "draw", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "loss": { - "name": "loss", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "ladder_point": { - "name": "ladder_point", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "gold": { - "name": "gold", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "player.guild_comment": { - "name": "guild_comment", - "schema": "player", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "guild_comment_id_seq", - "schema": "player", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "guild_id": { - "name": "guild_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "name": { - "name": "name", - "type": "varchar(8)", - "primaryKey": false, - "notNull": false - }, - "notice": { - "name": "notice", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "content": { - "name": "content", - "type": "varchar(50)", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": { - "aaa": { - "name": "aaa", - "columns": [ - { - "expression": "notice", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "id", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "guild_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "guild_comment_guild_id": { - "name": "guild_comment_guild_id", - "columns": [ - { - "expression": "guild_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "guild_comment_guild_id_guild_id_fk": { - "name": "guild_comment_guild_id_guild_id_fk", - "tableFrom": "guild_comment", - "tableTo": "guild", - "schemaTo": "player", - "columnsFrom": [ - "guild_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "player.guild_grade": { - "name": "guild_grade", - "schema": "player", - "columns": { - "guild_id": { - "name": "guild_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "grade": { - "name": "grade", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "name": { - "name": "name", - "type": "varchar(8)", - "primaryKey": false, - "notNull": true - }, - "auth": { - "name": "auth", - "type": "guild_grade_auth[]", - "primaryKey": false, - "notNull": true, - "default": "'{}'" - }, - "auth_bits": { - "name": "auth_bits", - "type": "bigint", - "primaryKey": false, - "notNull": false, - "generated": { - "as": "enum_array_to_bitmask(\"player\".\"guild_grade\".\"auth\")", - "type": "stored" - } - } - }, - "indexes": {}, - "foreignKeys": { - "guild_grade_guild_id_guild_id_fk": { - "name": "guild_grade_guild_id_guild_id_fk", - "tableFrom": "guild_grade", - "tableTo": "guild", - "schemaTo": "player", - "columnsFrom": [ - "guild_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "player.guild_member": { - "name": "guild_member", - "schema": "player", - "columns": { - "player_id": { - "name": "player_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "guild_id": { - "name": "guild_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "grade": { - "name": "grade", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "is_general": { - "name": "is_general", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "offer": { - "name": "offer", - "type": "integer", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": { - "guild_member_player_id_player_id_fk": { - "name": "guild_member_player_id_player_id_fk", - "tableFrom": "guild_member", - "tableTo": "player", - "schemaTo": "player", - "columnsFrom": [ - "player_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "guild_member_guild_id_guild_id_fk": { - "name": "guild_member_guild_id_guild_id_fk", - "tableFrom": "guild_member", - "tableTo": "guild", - "schemaTo": "player", - "columnsFrom": [ - "guild_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "guild_member_player_id_guild_id_pk": { - "name": "guild_member_player_id_guild_id_pk", - "columns": [ - "player_id", - "guild_id" - ] - } - }, - "uniqueConstraints": { - "player_id": { - "name": "player_id", - "nullsNotDistinct": false, - "columns": [ - "player_id" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "player.guild_war_bet": { - "name": "guild_war_bet", - "schema": "player", - "columns": { - "login": { - "name": "login", - "type": "varchar(24)", - "primaryKey": false, - "notNull": true - }, - "gold": { - "name": "gold", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "guild_id": { - "name": "guild_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "war_id": { - "name": "war_id", - "type": "integer", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "guild_war_bet_guild_id_guild_id_fk": { - "name": "guild_war_bet_guild_id_guild_id_fk", - "tableFrom": "guild_war_bet", - "tableTo": "guild", - "schemaTo": "player", - "columnsFrom": [ - "guild_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "guild_war_bet_war_id_guild_war_reservation_id_fk": { - "name": "guild_war_bet_war_id_guild_war_reservation_id_fk", - "tableFrom": "guild_war_bet", - "tableTo": "guild_war_reservation", - "schemaTo": "player", - "columnsFrom": [ - "war_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "player.guild_war_reservation": { - "name": "guild_war_reservation", - "schema": "player", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "guild_war_reservation_id_seq", - "schema": "player", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "guild1": { - "name": "guild1", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "guild2": { - "name": "guild2", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "type": { - "name": "type", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "warprice": { - "name": "warprice", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "initial_score": { - "name": "initial_score", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "started": { - "name": "started", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "bet_from": { - "name": "bet_from", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "bet_to": { - "name": "bet_to", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "winner": { - "name": "winner", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": -1 - }, - "power_from": { - "name": "power_from", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "power_to": { - "name": "power_to", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "handicap": { - "name": "handicap", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "result_1": { - "name": "result_1", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "result_2": { - "name": "result_2", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "started_at": { - "name": "started_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "guild_war_reservation_guild1_guild_id_fk": { - "name": "guild_war_reservation_guild1_guild_id_fk", - "tableFrom": "guild_war_reservation", - "tableTo": "guild", - "schemaTo": "player", - "columnsFrom": [ - "guild1" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "guild_war_reservation_guild2_guild_id_fk": { - "name": "guild_war_reservation_guild2_guild_id_fk", - "tableFrom": "guild_war_reservation", - "tableTo": "guild", - "schemaTo": "player", - "columnsFrom": [ - "guild2" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "log.hack_log": { - "name": "hack_log", - "schema": "log", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "hack_log_id_seq", - "schema": "log", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "login": { - "name": "login", - "type": "char(16)", - "primaryKey": false, - "notNull": true - }, - "name": { - "name": "name", - "type": "char(24)", - "primaryKey": false, - "notNull": true - }, - "ip": { - "name": "ip", - "type": "char(15)", - "primaryKey": false, - "notNull": true - }, - "server": { - "name": "server", - "type": "char(100)", - "primaryKey": false, - "notNull": true - }, - "why": { - "name": "why", - "type": "char(191)", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "player.horse_name": { - "name": "horse_name", - "schema": "player", - "columns": { - "player_id": { - "name": "player_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "name": { - "name": "name", - "type": "varchar(24)", - "primaryKey": false, - "notNull": true, - "default": "'NONAME'" - } - }, - "indexes": {}, - "foreignKeys": { - "horse_name_player_id_player_id_fk": { - "name": "horse_name_player_id_player_id_fk", - "tableFrom": "horse_name", - "tableTo": "player", - "schemaTo": "player", - "columnsFrom": [ - "player_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "player.item": { - "name": "item", - "schema": "player", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "item_id_seq", - "schema": "player", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "owner_id": { - "name": "owner_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "window": { - "name": "window", - "type": "item_window", - "typeSchema": "player", - "primaryKey": false, - "notNull": true, - "default": "'INVENTORY'" - }, - "position": { - "name": "position", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "count": { - "name": "count", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "vnum": { - "name": "vnum", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "socket_0": { - "name": "socket_0", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "socket_1": { - "name": "socket_1", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "socket_2": { - "name": "socket_2", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "socket_3": { - "name": "socket_3", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "socket_4": { - "name": "socket_4", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "socket_5": { - "name": "socket_5", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "attr_type_0": { - "name": "attr_type_0", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "attr_value_0": { - "name": "attr_value_0", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "attr_type_1": { - "name": "attr_type_1", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "attr_value_1": { - "name": "attr_value_1", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "attr_type_2": { - "name": "attr_type_2", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "attr_value_2": { - "name": "attr_value_2", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "attr_type_3": { - "name": "attr_type_3", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "attr_value_3": { - "name": "attr_value_3", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "attr_type_4": { - "name": "attr_type_4", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "attr_value_4": { - "name": "attr_value_4", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "attr_type_5": { - "name": "attr_type_5", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "attr_value_5": { - "name": "attr_value_5", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "attr_type_6": { - "name": "attr_type_6", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "attr_value_6": { - "name": "attr_value_6", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - } - }, - "indexes": { - "item_owner_id": { - "name": "item_owner_id", - "columns": [ - { - "expression": "owner_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "item_window": { - "name": "item_window", - "columns": [ - { - "expression": "window", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "item_vnum": { - "name": "item_vnum", - "columns": [ - { - "expression": "vnum", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "player.item_attr": { - "name": "item_attr", - "schema": "player", - "columns": { - "apply": { - "name": "apply", - "type": "item_attr_apply", - "typeSchema": "player", - "primaryKey": false, - "notNull": true, - "default": "'MAX_HP'" - }, - "probability": { - "name": "probability", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "lvl_1": { - "name": "lvl_1", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "lvl_2": { - "name": "lvl_2", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "lvl_3": { - "name": "lvl_3", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "lvl_4": { - "name": "lvl_4", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "lvl_5": { - "name": "lvl_5", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "weapon": { - "name": "weapon", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "body": { - "name": "body", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "wrist": { - "name": "wrist", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "foots": { - "name": "foots", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "neck": { - "name": "neck", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "head": { - "name": "head", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "shield": { - "name": "shield", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "ear": { - "name": "ear", - "type": "integer", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "player.item_attr_rare": { - "name": "item_attr_rare", - "schema": "player", - "columns": { - "apply": { - "name": "apply", - "type": "item_attr_rare_apply", - "typeSchema": "player", - "primaryKey": false, - "notNull": true, - "default": "'MAX_HP'" - }, - "probability": { - "name": "probability", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "lvl_1": { - "name": "lvl_1", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "lvl_2": { - "name": "lvl_2", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "lvl_3": { - "name": "lvl_3", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "lvl_4": { - "name": "lvl_4", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "lvl_5": { - "name": "lvl_5", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "weapon": { - "name": "weapon", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "body": { - "name": "body", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "wrist": { - "name": "wrist", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "foots": { - "name": "foots", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "neck": { - "name": "neck", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "head": { - "name": "head", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "shield": { - "name": "shield", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "ear": { - "name": "ear", - "type": "integer", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "player.item_award": { - "name": "item_award", - "schema": "player", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "item_award_id_seq", - "schema": "player", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "player_id": { - "name": "player_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "login": { - "name": "login", - "type": "varchar(30)", - "primaryKey": false, - "notNull": true - }, - "vnum": { - "name": "vnum", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "count": { - "name": "count", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "give_at": { - "name": "give_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "taken_at": { - "name": "taken_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false - }, - "item_id": { - "name": "item_id", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "why": { - "name": "why", - "type": "varchar(128)", - "primaryKey": false, - "notNull": false - }, - "socket_0": { - "name": "socket_0", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "socket_1": { - "name": "socket_1", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "socket_2": { - "name": "socket_2", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "mall": { - "name": "mall", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - } - }, - "indexes": { - "item_award_player_id": { - "name": "item_award_player_id", - "columns": [ - { - "expression": "player_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "item_award_given_at": { - "name": "item_award_given_at", - "columns": [ - { - "expression": "give_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "item_award_taken_at": { - "name": "item_award_taken_at", - "columns": [ - { - "expression": "taken_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "item_award_player_id_player_id_fk": { - "name": "item_award_player_id_player_id_fk", - "tableFrom": "item_award", - "tableTo": "player", - "schemaTo": "player", - "columnsFrom": [ - "player_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "player.item_proto": { - "name": "item_proto", - "schema": "player", - "columns": { - "vnum": { - "name": "vnum", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "locale_name": { - "name": "locale_name", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "type": { - "name": "type", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "sub_type": { - "name": "sub_type", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "weight": { - "name": "weight", - "type": "integer", - "primaryKey": false, - "notNull": false, - "default": 0 - }, - "size": { - "name": "size", - "type": "integer", - "primaryKey": false, - "notNull": false, - "default": 0 - }, - "anti_flag": { - "name": "anti_flag", - "type": "integer", - "primaryKey": false, - "notNull": false, - "default": 0 - }, - "flag": { - "name": "flag", - "type": "integer", - "primaryKey": false, - "notNull": false, - "default": 0 - }, - "wear_flag": { - "name": "wear_flag", - "type": "integer", - "primaryKey": false, - "notNull": false, - "default": 0 - }, - "immune_flag": { - "name": "immune_flag", - "type": "item_proto_immune_flag[]", - "primaryKey": false, - "notNull": true, - "default": "'{}'" - }, - "gold": { - "name": "gold", - "type": "integer", - "primaryKey": false, - "notNull": false, - "default": 0 - }, - "shop_buy_price": { - "name": "shop_buy_price", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "refined_vnum": { - "name": "refined_vnum", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "refine_set": { - "name": "refine_set", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "refine_set2": { - "name": "refine_set2", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "magic_percentage": { - "name": "magic_percentage", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "limit_type_0": { - "name": "limit_type_0", - "type": "integer", - "primaryKey": false, - "notNull": false, - "default": 0 - }, - "limit_value_0": { - "name": "limit_value_0", - "type": "integer", - "primaryKey": false, - "notNull": false, - "default": 0 - }, - "limit_type_1": { - "name": "limit_type_1", - "type": "integer", - "primaryKey": false, - "notNull": false, - "default": 0 - }, - "limit_value_1": { - "name": "limit_value_1", - "type": "integer", - "primaryKey": false, - "notNull": false, - "default": 0 - }, - "apply_type_0": { - "name": "apply_type_0", - "type": "integer", - "primaryKey": false, - "notNull": false, - "default": 0 - }, - "apply_value_0": { - "name": "apply_value_0", - "type": "integer", - "primaryKey": false, - "notNull": false, - "default": 0 - }, - "apply_type_1": { - "name": "apply_type_1", - "type": "integer", - "primaryKey": false, - "notNull": false, - "default": 0 - }, - "apply_value_1": { - "name": "apply_value_1", - "type": "integer", - "primaryKey": false, - "notNull": false, - "default": 0 - }, - "apply_type_2": { - "name": "apply_type_2", - "type": "integer", - "primaryKey": false, - "notNull": false, - "default": 0 - }, - "apply_value_2": { - "name": "apply_value_2", - "type": "integer", - "primaryKey": false, - "notNull": false, - "default": 0 - }, - "value_0": { - "name": "value_0", - "type": "integer", - "primaryKey": false, - "notNull": false, - "default": 0 - }, - "value_1": { - "name": "value_1", - "type": "integer", - "primaryKey": false, - "notNull": false, - "default": 0 - }, - "value_2": { - "name": "value_2", - "type": "integer", - "primaryKey": false, - "notNull": false, - "default": 0 - }, - "value_3": { - "name": "value_3", - "type": "integer", - "primaryKey": false, - "notNull": false, - "default": 0 - }, - "value_4": { - "name": "value_4", - "type": "integer", - "primaryKey": false, - "notNull": false, - "default": 0 - }, - "value_5": { - "name": "value_5", - "type": "integer", - "primaryKey": false, - "notNull": false, - "default": 0 - }, - "socket_0": { - "name": "socket_0", - "type": "integer", - "primaryKey": false, - "notNull": false, - "default": -1 - }, - "socket_1": { - "name": "socket_1", - "type": "integer", - "primaryKey": false, - "notNull": false, - "default": -1 - }, - "socket_2": { - "name": "socket_2", - "type": "integer", - "primaryKey": false, - "notNull": false, - "default": -1 - }, - "socket_3": { - "name": "socket_3", - "type": "integer", - "primaryKey": false, - "notNull": false, - "default": -1 - }, - "socket_4": { - "name": "socket_4", - "type": "integer", - "primaryKey": false, - "notNull": false, - "default": -1 - }, - "socket_5": { - "name": "socket_5", - "type": "integer", - "primaryKey": false, - "notNull": false, - "default": -1 - }, - "specular": { - "name": "specular", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "socket_percentage": { - "name": "socket_percentage", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "addon_type": { - "name": "addon_type", - "type": "integer", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "player.land": { - "name": "land", - "schema": "player", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true - }, - "map_index": { - "name": "map_index", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "x": { - "name": "x", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "y": { - "name": "y", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "width": { - "name": "width", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "height": { - "name": "height", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "guild_id": { - "name": "guild_id", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "guild_level_limit": { - "name": "guild_level_limit", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "price": { - "name": "price", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "enabled": { - "name": "enabled", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "log.level_log": { - "name": "level_log", - "schema": "log", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "level_log_id_seq", - "schema": "log", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "name": { - "name": "name", - "type": "char(24)", - "primaryKey": false, - "notNull": true - }, - "level": { - "name": "level", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "playtime": { - "name": "playtime", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "player_id": { - "name": "player_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "level_log_player_id_player_id_fk": { - "name": "level_log_player_id_player_id_fk", - "tableFrom": "level_log", - "tableTo": "player", - "schemaTo": "player", - "columnsFrom": [ - "player_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "common.locale": { - "name": "locale", - "schema": "common", - "columns": { - "key": { - "name": "key", - "type": "varchar(191)", - "primaryKey": false, - "notNull": true - }, - "value": { - "name": "value", - "type": "varchar(191)", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "locale_key": { - "name": "locale_key", - "columns": [ - { - "expression": "key", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "log.log": { - "name": "log", - "schema": "log", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "log_id_seq", - "schema": "log", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "type": { - "name": "type", - "type": "log_type", - "typeSchema": "log", - "primaryKey": false, - "notNull": true, - "default": "'ITEM'" - }, - "who": { - "name": "who", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "x": { - "name": "x", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "y": { - "name": "y", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "what": { - "name": "what", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "how": { - "name": "how", - "type": "varchar(50)", - "primaryKey": false, - "notNull": true - }, - "hint": { - "name": "hint", - "type": "varchar(70)", - "primaryKey": false, - "notNull": false - }, - "ip": { - "name": "ip", - "type": "varchar(16)", - "primaryKey": false, - "notNull": false - }, - "vnum": { - "name": "vnum", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "default": "now()" - } - }, - "indexes": { - "log_who": { - "name": "log_who", - "columns": [ - { - "expression": "who", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "log_what": { - "name": "log_what", - "columns": [ - { - "expression": "what", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "log_how": { - "name": "log_how", - "columns": [ - { - "expression": "how", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "log.login_log": { - "name": "login_log", - "schema": "log", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "login_log_id_seq", - "schema": "log", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "type": { - "name": "type", - "type": "login_log_type", - "typeSchema": "log", - "primaryKey": false, - "notNull": false - }, - "channel": { - "name": "channel", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "account_id": { - "name": "account_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "player_id": { - "name": "player_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "level": { - "name": "level", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "job": { - "name": "job", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "playtime": { - "name": "playtime", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "default": "now()" - } - }, - "indexes": { - "login_log_player_id": { - "name": "login_log_player_id", - "columns": [ - { - "expression": "player_id", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "type", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "login_log_account_id_account_id_fk": { - "name": "login_log_account_id_account_id_fk", - "tableFrom": "login_log", - "tableTo": "account", - "schemaTo": "account", - "columnsFrom": [ - "account_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "login_log_player_id_player_id_fk": { - "name": "login_log_player_id_player_id_fk", - "tableFrom": "login_log", - "tableTo": "player", - "schemaTo": "player", - "columnsFrom": [ - "player_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "log.login_log_2": { - "name": "login_log_2", - "schema": "log", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "login_log_2_id_seq", - "schema": "log", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "type": { - "name": "type", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "is_gm": { - "name": "is_gm", - "type": "boolean", - "primaryKey": false, - "notNull": false - }, - "channel": { - "name": "channel", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "account_id": { - "name": "account_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "player_id": { - "name": "player_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "ip": { - "name": "ip", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "client_version": { - "name": "client_version", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "playtime": { - "name": "playtime", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "login_at": { - "name": "login_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false - }, - "logout_at": { - "name": "logout_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": { - "login_log_2_account_id_account_id_fk": { - "name": "login_log_2_account_id_account_id_fk", - "tableFrom": "login_log_2", - "tableTo": "account", - "schemaTo": "account", - "columnsFrom": [ - "account_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "login_log_2_player_id_player_id_fk": { - "name": "login_log_2_player_id_player_id_fk", - "tableFrom": "login_log_2", - "tableTo": "player", - "schemaTo": "player", - "columnsFrom": [ - "player_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "player.lotto_list": { - "name": "lotto_list", - "schema": "player", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "lotto_list_id_seq", - "schema": "player", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "server": { - "name": "server", - "type": "varchar(20)", - "primaryKey": false, - "notNull": false - }, - "playerId": { - "name": "playerId", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "lotto_list_playerId_player_id_fk": { - "name": "lotto_list_playerId_player_id_fk", - "tableFrom": "lotto_list", - "tableTo": "player", - "schemaTo": "player", - "columnsFrom": [ - "playerId" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "player.marriage": { - "name": "marriage", - "schema": "player", - "columns": { - "is_married": { - "name": "is_married", - "type": "boolean", - "primaryKey": false, - "notNull": true, - "default": false - }, - "player_id_1": { - "name": "player_id_1", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "player_id_2": { - "name": "player_id_2", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "love_points": { - "name": "love_points", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "marriage_player_id_1_player_id_fk": { - "name": "marriage_player_id_1_player_id_fk", - "tableFrom": "marriage", - "tableTo": "player", - "schemaTo": "player", - "columnsFrom": [ - "player_id_1" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "marriage_player_id_2_player_id_fk": { - "name": "marriage_player_id_2_player_id_fk", - "tableFrom": "marriage", - "tableTo": "player", - "schemaTo": "player", - "columnsFrom": [ - "player_id_2" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "player.messenger_list": { - "name": "messenger_list", - "schema": "player", - "columns": { - "account": { - "name": "account", - "type": "varchar(16)", - "primaryKey": false, - "notNull": true - }, - "companion": { - "name": "companion", - "type": "varchar(16)", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "player.mob_proto": { - "name": "mob_proto", - "schema": "player", - "columns": { - "vnum": { - "name": "vnum", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "locale_name": { - "name": "locale_name", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "rank": { - "name": "rank", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "type": { - "name": "type", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "battle_type": { - "name": "battle_type", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "level": { - "name": "level", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 1 - }, - "size": { - "name": "size", - "type": "mob_size", - "typeSchema": "player", - "primaryKey": false, - "notNull": false, - "default": "'SMALL'" - }, - "ai_flag": { - "name": "ai_flag", - "type": "mob_ai_flag[]", - "primaryKey": false, - "notNull": true, - "default": "'{}'" - }, - "mount_capacity": { - "name": "mount_capacity", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "set_race_flag": { - "name": "set_race_flag", - "type": "mob_set_race_flag", - "typeSchema": "player", - "primaryKey": false, - "notNull": true - }, - "set_immune_flag": { - "name": "set_immune_flag", - "type": "mob_set_immune_flag", - "typeSchema": "player", - "primaryKey": false, - "notNull": false - }, - "empire": { - "name": "empire", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "folder": { - "name": "folder", - "type": "varchar(100)", - "primaryKey": false, - "notNull": true - }, - "on_click": { - "name": "on_click", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "st": { - "name": "st", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "dx": { - "name": "dx", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "ht": { - "name": "ht", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "iq": { - "name": "iq", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "damage_min": { - "name": "damage_min", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "damage_max": { - "name": "damage_max", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "max_hp": { - "name": "max_hp", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "regen_cycle": { - "name": "regen_cycle", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "regen_percent": { - "name": "regen_percent", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "gold_min": { - "name": "gold_min", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "gold_max": { - "name": "gold_max", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "exp": { - "name": "exp", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "def": { - "name": "def", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "attack_speed": { - "name": "attack_speed", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 100 - }, - "move_speed": { - "name": "move_speed", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 100 - }, - "aggressive_hp_percentage": { - "name": "aggressive_hp_percentage", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "aggressive_sight": { - "name": "aggressive_sight", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "attack_range": { - "name": "attack_range", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "drop_item": { - "name": "drop_item", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "resurrection_vnum": { - "name": "resurrection_vnum", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "enchant_curse": { - "name": "enchant_curse", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "enchant_slow": { - "name": "enchant_slow", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "enchant_poison": { - "name": "enchant_poison", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "enchant_stun": { - "name": "enchant_stun", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "enchant_critical": { - "name": "enchant_critical", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "enchant_penetrate": { - "name": "enchant_penetrate", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "resist_sword": { - "name": "resist_sword", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "resist_twohand": { - "name": "resist_twohand", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "resist_dagger": { - "name": "resist_dagger", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "resist_bell": { - "name": "resist_bell", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "resist_fan": { - "name": "resist_fan", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "resist_bow": { - "name": "resist_bow", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "resist_fire": { - "name": "resist_fire", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "resist_elect": { - "name": "resist_elect", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "resist_magic": { - "name": "resist_magic", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "resist_wind": { - "name": "resist_wind", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "resist_poison": { - "name": "resist_poison", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "dam_multiply": { - "name": "dam_multiply", - "type": "double precision", - "primaryKey": false, - "notNull": false - }, - "summon": { - "name": "summon", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "drain_sp": { - "name": "drain_sp", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "mob_color": { - "name": "mob_color", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "polymorph_item": { - "name": "polymorph_item", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "skill_level0": { - "name": "skill_level0", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "skill_vnum0": { - "name": "skill_vnum0", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "skill_level1": { - "name": "skill_level1", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "skill_vnum1": { - "name": "skill_vnum1", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "skill_level2": { - "name": "skill_level2", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "skill_vnum2": { - "name": "skill_vnum2", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "skill_level3": { - "name": "skill_level3", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "skill_vnum3": { - "name": "skill_vnum3", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "skill_level4": { - "name": "skill_level4", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "skill_vnum4": { - "name": "skill_vnum4", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "sp_berserk": { - "name": "sp_berserk", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "sp_stoneskin": { - "name": "sp_stoneskin", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "sp_godspeed": { - "name": "sp_godspeed", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "sp_deathblow": { - "name": "sp_deathblow", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "sp_revive": { - "name": "sp_revive", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "player.monarch": { - "name": "monarch", - "schema": "player", - "columns": { - "empire": { - "name": "empire", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "player_id": { - "name": "player_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "win_at": { - "name": "win_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false - }, - "money": { - "name": "money", - "type": "integer", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": { - "monarch_player_id_player_id_fk": { - "name": "monarch_player_id_player_id_fk", - "tableFrom": "monarch", - "tableTo": "player", - "schemaTo": "player", - "columnsFrom": [ - "player_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "player.monarch_candidacy": { - "name": "monarch_candidacy", - "schema": "player", - "columns": { - "player_id": { - "name": "player_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "date": { - "name": "date", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "default": "now()" - }, - "name": { - "name": "name", - "type": "varchar(16)", - "primaryKey": false, - "notNull": false - }, - "win_at": { - "name": "win_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": { - "monarch_candidacy_player_id_player_id_fk": { - "name": "monarch_candidacy_player_id_player_id_fk", - "tableFrom": "monarch_candidacy", - "tableTo": "player", - "schemaTo": "player", - "columnsFrom": [ - "player_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "player.monarch_election": { - "name": "monarch_election", - "schema": "player", - "columns": { - "player_id": { - "name": "player_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "selected_player_id": { - "name": "selected_player_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "election_at": { - "name": "election_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "monarch_election_player_id_player_id_fk": { - "name": "monarch_election_player_id_player_id_fk", - "tableFrom": "monarch_election", - "tableTo": "player", - "schemaTo": "player", - "columnsFrom": [ - "player_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - }, - "monarch_election_selected_player_id_player_id_fk": { - "name": "monarch_election_selected_player_id_player_id_fk", - "tableFrom": "monarch_election", - "tableTo": "player", - "schemaTo": "player", - "columnsFrom": [ - "selected_player_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "log.money_log": { - "name": "money_log", - "schema": "log", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "money_log_id_seq", - "schema": "log", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "type": { - "name": "type", - "type": "money_log_type", - "typeSchema": "log", - "primaryKey": false, - "notNull": false - }, - "vnum": { - "name": "vnum", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "gold": { - "name": "gold", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "default": "now()" - } - }, - "indexes": { - "money_log_type": { - "name": "money_log_type", - "columns": [ - { - "expression": "type", - "isExpression": false, - "asc": true, - "nulls": "last" - }, - { - "expression": "vnum", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "player.myshop_pricelist": { - "name": "myshop_pricelist", - "schema": "player", - "columns": { - "owner_id": { - "name": "owner_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "item_vnum": { - "name": "item_vnum", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "price": { - "name": "price", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "list_id": { - "name": "list_id", - "nullsNotDistinct": false, - "columns": [ - "owner_id", - "item_vnum" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "player.object": { - "name": "object", - "schema": "player", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "object_id_seq", - "schema": "player", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "land_id": { - "name": "land_id", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "vnum": { - "name": "vnum", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "map_index": { - "name": "map_index", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "x": { - "name": "x", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "y": { - "name": "y", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "x_rot": { - "name": "x_rot", - "type": "double precision", - "primaryKey": false, - "notNull": true - }, - "y_rot": { - "name": "y_rot", - "type": "double precision", - "primaryKey": false, - "notNull": true - }, - "z_rot": { - "name": "z_rot", - "type": "double precision", - "primaryKey": false, - "notNull": true - }, - "life": { - "name": "life", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "player.object_proto": { - "name": "object_proto", - "schema": "player", - "columns": { - "vnum": { - "name": "vnum", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "name": { - "name": "name", - "type": "varchar(32)", - "primaryKey": false, - "notNull": true - }, - "price": { - "name": "price", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "materials": { - "name": "materials", - "type": "varchar(64)", - "primaryKey": false, - "notNull": true - }, - "upgrade_vnum": { - "name": "upgrade_vnum", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "upgrade_limit_time": { - "name": "upgrade_limit_time", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "life": { - "name": "life", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "reg_1": { - "name": "reg_1", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "reg_2": { - "name": "reg_2", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "reg_3": { - "name": "reg_3", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "reg_4": { - "name": "reg_4", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "npc": { - "name": "npc", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "group_vnum": { - "name": "group_vnum", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "dependent_group": { - "name": "dependent_group", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - } - }, - "indexes": { - "object_proto_vnum": { - "name": "object_proto_vnum", - "columns": [ - { - "expression": "vnum", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "object_proto_group_vnum": { - "name": "object_proto_group_vnum", - "columns": [ - { - "expression": "group_vnum", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "object_proto_upgrade_vnum": { - "name": "object_proto_upgrade_vnum", - "columns": [ - { - "expression": "upgrade_vnum", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "web.password_reset_session": { - "name": "password_reset_session", - "schema": "web", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "user_id": { - "name": "user_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "email": { - "name": "email", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "code": { - "name": "code", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "expires_at": { - "name": "expires_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "password_reset_session_user_id_account_id_fk": { - "name": "password_reset_session_user_id_account_id_fk", - "tableFrom": "password_reset_session", - "tableTo": "account", - "schemaTo": "account", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "player.player": { - "name": "player", - "schema": "player", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "player_id_seq", - "schema": "player", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "account_id": { - "name": "account_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "name": { - "name": "name", - "type": "varchar(24)", - "primaryKey": false, - "notNull": true, - "default": "'NONAME'" - }, - "job": { - "name": "job", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "voice": { - "name": "voice", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "dir": { - "name": "dir", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "x": { - "name": "x", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "y": { - "name": "y", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "z": { - "name": "z", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "map_index": { - "name": "map_index", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "exit_x": { - "name": "exit_x", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "exit_y": { - "name": "exit_y", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "exit_map_index": { - "name": "exit_map_index", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "hp": { - "name": "hp", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "mp": { - "name": "mp", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "stamina": { - "name": "stamina", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "random_hp": { - "name": "random_hp", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "random_sp": { - "name": "random_sp", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "playtime": { - "name": "playtime", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "level": { - "name": "level", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 1 - }, - "level_step": { - "name": "level_step", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "st": { - "name": "st", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "ht": { - "name": "ht", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "dx": { - "name": "dx", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "iq": { - "name": "iq", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "exp": { - "name": "exp", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "gold": { - "name": "gold", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "stat_point": { - "name": "stat_point", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "skill_point": { - "name": "skill_point", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "quick_slot": { - "name": "quick_slot", - "type": "bytea", - "primaryKey": false, - "notNull": false - }, - "ip": { - "name": "ip", - "type": "varchar(16)", - "primaryKey": false, - "notNull": false, - "default": "'0.0.0.0'" - }, - "part_main": { - "name": "part_main", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "part_base": { - "name": "part_base", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "part_hair": { - "name": "part_hair", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "skill_group": { - "name": "skill_group", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "skill_level": { - "name": "skill_level", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "alignment": { - "name": "alignment", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "last_played_at": { - "name": "last_played_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "change_name": { - "name": "change_name", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "sub_skill_point": { - "name": "sub_skill_point", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "stat_reset_count": { - "name": "stat_reset_count", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "horse_hp": { - "name": "horse_hp", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "horse_stamina": { - "name": "horse_stamina", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "horse_level": { - "name": "horse_level", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "horse_hp_droptime": { - "name": "horse_hp_droptime", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "horse_riding": { - "name": "horse_riding", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "horse_skill_point": { - "name": "horse_skill_point", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "bank_value": { - "name": "bank_value", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - } - }, - "indexes": { - "player_account_id": { - "name": "player_account_id", - "columns": [ - { - "expression": "account_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "player_name": { - "name": "player_name", - "columns": [ - { - "expression": "name", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "player_account_id_account_id_fk": { - "name": "player_account_id_account_id_fk", - "tableFrom": "player", - "tableTo": "account", - "schemaTo": "account", - "columnsFrom": [ - "account_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "log.player_count": { - "name": "player_count", - "schema": "log", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "player_count_id_seq", - "schema": "log", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "count_red": { - "name": "count_red", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "count_yellow": { - "name": "count_yellow", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "count_blue": { - "name": "count_blue", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "count_total": { - "name": "count_total", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "player.player_deleted": { - "name": "player_deleted", - "schema": "player", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "player_deleted_id_seq", - "schema": "player", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "account_id": { - "name": "account_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "name": { - "name": "name", - "type": "varchar(24)", - "primaryKey": false, - "notNull": true, - "default": "'NONAME'" - }, - "job": { - "name": "job", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "voice": { - "name": "voice", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "dir": { - "name": "dir", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "x": { - "name": "x", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "y": { - "name": "y", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "z": { - "name": "z", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "map_index": { - "name": "map_index", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "exit_x": { - "name": "exit_x", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "exit_y": { - "name": "exit_y", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "exit_map_index": { - "name": "exit_map_index", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "hp": { - "name": "hp", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "mp": { - "name": "mp", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "stamina": { - "name": "stamina", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "random_hp": { - "name": "random_hp", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "random_sp": { - "name": "random_sp", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "playtime": { - "name": "playtime", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "level": { - "name": "level", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 1 - }, - "level_step": { - "name": "level_step", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "st": { - "name": "st", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "ht": { - "name": "ht", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "dx": { - "name": "dx", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "iq": { - "name": "iq", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "exp": { - "name": "exp", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "gold": { - "name": "gold", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "stat_point": { - "name": "stat_point", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "skill_point": { - "name": "skill_point", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "quick_slot": { - "name": "quick_slot", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "ip": { - "name": "ip", - "type": "varchar(16)", - "primaryKey": false, - "notNull": false, - "default": "'0.0.0.0'" - }, - "part_main": { - "name": "part_main", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "part_base": { - "name": "part_base", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "part_hair": { - "name": "part_hair", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "skill_group": { - "name": "skill_group", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "skill_level": { - "name": "skill_level", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "alignment": { - "name": "alignment", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "last_played_at": { - "name": "last_played_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "change_name": { - "name": "change_name", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "sub_skill_point": { - "name": "sub_skill_point", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "stat_reset_count": { - "name": "stat_reset_count", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "horse_hp": { - "name": "horse_hp", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "horse_stamina": { - "name": "horse_stamina", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "horse_level": { - "name": "horse_level", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "horse_hp_droptime": { - "name": "horse_hp_droptime", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "horse_riding": { - "name": "horse_riding", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "horse_skill_point": { - "name": "horse_skill_point", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "bank_value": { - "name": "bank_value", - "type": "integer", - "primaryKey": false, - "notNull": false, - "default": 0 - } - }, - "indexes": { - "player_deleted_account_id": { - "name": "player_deleted_account_id", - "columns": [ - { - "expression": "account_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "player_deleted_name": { - "name": "player_deleted_name", - "columns": [ - { - "expression": "name", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "player_deleted_account_id_account_id_fk": { - "name": "player_deleted_account_id_account_id_fk", - "tableFrom": "player_deleted", - "tableTo": "account", - "schemaTo": "account", - "columnsFrom": [ - "account_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "player.player_index": { - "name": "player_index", - "schema": "player", - "columns": { - "account_id": { - "name": "account_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "player_id": { - "name": "player_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "empire": { - "name": "empire", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "last_played_at": { - "name": "last_played_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false - } - }, - "indexes": { - "player_index_empire": { - "name": "player_index_empire", - "columns": [ - { - "expression": "empire", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "player_index_account_id_account_id_fk": { - "name": "player_index_account_id_account_id_fk", - "tableFrom": "player_index", - "tableTo": "account", - "schemaTo": "account", - "columnsFrom": [ - "account_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": { - "player_index_account_id_player_id_pk": { - "name": "player_index_account_id_player_id_pk", - "columns": [ - "account_id", - "player_id" - ] - } - }, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "player.quest": { - "name": "quest", - "schema": "player", - "columns": { - "player_id": { - "name": "player_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "name": { - "name": "name", - "type": "varchar(32)", - "primaryKey": false, - "notNull": true - }, - "state": { - "name": "state", - "type": "varchar(64)", - "primaryKey": false, - "notNull": true - }, - "value": { - "name": "value", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - } - }, - "indexes": { - "quest_player_id": { - "name": "quest_player_id", - "columns": [ - { - "expression": "player_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "quest_name": { - "name": "quest_name", - "columns": [ - { - "expression": "name", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "quest_state": { - "name": "quest_state", - "columns": [ - { - "expression": "state", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "quest_player_id_player_id_fk": { - "name": "quest_player_id_player_id_fk", - "tableFrom": "quest", - "tableTo": "player", - "schemaTo": "player", - "columnsFrom": [ - "player_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "log.quest_reward_log": { - "name": "quest_reward_log", - "schema": "log", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "quest_reward_log_id_seq", - "schema": "log", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "quest_name": { - "name": "quest_name", - "type": "varchar(32)", - "primaryKey": false, - "notNull": false - }, - "player_id": { - "name": "player_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "player_level": { - "name": "player_level", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "reward_type": { - "name": "reward_type", - "type": "reward_type", - "typeSchema": "log", - "primaryKey": false, - "notNull": false - }, - "reward_value1": { - "name": "reward_value1", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "reward_value2": { - "name": "reward_value2", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "default": "now()" - } - }, - "indexes": { - "quest_reward_log_player_id": { - "name": "quest_reward_log_player_id", - "columns": [ - { - "expression": "player_id", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "log.refine_log": { - "name": "refine_log", - "schema": "log", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "refine_log_id_seq", - "schema": "log", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "player_id": { - "name": "player_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "item_name": { - "name": "item_name", - "type": "varchar(24)", - "primaryKey": false, - "notNull": true - }, - "item_id": { - "name": "item_id", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "step": { - "name": "step", - "type": "varchar(50)", - "primaryKey": false, - "notNull": true - }, - "is_success": { - "name": "is_success", - "type": "boolean", - "primaryKey": false, - "notNull": true - }, - "set_type": { - "name": "set_type", - "type": "refine_log_set_type", - "typeSchema": "log", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "refine_log_player_id_player_id_fk": { - "name": "refine_log_player_id_player_id_fk", - "tableFrom": "refine_log", - "tableTo": "player", - "schemaTo": "player", - "columnsFrom": [ - "player_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "player.refine_proto": { - "name": "refine_proto", - "schema": "player", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true - }, - "vnum_0": { - "name": "vnum_0", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "count_0": { - "name": "count_0", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "vnum_1": { - "name": "vnum_1", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "count_1": { - "name": "count_1", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "vnum_2": { - "name": "vnum_2", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "count_2": { - "name": "count_2", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "vnum_3": { - "name": "vnum_3", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "count_3": { - "name": "count_3", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "vnum_4": { - "name": "vnum_4", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "count_4": { - "name": "count_4", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "cost": { - "name": "cost", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "src_vnum": { - "name": "src_vnum", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "result_vnum": { - "name": "result_vnum", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "probability": { - "name": "probability", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 100 - } - }, - "indexes": { - "refine_proto_src_vnum": { - "name": "refine_proto_src_vnum", - "columns": [ - { - "expression": "src_vnum", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - }, - "refine_proto_result_vnum": { - "name": "refine_proto_result_vnum", - "columns": [ - { - "expression": "result_vnum", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "player.safebox": { - "name": "safebox", - "schema": "player", - "columns": { - "account_id": { - "name": "account_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "size": { - "name": "size", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "password": { - "name": "password", - "type": "varchar(6)", - "primaryKey": false, - "notNull": true - }, - "gold": { - "name": "gold", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - } - }, - "indexes": {}, - "foreignKeys": { - "safebox_account_id_account_id_fk": { - "name": "safebox_account_id_account_id_fk", - "tableFrom": "safebox", - "tableTo": "account", - "schemaTo": "account", - "columnsFrom": [ - "account_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "web.session": { - "name": "session", - "schema": "web", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true - }, - "user_id": { - "name": "user_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "ip": { - "name": "ip", - "type": "varchar(16)", - "primaryKey": false, - "notNull": true, - "default": "'0.0.0.0'" - }, - "expires_at": { - "name": "expires_at", - "type": "timestamp with time zone", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "session_user_id_account_id_fk": { - "name": "session_user_id_account_id_fk", - "tableFrom": "session", - "tableTo": "account", - "schemaTo": "account", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "player.shop": { - "name": "shop", - "schema": "player", - "columns": { - "vnum": { - "name": "vnum", - "type": "integer", - "primaryKey": true, - "notNull": true - }, - "name": { - "name": "name", - "type": "varchar(32)", - "primaryKey": false, - "notNull": true, - "default": "'NONAME'" - }, - "npc_vnum": { - "name": "npc_vnum", - "type": "integer", - "primaryKey": false, - "notNull": true - } - }, - "indexes": { - "shop_vnum": { - "name": "shop_vnum", - "columns": [ - { - "expression": "vnum", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "player.shop_item": { - "name": "shop_item", - "schema": "player", - "columns": { - "shop_vnum": { - "name": "shop_vnum", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "item_vnum": { - "name": "item_vnum", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "count": { - "name": "count", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 1 - } - }, - "indexes": { - "shop_item_item_vnum": { - "name": "shop_item_item_vnum", - "columns": [ - { - "expression": "item_vnum", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": { - "shop_item_shop_vnum_shop_vnum_fk": { - "name": "shop_item_shop_vnum_shop_vnum_fk", - "tableFrom": "shop_item", - "tableTo": "shop", - "schemaTo": "player", - "columnsFrom": [ - "shop_vnum" - ], - "columnsTo": [ - "vnum" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "shop_vnum_unique": { - "name": "shop_vnum_unique", - "nullsNotDistinct": false, - "columns": [ - "shop_vnum", - "item_vnum", - "count" - ] - } - }, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "log.shout_log": { - "name": "shout_log", - "schema": "log", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "shout_log_id_seq", - "schema": "log", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "channel": { - "name": "channel", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "empire": { - "name": "empire", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "shout": { - "name": "shout", - "type": "varchar(350)", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "default": "now()" - } - }, - "indexes": { - "shout_log_created_at": { - "name": "shout_log_created_at", - "columns": [ - { - "expression": "created_at", - "isExpression": false, - "asc": true, - "nulls": "last" - } - ], - "isUnique": false, - "concurrently": false, - "method": "btree", - "with": {} - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "player.skill_proto": { - "name": "skill_proto", - "schema": "player", - "columns": { - "vnum": { - "name": "vnum", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "type": { - "name": "type", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "level_step": { - "name": "level_step", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "max_level": { - "name": "max_level", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "level_limit": { - "name": "level_limit", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "point_on": { - "name": "point_on", - "type": "varchar(100)", - "primaryKey": false, - "notNull": true, - "default": "'0'" - }, - "point_poly": { - "name": "point_poly", - "type": "varchar(100)", - "primaryKey": false, - "notNull": true - }, - "sp_cost_poly": { - "name": "sp_cost_poly", - "type": "varchar(100)", - "primaryKey": false, - "notNull": true - }, - "duration_poly": { - "name": "duration_poly", - "type": "varchar(100)", - "primaryKey": false, - "notNull": true - }, - "duration_sp_cost_poly": { - "name": "duration_sp_cost_poly", - "type": "varchar(100)", - "primaryKey": false, - "notNull": true - }, - "cooldown_poly": { - "name": "cooldown_poly", - "type": "varchar(100)", - "primaryKey": false, - "notNull": true - }, - "master_bonus_poly": { - "name": "master_bonus_poly", - "type": "varchar(100)", - "primaryKey": false, - "notNull": true - }, - "attack_grade_poly": { - "name": "attack_grade_poly", - "type": "varchar(100)", - "primaryKey": false, - "notNull": true - }, - "set_flag": { - "name": "set_flag", - "type": "skill_proto_set_flag[]", - "primaryKey": false, - "notNull": true, - "default": "'{}'" - }, - "set_flag_bits": { - "name": "set_flag_bits", - "type": "bigint", - "primaryKey": false, - "notNull": false, - "generated": { - "as": "enum_array_to_bitmask(\"player\".\"skill_proto\".\"set_flag\")", - "type": "stored" - } - }, - "set_affect_flag": { - "name": "set_affect_flag", - "type": "skill_proto_set_affect_flag", - "typeSchema": "player", - "primaryKey": false, - "notNull": false - }, - "set_affect_flag_bits": { - "name": "set_affect_flag_bits", - "type": "bigint", - "primaryKey": false, - "notNull": false, - "generated": { - "as": "enum_to_bitmask(\"player\".\"skill_proto\".\"set_affect_flag\")", - "type": "stored" - } - }, - "point_on_2": { - "name": "point_on_2", - "type": "varchar(100)", - "primaryKey": false, - "notNull": true, - "default": "'NONE'" - }, - "point_poly_2": { - "name": "point_poly_2", - "type": "varchar(100)", - "primaryKey": false, - "notNull": true - }, - "duration_poly_2": { - "name": "duration_poly_2", - "type": "varchar(100)", - "primaryKey": false, - "notNull": true - }, - "set_affect_flag_2": { - "name": "set_affect_flag_2", - "type": "skill_proto_set_affect_flag_2", - "typeSchema": "player", - "primaryKey": false, - "notNull": false - }, - "set_affect_flag_2_bits": { - "name": "set_affect_flag_2_bits", - "type": "bigint", - "primaryKey": false, - "notNull": false, - "generated": { - "as": "enum_to_bitmask(\"player\".\"skill_proto\".\"set_affect_flag_2\")", - "type": "stored" - } - }, - "point_on_3": { - "name": "point_on_3", - "type": "varchar(100)", - "primaryKey": false, - "notNull": true, - "default": "'NONE'" - }, - "point_poly_3": { - "name": "point_poly_3", - "type": "varchar(100)", - "primaryKey": false, - "notNull": true - }, - "duration_poly_3": { - "name": "duration_poly_3", - "type": "varchar(100)", - "primaryKey": false, - "notNull": true - }, - "grand_master_add_sp_cost_poly": { - "name": "grand_master_add_sp_cost_poly", - "type": "varchar(100)", - "primaryKey": false, - "notNull": true - }, - "prerequisite_skill_vnum": { - "name": "prerequisite_skill_vnum", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "prerequisite_skill_level": { - "name": "prerequisite_skill_level", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "skill_type": { - "name": "skill_type", - "type": "skill_proto_skill_type", - "typeSchema": "player", - "primaryKey": false, - "notNull": true, - "default": "'NORMAL'" - }, - "skill_type_bits": { - "name": "skill_type_bits", - "type": "bigint", - "primaryKey": false, - "notNull": false, - "generated": { - "as": "enum_to_bitmask(\"player\".\"skill_proto\".\"skill_type\")", - "type": "stored" - } - }, - "max_hit": { - "name": "max_hit", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - }, - "splash_around_damage_adjust_poly": { - "name": "splash_around_damage_adjust_poly", - "type": "varchar(100)", - "primaryKey": false, - "notNull": true, - "default": "'1'" - }, - "target_range": { - "name": "target_range", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 1000 - }, - "splash_range": { - "name": "splash_range", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "common.spam_db": { - "name": "spam_db", - "schema": "common", - "columns": { - "type": { - "name": "type", - "type": "spam_type", - "typeSchema": "common", - "primaryKey": false, - "notNull": true, - "default": "'SPAM'" - }, - "word": { - "name": "word", - "type": "varchar(256)", - "primaryKey": false, - "notNull": true - }, - "score": { - "name": "score", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 10 - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - }, - "log.speed_hack_log": { - "name": "speed_hack_log", - "schema": "log", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "identity": { - "type": "always", - "name": "speed_hack_log_id_seq", - "schema": "log", - "increment": "1", - "startWith": "1", - "minValue": "1", - "maxValue": "2147483647", - "cache": "1", - "cycle": false - } - }, - "player_id": { - "name": "player_id", - "type": "integer", - "primaryKey": false, - "notNull": true - }, - "x": { - "name": "x", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "y": { - "name": "y", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "hack_count": { - "name": "hack_count", - "type": "integer", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": { - "speed_hack_log_player_id_player_id_fk": { - "name": "speed_hack_log_player_id_player_id_fk", - "tableFrom": "speed_hack_log", - "tableTo": "player", - "schemaTo": "player", - "columnsFrom": [ - "player_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {}, - "policies": {}, - "checkConstraints": {}, - "isRLSEnabled": false - } - }, - "enums": { - "common.gm_authority": { - "name": "gm_authority", - "schema": "common", - "values": [ - "IMPLEMENTOR", - "HIGH_WIZARD", - "GOD", - "LOW_WIZARD", - "PLAYER" - ] - }, - "log.gold_log_how": { - "name": "gold_log_how", - "schema": "log", - "values": [ - "BUY", - "SELL", - "SHOP_SELL", - "SHOP_BUY", - "EXCHANGE_TAKE", - "EXCHANGE_GIVE", - "QUEST" - ] - }, - "player.guild_grade_auth": { - "name": "guild_grade_auth", - "schema": "player", - "values": [ - "ADD_MEMBER", - "REMOVE_MEMEBER", - "NOTICE", - "USE_SKILL" - ] - }, - "player.item_proto_immune_flag": { - "name": "item_proto_immune_flag", - "schema": "player", - "values": [ - "PARA", - "CURSE", - "STUN", - "SLEEP", - "SLOW", - "POISON", - "TERROR" - ] - }, - "player.item_attr_apply": { - "name": "item_attr_apply", - "schema": "player", - "values": [ - "MAX_HP", - "MAX_SP", - "CON", - "INT", - "STR", - "DEX", - "ATT_SPEED", - "MOV_SPEED", - "CAST_SPEED", - "HP_REGEN", - "SP_REGEN", - "POISON_PCT", - "STUN_PCT", - "SLOW_PCT", - "CRITICAL_PCT", - "PENETRATE_PCT", - "ATTBONUS_HUMAN", - "ATTBONUS_ANIMAL", - "ATTBONUS_ORC", - "ATTBONUS_MILGYO", - "ATTBONUS_UNDEAD", - "ATTBONUS_DEVIL", - "STEAL_HP", - "STEAL_SP", - "MANA_BURN_PCT", - "DAMAGE_SP_RECOVER", - "BLOCK", - "DODGE", - "RESIST_SWORD", - "RESIST_TWOHAND", - "RESIST_DAGGER", - "RESIST_BELL", - "RESIST_FAN", - "RESIST_BOW", - "RESIST_FIRE", - "RESIST_ELEC", - "RESIST_MAGIC", - "RESIST_WIND", - "REFLECT_MELEE", - "REFLECT_CURSE", - "POISON_REDUCE", - "KILL_SP_RECOVER", - "EXP_DOUBLE_BONUS", - "GOLD_DOUBLE_BONUS", - "ITEM_DROP_BONUS", - "POTION_BONUS", - "KILL_HP_RECOVER", - "IMMUNE_STUN", - "IMMUNE_SLOW", - "IMMUNE_FALL", - "SKILL", - "BOW_DISTANCE", - "ATT_GRADE_BONUS", - "DEF_GRADE_BONUS", - "MAGIC_ATT_GRADE", - "MAGIC_DEF_GRADE", - "CURSE_PCT", - "MAX_STAMINA", - "ATTBONUS_WARRIOR", - "ATTBONUS_ASSASSIN", - "ATTBONUS_SURA", - "ATTBONUS_SHAMAN", - "ATTBONUS_MONSTER", - "MALL_ATTBONUS", - "MALL_DEFBONUS", - "MALL_EXPBONUS", - "MALL_ITEMBONUS", - "MALL_GOLDBONUS", - "MAX_HP_PCT", - "MAX_SP_PCT", - "SKILL_DAMAGE_BONUS", - "NORMAL_HIT_DAMAGE_BONUS", - "SKILL_DEFEND_BONUS", - "NORMAL_HIT_DEFEND_BONUS", - "PC_BANG_EXP_BONUS", - "PC_BANG_DROP_BONUS", - "EXTRACT_HP_PCT", - "RESIST_WARRIOR", - "RESIST_ASSASSIN", - "RESIST_SURA", - "RESIST_SHAMAN", - "ENERGY", - "DEF_GRADE", - "COSTUME_ATTR_BONUS", - "MAGIC_ATTBONUS_PER", - "MELEE_MAGIC_ATTBONUS_PER", - "RESIST_ICE", - "RESIST_EARTH", - "RESIST_DARK", - "ANTI_CRITICAL_PCT", - "ANTI_PENETRATE_PCT" - ] - }, - "player.item_attr_rare_apply": { - "name": "item_attr_rare_apply", - "schema": "player", - "values": [ - "MAX_HP", - "MAX_SP", - "CON", - "INT", - "STR", - "DEX", - "ATT_SPEED", - "MOV_SPEED", - "CAST_SPEED", - "HP_REGEN", - "SP_REGEN", - "POISON_PCT", - "STUN_PCT", - "SLOW_PCT", - "CRITICAL_PCT", - "PENETRATE_PCT", - "ATTBONUS_HUMAN", - "ATTBONUS_ANIMAL", - "ATTBONUS_ORC", - "ATTBONUS_MILGYO", - "ATTBONUS_UNDEAD", - "ATTBONUS_DEVIL", - "STEAL_HP", - "STEAL_SP", - "MANA_BURN_PCT", - "DAMAGE_SP_RECOVER", - "BLOCK", - "DODGE", - "RESIST_SWORD", - "RESIST_TWOHAND", - "RESIST_DAGGER", - "RESIST_BELL", - "RESIST_FAN", - "RESIST_BOW", - "RESIST_FIRE", - "RESIST_ELEC", - "RESIST_MAGIC", - "RESIST_WIND", - "REFLECT_MELEE", - "REFLECT_CURSE", - "POISON_REDUCE", - "KILL_SP_RECOVER", - "EXP_DOUBLE_BONUS", - "GOLD_DOUBLE_BONUS", - "ITEM_DROP_BONUS", - "POTION_BONUS", - "KILL_HP_RECOVER", - "IMMUNE_STUN", - "IMMUNE_SLOW", - "IMMUNE_FALL", - "SKILL", - "BOW_DISTANCE", - "ATT_GRADE_BONUS", - "DEF_GRADE_BONUS", - "MAGIC_ATT_GRADE", - "MAGIC_DEF_GRADE", - "CURSE_PCT", - "MAX_STAMINA", - "ATT_BONUS_TO_WARRIOR", - "ATT_BONUS_TO_ASSASSIN", - "ATT_BONUS_TO_SURA", - "ATT_BONUS_TO_SHAMAN", - "ATT_BONUS_TO_MONSTER", - "NORMAL_HIT_DEFEND_BONUS", - "SKILL_DEFEND_BONUS", - "NOUSE2", - "NOUSE3", - "NOUSE4", - "NOUSE5", - "NOUSE6", - "NOUSE7", - "NOUSE8", - "NOUSE9", - "NOUSE10", - "NOUSE11", - "NOUSE12", - "NOUSE13", - "NOUSE14", - "RESIST_WARRIOR", - "RESIST_ASSASSIN", - "RESIST_SURA", - "RESIST_SHAMAN" - ] - }, - "player.item_window": { - "name": "item_window", - "schema": "player", - "values": [ - "INVENTORY", - "EQUIPMENT", - "SAFEBOX", - "MALL", - "DRAGON_SOUL_INVENTORY", - "BELT_INVENTORY" - ] - }, - "log.log_type": { - "name": "log_type", - "schema": "log", - "values": [ - "ITEM", - "CHARACTER" - ] - }, - "log.login_log_type": { - "name": "login_log_type", - "schema": "log", - "values": [ - "LOGIN", - "LOGOUT" - ] - }, - "player.mob_ai_flag": { - "name": "mob_ai_flag", - "schema": "player", - "values": [ - "AGGR", - "NOMOVE", - "COWARD", - "NOATTSHINSU", - "NOATTCHUNJO", - "NOATTJINNO", - "ATTMOB", - "BERSERK", - "STONESKIN", - "GODSPEED", - "DEATHBLOW", - "REVIVE" - ] - }, - "player.mob_set_immune_flag": { - "name": "mob_set_immune_flag", - "schema": "player", - "values": [ - "STUN", - "SLOW", - "FALL", - "CURSE", - "POISON", - "TERROR" - ] - }, - "player.mob_set_race_flag": { - "name": "mob_set_race_flag", - "schema": "player", - "values": [ - "ANIMAL", - "UNDEAD", - "DEVIL", - "HUMAN", - "ORC", - "MILGYO", - "INSECT", - "FIRE", - "ICE", - "DESERT", - "TREE", - "ATT_ELEC", - "ATT_FIRE", - "ATT_ICE", - "ATT_WIND", - "ATT_EARTH", - "ATT_DARK" - ] - }, - "player.mob_size": { - "name": "mob_size", - "schema": "player", - "values": [ - "SMALL", - "MEDIUM", - "BIG" - ] - }, - "log.money_log_type": { - "name": "money_log_type", - "schema": "log", - "values": [ - "MONSTER", - "SHOP", - "REFINE", - "QUEST", - "GUILD", - "MISC", - "KILL", - "DROP" - ] - }, - "log.refine_log_set_type": { - "name": "refine_log_set_type", - "schema": "log", - "values": [ - "SOCKET", - "POWER", - "ROD", - "GUILD", - "SCROLL", - "HYUNIRON", - "GOD_SCROLL", - "MUSIN_SCROLL" - ] - }, - "log.reward_type": { - "name": "reward_type", - "schema": "log", - "values": [ - "EXP", - "ITEM" - ] - }, - "player.skill_proto_set_affect_flag": { - "name": "skill_proto_set_affect_flag", - "schema": "player", - "values": [ - "YMIR", - "INVISIBILITY", - "SPAWN", - "POISON", - "SLOW", - "STUN", - "DUNGEON_READY", - "FORCE_VISIBLE", - "BUILDING_CONSTRUCTION_SMALL", - "BUILDING_CONSTRUCTION_LARGE", - "BUILDING_UPGRADE", - "MOV_SPEED_POTION", - "ATT_SPEED_POTION", - "FISH_MIDE", - "JEONGWIHON", - "GEOMGYEONG", - "CHEONGEUN", - "GYEONGGONG", - "EUNHYUNG", - "GWIGUM", - "TERROR", - "JUMAGAP", - "HOSIN", - "BOHO", - "KWAESOK", - "MANASHIELD", - "MUYEONG", - "REVIVE_INVISIBLE", - "FIRE", - "GICHEON", - "JEUNGRYEOK" - ] - }, - "player.skill_proto_set_affect_flag_2": { - "name": "skill_proto_set_affect_flag_2", - "schema": "player", - "values": [ - "YMIR", - "INVISIBILITY", - "SPAWN", - "POISON", - "SLOW", - "STUN", - "DUNGEON_READY", - "FORCE_VISIBLE", - "BUILDING_CONSTRUCTION_SMALL", - "BUILDING_CONSTRUCTION_LARGE", - "BUILDING_UPGRADE", - "MOV_SPEED_POTION", - "ATT_SPEED_POTION", - "FISH_MIDE", - "JEONGWIHON", - "GEOMGYEONG", - "CHEONGEUN", - "GYEONGGONG", - "EUNHYUNG", - "GWIGUM", - "TERROR", - "JUMAGAP", - "HOSIN", - "BOHO", - "KWAESOK", - "MANASHIELD" - ] - }, - "player.skill_proto_set_flag": { - "name": "skill_proto_set_flag", - "schema": "player", - "values": [ - "ATTACK", - "USE_MELEE_DAMAGE", - "COMPUTE_ATTGRADE", - "SELFONLY", - "USE_MAGIC_DAMAGE", - "USE_HP_AS_COST", - "COMPUTE_MAGIC_DAMAGE", - "SPLASH", - "GIVE_PENALTY", - "USE_ARROW_DAMAGE", - "PENETRATE", - "IGNORE_TARGET_RATING", - "ATTACK_SLOW", - "ATTACK_STUN", - "HP_ABSORB", - "SP_ABSORB", - "ATTACK_FIRE_CONT", - "REMOVE_BAD_AFFECT", - "REMOVE_GOOD_AFFECT", - "CRUSH", - "ATTACK_POISON", - "TOGGLE", - "DISABLE_BY_POINT_UP", - "CRUSH_LONG" - ] - }, - "player.skill_proto_skill_type": { - "name": "skill_proto_skill_type", - "schema": "player", - "values": [ - "NORMAL", - "MELEE", - "RANGE", - "MAGIC" - ] - }, - "common.spam_type": { - "name": "spam_type", - "schema": "common", - "values": [ - "GOOD", - "SPAM" - ] - } - }, - "schemas": { - "account": "account", - "common": "common", - "log": "log", - "player": "player", - "web": "web" - }, - "sequences": {}, - "roles": {}, - "policies": {}, - "views": {}, - "_meta": { - "columns": {}, - "schemas": {}, - "tables": {} - } -} \ No newline at end of file diff --git a/drizzle/meta/_journal.json b/drizzle/meta/_journal.json index 3a8c50c..d4113b3 100644 --- a/drizzle/meta/_journal.json +++ b/drizzle/meta/_journal.json @@ -12,30 +12,16 @@ { "idx": 1, "version": "7", - "when": 1748556898510, + "when": 1749163873813, "tag": "0001_init", "breakpoints": true }, { "idx": 2, "version": "7", - "when": 1748557058507, + "when": 1749163896680, "tag": "0002_seed", "breakpoints": true - }, - { - "idx": 3, - "version": "7", - "when": 1748942645302, - "tag": "0003_worried_hex", - "breakpoints": true - }, - { - "idx": 4, - "version": "7", - "when": 1748943047244, - "tag": "0004_mysterious_wallop", - "breakpoints": true } ] } \ No newline at end of file diff --git a/messages/de.json b/messages/de.json new file mode 100644 index 0000000..0b65f9d --- /dev/null +++ b/messages/de.json @@ -0,0 +1,125 @@ +{ + "$schema": "https://inlang.com/schema/inlang-message-format", + "example_message": "Hallo {username}", + "navigation": { + "home": "Heim", + "rankings": "Ranglisten", + "player-rankings": "Spieler-Ranglisten", + "guild-rankings": "Gildenranglisten", + "download": "Herunterladen", + "support": "Unterstützung", + "sign-in": "anmelden", + "toggle-language": "Sprache ändern", + "my-account": "Mein Konto", + "profile": "Profil", + "sign-out": "Abmelden" + }, + "languages": { + "title": "Sprachen", + "en": "Englisch", + "pt": "Portugiesisch", + "de": "Deutsch", + "ro": "rumänisch" + }, + "errors": { + "unauthorized": "Sie haben keine Berechtigung, diese Ressource anzuzeigen", + "unprocessable-entity": "Wir konnten Ihre Anfrage nicht bestätigen", + "server-error": "Ups... Wir hatten ein Problem auf unserer Seite" + }, + "auth": { + "validation": { + "invalid-credentials": "Ungültige Anmeldeinformationen" + } + }, + "validation": { + "invalid-credentials": "Ungültige Anmeldeinformationen" + }, + "change-email": { + "mutation": { + "pending": "E-Mail ändern...", + "success": "E-Mail erfolgreich geändert!" + }, + "form": { + "password": "Aktuelles Passwort", + "email": "Neue E-Mail", + "submit": "E-Mail ändern" + } + }, + "change-password": { + "mutation": { + "pending": "Passwort ändern...", + "success": "Passwort erfolgreich geändert!" + }, + "form": { + "password": "Aktuelles Passwort", + "newPassword": "Neues Passwort", + "newPasswordConfirm": "Neues Passwort bestätigen", + "submit": "Kennwort ändern" + } + }, + "sign-in": { + "modal": { + "title": "anmelden", + "description": "Schön, Sie wiederzusehen! Melden Sie sich an." + }, + "mutation": { + "pending": "Anmeldung...", + "success": "Erfolgreich angemeldet, jetzt umleiten" + }, + "form": { + "password": "Passwort", + "newPassword": "Neues Passwort", + "newPasswordConfirm": "Neues Passwort bestätigen", + "submit": "anmelden", + "login": "Benutzername" + }, + "links": { + "forgot-password": "Passwort vergessen?", + "register": "Sie haben noch kein Konto?", + "sign-up": "Sie haben noch kein Konto?" + } + }, + "sign-up": { + "modal": { + "title": "anmelden", + "description": "Schön, Sie wiederzusehen! Melden Sie sich an." + }, + "mutation": { + "pending": "Anmeldung...", + "success": "Erfolgreich angemeldet, jetzt umleiten" + }, + "form": { + "password": "Passwort", + "newPassword": "Neues Passwort", + "newPasswordConfirm": "Neues Passwort bestätigen", + "submit": "Melden Sie sich an", + "login": "Benutzername", + "email": "E-Mail", + "socialId": "Zeichenlöschcode" + }, + "links": { + "sign-in": "Hast du schon ein Konto?" + } + }, + "forgot-password": { + "mutation": { + "pending": "E-Mail zum Zurücksetzen des Passworts wird gesendet …", + "success": "E-Mail zum Zurücksetzen des Passworts erfolgreich gesendet" + }, + "form": { + "email": "E-Mail", + "submit": "Wiederhersstellung des Passwortes" + } + }, + "reset-password": { + "mutation": { + "pending": "Passwort ändern...", + "success": "Passwort erfolgreich geändert" + }, + "form": { + "email": "E-Mail", + "password": "Neues Passwort", + "submit": "Passwort zurücksetzen" + } + } +} \ No newline at end of file diff --git a/messages/en.json b/messages/en.json new file mode 100644 index 0000000..f51de76 --- /dev/null +++ b/messages/en.json @@ -0,0 +1,125 @@ +{ + "$schema": "https://inlang.com/schema/inlang-message-format", + "example_message": "Hello {username}", + "navigation": { + "home": "Home", + "rankings": "Rankings", + "player-rankings": "Player Rankings", + "guild-rankings": "Guild Rankings", + "download": "Download", + "support": "Support", + "sign-in": "Sign in", + "toggle-language": "Change language", + "my-account": "My account", + "profile": "Profile", + "sign-out": "Sign out" + }, + "languages": { + "title": "Languages", + "en": "English", + "pt": "Português", + "de": "German", + "ro": "Romanian" + }, + "errors": { + "unauthorized": "You do not have authorization to view this resource", + "unprocessable-entity": "We could not validate your request", + "server-error": "Ooops... We had an issue on our side" + }, + "auth": { + "validation": { + "invalid-credentials": "Invalid credentials" + } + }, + "validation": { + "invalid-credentials": "Invalid credentials" + }, + "change-email": { + "mutation": { + "pending": "Changing email...", + "success": "Successfully changed email!" + }, + "form": { + "password": "Current password", + "email": "New email", + "submit": "Change email" + } + }, + "change-password": { + "mutation": { + "pending": "Changing password...", + "success": "Successfully changed password!" + }, + "form": { + "password": "Current password", + "newPassword": "New password", + "newPasswordConfirm": "Confirm new password", + "submit": "Change password" + } + }, + "sign-in": { + "modal": { + "title": "Sign in", + "description": "Good to see you again! Let's get you signed in." + }, + "mutation": { + "pending": "Signing in...", + "success": "Signed in successfully, redirecting now" + }, + "form": { + "password": "Password", + "newPassword": "New password", + "newPasswordConfirm": "Confirm new password", + "submit": "Sign in", + "login": "Username" + }, + "links": { + "forgot-password": "Forgot your password?", + "register": "Don't have an account yet?", + "sign-up": "Don't have an account yet?" + } + }, + "sign-up": { + "modal": { + "title": "Sign in", + "description": "Good to see you again! Let's get you signed in." + }, + "mutation": { + "pending": "Signing up...", + "success": "Signed up successfully, redirecting now" + }, + "form": { + "password": "Password", + "newPassword": "New password", + "newPasswordConfirm": "Confirm new password", + "submit": "Sign up", + "login": "Username", + "email": "Email", + "socialId": "Character deletion code" + }, + "links": { + "sign-in": "Already have an account?" + } + }, + "forgot-password": { + "mutation": { + "pending": "Sending password reset email...", + "success": "Password reset email sent successfully" + }, + "form": { + "email": "Email", + "submit": "Recover password" + } + }, + "reset-password": { + "mutation": { + "pending": "Changing password...", + "success": "Password changed successfully" + }, + "form": { + "email": "Email", + "password": "New password", + "submit": "Reset password" + } + } +} diff --git a/messages/pt.json b/messages/pt.json new file mode 100644 index 0000000..184dc3e --- /dev/null +++ b/messages/pt.json @@ -0,0 +1,125 @@ +{ + "$schema": "https://inlang.com/schema/inlang-message-format", + "example_message": "Olá {username}", + "navigation": { + "home": "Inicio", + "rankings": "Rankings", + "player-rankings": "Ranking de Jogadores", + "guild-rankings": "Ranking de Guilds", + "download": "Download", + "support": "Suporte", + "sign-in": "Login", + "toggle-language": "Alterar idioma", + "my-account": "Minha conta", + "profile": "Perfil", + "sign-out": "Sair" + }, + "languages": { + "en": "English", + "pt": "Português", + "title": "Idiomas", + "de": "Alemão", + "ro": "romeno" + }, + "errors": { + "unauthorized": "Você não tem autorização para visualizar este recurso", + "unprocessable-entity": "Não foi possível validar sua a solicitação", + "server-error": "Ops... Tivemos um problema do nosso lado" + }, + "auth": { + "validation": { + "invalid-credentials": "Credenciais inválidas" + } + }, + "validation": { + "invalid-credentials": "Credenciais inválidas" + }, + "change-email": { + "mutation": { + "pending": "Alterando e-mail...", + "success": "E-mail alterado com sucesso!" + }, + "form": { + "password": "Senha atual", + "email": "Novo e-mail", + "submit": "Alterar e-mail" + } + }, + "change-password": { + "mutation": { + "pending": "Alterando senha...", + "success": "Senha alterada com sucesso!" + }, + "form": { + "password": "Senha atual", + "newPassword": "Nova Senha", + "newPasswordConfirm": "Confirmar nova senha", + "submit": "Alterar a senha" + } + }, + "sign-in": { + "modal": { + "title": "Entrar", + "description": "Que bom ver você de novo! Vamos fazer seu login." + }, + "mutation": { + "pending": "Fazendo login...", + "success": "Conectado com sucesso, redirecionando agora" + }, + "form": { + "password": "Senha", + "newPassword": "Nova Senha", + "newPasswordConfirm": "Confirmar nova senha", + "submit": "Entrar", + "login": "Nome de usuário" + }, + "links": { + "forgot-password": "Esqueceu sua senha?", + "register": "Ainda não tem uma conta?", + "sign-up": "Ainda não tem uma conta?" + } + }, + "sign-up": { + "modal": { + "title": "Entrar", + "description": "Que bom ver você de novo! Vamos fazer seu login." + }, + "mutation": { + "pending": "Inscrevendo-se...", + "success": "Inscrito com sucesso, redirecionando agora" + }, + "form": { + "password": "Senha", + "newPassword": "Nova Senha", + "newPasswordConfirm": "Confirmar nova senha", + "submit": "Inscrever-se", + "login": "Nome de usuário", + "email": "E-mail", + "socialId": "Código de exclusão de caractere" + }, + "links": { + "sign-in": "Já tem uma conta?" + } + }, + "forgot-password": { + "mutation": { + "pending": "Enviando e-mail de redefinição de senha...", + "success": "E-mail de redefinição de senha enviado com sucesso" + }, + "form": { + "email": "E-mail", + "submit": "Recuperar senha" + } + }, + "reset-password": { + "mutation": { + "pending": "Alterando senha...", + "success": "Senha alterada com sucesso" + }, + "form": { + "email": "E-mail", + "password": "Nova Senha", + "submit": "Redefinir senha" + } + } +} \ No newline at end of file diff --git a/messages/ro.json b/messages/ro.json new file mode 100644 index 0000000..4da373d --- /dev/null +++ b/messages/ro.json @@ -0,0 +1,125 @@ +{ + "$schema": "https://inlang.com/schema/inlang-message-format", + "example_message": "Salut {username}", + "navigation": { + "home": "Acasă", + "rankings": "Clasamente", + "player-rankings": "Clasamentele jucătorilor", + "guild-rankings": "Clasamentele breslelor", + "download": "Descărcare", + "support": "Sprijin", + "sign-in": "Conectare", + "toggle-language": "Schimbați limba", + "my-account": "Contul meu", + "profile": "Profil", + "sign-out": "Sign out" + }, + "languages": { + "title": "Limbi", + "en": "Engleză", + "pt": "Portugheză", + "de": "german", + "ro": "Română" + }, + "errors": { + "unauthorized": "Nu aveți autorizație pentru a vizualiza această resursă", + "unprocessable-entity": "Nu am putut valida solicitarea dvs.", + "server-error": "Oops... Am avut o problemă de partea noastră." + }, + "auth": { + "validation": { + "invalid-credentials": "Acreditări nevalide" + } + }, + "validation": { + "invalid-credentials": "Acreditări nevalide" + }, + "change-email": { + "mutation": { + "pending": "Schimbarea adresei de e-mail...", + "success": "Adresa de e-mail a fost schimbată cu succes!" + }, + "form": { + "password": "Parola actuală", + "email": "E-mail nou", + "submit": "Schimbați adresa de e-mail" + } + }, + "change-password": { + "mutation": { + "pending": "Schimbarea parolei...", + "success": "Parola a fost schimbată cu succes!" + }, + "form": { + "password": "Parola actuală", + "newPassword": "Parolă Nouă", + "newPasswordConfirm": "Confirmați noua parolă", + "submit": "Schimbaţi parola" + } + }, + "sign-in": { + "modal": { + "title": "Conectare", + "description": "Mă bucur să te revăd! Hai să te conectăm." + }, + "mutation": { + "pending": "Conectare...", + "success": "Conectat cu succes, redirecționez acum" + }, + "form": { + "password": "Parolă", + "newPassword": "Parolă Nouă", + "newPasswordConfirm": "Confirmați noua parolă", + "submit": "Conectare", + "login": "Nume de utilizator" + }, + "links": { + "forgot-password": "Ați uitat parola?", + "register": "Nu ai încă un cont?", + "sign-up": "Nu ai încă un cont?" + } + }, + "sign-up": { + "modal": { + "title": "Conectare", + "description": "Mă bucur să te revăd! Hai să te conectăm." + }, + "mutation": { + "pending": "Înscriere...", + "success": "Înregistrare reușită, redirecționez acum" + }, + "form": { + "password": "Parolă", + "newPassword": "Parolă Nouă", + "newPasswordConfirm": "Confirmați noua parolă", + "submit": "Înscrie-te", + "login": "Nume de utilizator", + "email": "E-mail", + "socialId": "Cod de ștergere a caracterelor" + }, + "links": { + "sign-in": "Ai deja un cont?" + } + }, + "forgot-password": { + "mutation": { + "pending": "Se trimite e-mailul de resetare a parolei...", + "success": "E-mailul de resetare a parolei a fost trimis cu succes" + }, + "form": { + "email": "E-mail", + "submit": "Recuperează parola" + } + }, + "reset-password": { + "mutation": { + "pending": "Schimbarea parolei...", + "success": "Parola a fost schimbată cu succes" + }, + "form": { + "email": "E-mail", + "password": "Parolă Nouă", + "submit": "Resetare parolă" + } + } +} \ No newline at end of file diff --git a/package.json b/package.json index c614216..6547d44 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,8 @@ "lint": "biome lint", "email:dev": "email dev --dir ./src/emails --port 3030", "db:generate": "drizzle-kit generate", - "i18n:translate": "inlang machine translate --project ./project.inlang", + "db:push": "bunx --bun drizzle-kit push", + "i18n:translate": "inlang machine translate --project project.inlang", "i18n:check": "inlang validate --project ./project.inlang" }, "dependencies": { @@ -45,11 +46,11 @@ "@radix-ui/react-tooltip": "^1.2.7", "@react-email/components": "0.0.41", "@tailwindcss/postcss": "^4.1.8", - "@tanstack/react-query": "^5.80.3", - "@tanstack/react-query-devtools": "^5.80.3", - "@tanstack/react-router": "^1.120.15", - "@tanstack/react-router-devtools": "^1.120.15", - "@tanstack/react-start": "^1.120.15", + "@tanstack/react-query": "^5.80.6", + "@tanstack/react-query-devtools": "^5.80.6", + "@tanstack/react-router": "^1.120.16", + "@tanstack/react-router-devtools": "^1.120.16", + "@tanstack/react-start": "^1.120.16", "@tanstack/react-table": "^8.21.3", "class-variance-authority": "^0.7.1", "clsx": "^2.1.1", @@ -78,7 +79,7 @@ "devDependencies": { "@biomejs/biome": "1.9.4", "@inlang/cli": "^3.0.11", - "@inlang/paraglide-js": "^2.0.13", + "@inlang/paraglide-js": "2.0.13", "@tanstack/eslint-plugin-query": "^5.78.0", "@types/bun": "^1.2.15", "@types/nodemailer": "^6.4.17", diff --git a/project.inlang/project_id b/project.inlang/project_id index bec0a0b..15cd0e9 100644 --- a/project.inlang/project_id +++ b/project.inlang/project_id @@ -1 +1 @@ -O51G4WNvcv5kcok0DT \ No newline at end of file +HVTPHNyQuA8SllpEYW \ No newline at end of file diff --git a/project.inlang/settings.json b/project.inlang/settings.json index 4026a89..627ee67 100644 --- a/project.inlang/settings.json +++ b/project.inlang/settings.json @@ -3,13 +3,15 @@ "baseLocale": "en", "locales": [ "en", - "pt" + "pt", + "de", + "ro" ], "modules": [ "https://cdn.jsdelivr.net/npm/@inlang/plugin-message-format@4/dist/index.js", "https://cdn.jsdelivr.net/npm/@inlang/plugin-m-function-matcher@2/dist/index.js" ], "plugin.inlang.messageFormat": { - "pathPattern": "./src/translations/{locale}.json" + "pathPattern": "./messages/{locale}.json" } } \ No newline at end of file diff --git a/src/components/login/form.tsx b/src/components/login/form.tsx index 224543b..736e651 100644 --- a/src/components/login/form.tsx +++ b/src/components/login/form.tsx @@ -10,6 +10,7 @@ import { import { Input } from '@/components/ui/input'; import { login, LoginSchema } from '@/lib/actions/auth'; import { isValidationError } from '@/lib/utils/http'; +import { m } from '@/paraglide/messages'; import { standardSchemaResolver } from '@hookform/resolvers/standard-schema'; import { useMutation } from '@tanstack/react-query'; import { Link } from '@tanstack/react-router'; @@ -31,11 +32,11 @@ export const LoginForm = () => { await serverFn({ data: payload }), onMutate: () => { return { - toastId: toast.loading('Signing in...'), + toastId: toast.loading(m['sign-in.mutation.pending']()), }; }, onSuccess: (_data, _variables, context) => { - toast.success('Signed in successfully, redirecting now', { + toast.success(m['sign-in.mutation.success'](), { id: context.toastId, }); }, @@ -65,9 +66,13 @@ export const LoginForm = () => { name="login" render={({ field }) => ( - Username + {m['sign-in.form.login']()} - + @@ -78,9 +83,13 @@ export const LoginForm = () => { name="password" render={({ field }) => ( - Password + {m['sign-in.form.password']()} - + @@ -88,17 +97,17 @@ export const LoginForm = () => { />
- Forgot your password? + {m['sign-in.links.forgot-password']()} - - Don't have an account yet? + + {m['sign-in.links.sign-up']()}
diff --git a/src/db/relations.ts b/src/db/relations.ts index 69f14d1..4eccfd9 100644 --- a/src/db/relations.ts +++ b/src/db/relations.ts @@ -11,28 +11,42 @@ const relations = defineRelations(schema, (t) => ({ sessions: t.many.session({ from: t.account.id, to: t.session.userId, - alias: 'account_sessions' + alias: 'account_sessions', }), passwordResetSessions: t.many.passwordResetSession({ from: t.account.id, to: t.passwordResetSession.userId, - alias: 'account_password_reset_sessions' - }) + alias: 'account_password_reset_sessions', + }), }, session: { user: t.one.account({ from: t.session.userId, to: t.account.id, - alias: 'session_account' - }) + alias: 'session_account', + }), }, passwordResetSession: { user: t.one.account({ from: t.passwordResetSession.userId, to: t.account.id, - alias: 'password_reset_session_account' - }) - } + alias: 'password_reset_session_account', + }), + }, + ticket: { + comments: t.many.ticketComment({ + from: t.ticket.id, + to: t.ticketComment.ticketId, + alias: 'ticket_comments', + }), + }, + ticketComments: { + attachments: t.many.ticketAttachment({ + from: t.ticketComment.id, + to: t.ticketAttachment.ticketCommentId, + alias: 'ticket_comment_attachments', + }), + }, })); export default relations; diff --git a/src/db/schema/log.ts b/src/db/schema/log.ts index 7286744..05bff59 100644 --- a/src/db/schema/log.ts +++ b/src/db/schema/log.ts @@ -118,7 +118,9 @@ export const goldLog = logSchema.table( export const hackLog = logSchema.table('hack_log', { id: integer().primaryKey().generatedAlwaysAsIdentity(), - login: char({ length: 16 }).notNull(), + login: varchar({ length: 30 }) + .notNull() + .references(() => account.login), name: char({ length: 24 }).notNull(), ip: char({ length: 15 }).notNull(), server: char({ length: 100 }).notNull(), diff --git a/src/db/schema/player.ts b/src/db/schema/player.ts index 8f6d907..cddad81 100644 --- a/src/db/schema/player.ts +++ b/src/db/schema/player.ts @@ -125,7 +125,9 @@ export const guildMember = playerSchema.table( ); export const guildWarBet = playerSchema.table('guild_war_bet', { - login: varchar({ length: 24 }).notNull(), // TODO Figure this out + login: varchar({ length: 30 }) + .notNull() + .references(() => account.login), gold: integer().default(0).notNull(), guildId: integer('guild_id') .notNull() @@ -436,7 +438,9 @@ export const itemAward = playerSchema.table( playerId: integer('player_id') .notNull() .references(() => player.id), - login: varchar({ length: 30 }).notNull(), // TODO Upgrade this to point directly + login: varchar({ length: 30 }) + .notNull() + .references(() => account.login), // Should point at item_proto vnum: integer().default(0).notNull(), count: integer().default(0).notNull(), diff --git a/src/db/schema/web.ts b/src/db/schema/web.ts index 16ff6aa..6174b87 100644 --- a/src/db/schema/web.ts +++ b/src/db/schema/web.ts @@ -47,17 +47,6 @@ export const ticketCategory = webSchema.table('ticket_category', { publishedAt: timestamp('published_at'), }); -const AttachmentType = ['image', 'video', 'document', 'other']; - -interface AttachmentInterface { - preview?: string; - size: number; - name: string; - type: (typeof AttachmentType)[number]; - url: string; -} - -// TODO Fully figure out the attachment setup export const ticket = webSchema.table('ticket', { id: integer().primaryKey().generatedByDefaultAsIdentity(), userId: integer() @@ -67,8 +56,6 @@ export const ticket = webSchema.table('ticket', { .notNull() .references(() => ticketCategory.id), title: text().notNull(), - details: text().notNull(), - attachments: jsonb().notNull().default([]).$type(), createdAt: timestamp('created_at').defaultNow().notNull(), updatedAt: timestamp('updated_at'), closedAt: timestamp('closed_at'), @@ -83,7 +70,25 @@ export const ticketComment = webSchema.table('ticket_comment', { .notNull() .references(() => ticket.id), comment: text().notNull(), - attachments: jsonb().notNull().default([]).$type(), createdAt: timestamp('created_at').defaultNow().notNull(), updatedAt: timestamp('updated_at'), }); + +export const ticketAttachmentType = webSchema.enum('ticket_attachment_type', [ + 'image', + 'video', + 'document', + 'other', +]); + +export const ticketAttachment = webSchema.table('ticket_attachment', { + id: integer().primaryKey().generatedByDefaultAsIdentity(), + ticketCommentId: integer('ticket_comment_id') + .notNull() + .references(() => ticketComment.id), + preview: jsonb(), + type: ticketAttachmentType().notNull().default('other'), + size: integer().notNull(), + name: text().notNull(), + url: text().notNull(), +}); diff --git a/src/lib/actions/auth.ts b/src/lib/actions/auth.ts index 26b9ba5..f1dc1a8 100644 --- a/src/lib/actions/auth.ts +++ b/src/lib/actions/auth.ts @@ -19,6 +19,7 @@ import { unauthorizedError, validationError, } from '../utils/http'; +import { m } from '@/paraglide/messages'; export const fetchUser = createServerFn({ method: 'GET', @@ -110,13 +111,13 @@ export const login = createServerFn({ if (!user) { throw validationError({ - login: ['Invalid credentials'], + login: [m['validation.invalid-credentials']()], }); } if (!(await password.verify(data.password, user.password, 'argon2id'))) { throw validationError({ - login: ['Invalid credentials'], + login: [m['validation.invalid-credentials']()], }); } diff --git a/src/lib/actions/password.ts b/src/lib/actions/password.ts index 8fe9604..4189ebd 100644 --- a/src/lib/actions/password.ts +++ b/src/lib/actions/password.ts @@ -18,6 +18,7 @@ import { serverError, validationError, } from '../utils/http'; +import { m } from '@/paraglide/messages'; export const ForgotPasswordSchema = createInsertSchema(passwordResetSession) .pick({ @@ -45,7 +46,7 @@ export const forgotPassword = createServerFn({ if (!user) { throw validationError({ - email: ['Invalid email'], + email: [m['validation.invalid-credentials']()], }); } diff --git a/src/lib/actions/profile.ts b/src/lib/actions/profile.ts index 9e0f1b4..ac8974f 100644 --- a/src/lib/actions/profile.ts +++ b/src/lib/actions/profile.ts @@ -11,6 +11,7 @@ import { unauthorizedError, validationError, } from '../utils/http'; +import { m } from '@/paraglide/messages'; export const ChangePasswordSchema = createInsertSchema(account) .pick({ @@ -56,7 +57,7 @@ export const changePassword = createServerFn({ if (!(await password.verify(data.password, session.user.password))) { throw validationError({ - password: ['Wrong password'], + password: [m['validation.invalid-credentials']()], }); } @@ -68,7 +69,7 @@ export const changePassword = createServerFn({ .where(eq(account.id, session.user.id)); return { - message: 'Successfully updated password', + message: m['change-password.mutation.success'](), }; }); @@ -108,7 +109,7 @@ export const changeEmail = createServerFn({ if (!(await password.verify(data.password, session.user.password))) { throw validationError({ - password: ['Wrong password'], + password: [m['validation.invalid-credentials']()], }); } @@ -120,6 +121,6 @@ export const changeEmail = createServerFn({ .where(eq(account.id, session.user.id)); return { - message: 'Successfully updated email', + message: m['change-email.mutation.success'](), }; }); diff --git a/src/lib/actions/test.ts b/src/lib/actions/test.ts index 7409b9d..2d20417 100644 --- a/src/lib/actions/test.ts +++ b/src/lib/actions/test.ts @@ -1,6 +1,16 @@ import { createServerFn } from '@tanstack/react-start'; import { m } from '@/paraglide/messages'; +import { useAppSession } from '../utils/session'; +import { validateSessionToken } from '../session/auth'; +import { getIp } from '../utils'; -export const helloWorld = createServerFn().handler(() => { - return m.server_message('hello'); +export const helloWorld = createServerFn().handler(async () => { + const appSession = await useAppSession(); + + const { user } = await validateSessionToken( + appSession.data.sessionToken, + getIp(), + ); + + return m.example_message({ username: user?.login || 'Guest' }); }); diff --git a/src/lib/i18n/locale-middleware.ts b/src/lib/i18n/locale-middleware.ts index a0b0510..ba6c98f 100644 --- a/src/lib/i18n/locale-middleware.ts +++ b/src/lib/i18n/locale-middleware.ts @@ -6,18 +6,36 @@ import { overwriteGetLocale, } from '@/paraglide/runtime'; import { resolveLocale } from './resolve-locale'; +import { z } from 'zod/v4'; +// TODO Remove `@ts-ignore` when zod does not have the romanian locale implemented yet export const localeMiddleware = createMiddleware() - .client(async (context) => - context.next({ + .client(async (context) => { + const locale = await resolveLocale(); + + // @ts-ignore + if (z.locales[locale]) { + // @ts-ignore + z.config(z.locales[locale]()); + } + + return await context.next({ sendContext: { - locale: await resolveLocale(), + locale, }, - }), - ) + }); + }) .server(async (context) => { const storage = new AsyncLocalStorage(); overwriteGetLocale(() => storage.getStore() ?? baseLocale); - return await storage.run(context.context.locale, context.next); + const { locale } = context.context; + + // @ts-ignore + if (z.locales[locale]) { + // @ts-ignore + z.config(z.locales[locale]()); + } + + return await storage.run(locale, context.next); }); diff --git a/src/lib/utils/http.ts b/src/lib/utils/http.ts index 40bf5eb..680472a 100644 --- a/src/lib/utils/http.ts +++ b/src/lib/utils/http.ts @@ -1,19 +1,22 @@ +import { m } from '@/paraglide/messages'; import { json } from '@tanstack/react-start'; -import type { z } from 'zod/v4'; +import { z } from 'zod/v4'; export const unauthorizedError = () => { return json( { - message: 'Unauthorized', + message: m['errors.unauthorized'](), }, { status: 401 }, ); }; -export const validationError = (errors: Record) => { +type Errors = { [x: string]: string[] | undefined }; + +export const validationError = (errors: Errors) => { return json( { - message: 'There was an issue with the data provided', + message: m['errors.unprocessable-entity'](), errors, }, { status: 422 }, @@ -23,18 +26,18 @@ export const validationError = (errors: Record) => { export const serverError = () => { return json( { - message: 'Server error', + message: m['errors.server-error'](), }, { status: 500 }, ); }; -type ValidationError = Error & { +type ValidationError = Error & { message: string; errors: Record; }; -export function isValidationError( +export function isValidationError( error: Error, ): error is ValidationError { return Object.hasOwn(error, 'errors'); @@ -47,13 +50,7 @@ export function handleServerFnValidation>( const result = schema.safeParse(payload); if (!result.success) { - throw json( - { - message: 'Validation error', - errors: result.error.flatten().fieldErrors, - }, - { status: 422 }, - ); + throw validationError(z.flattenError(result.error).fieldErrors); } return result.data; diff --git a/src/routeTree.gen.ts b/src/routeTree.gen.ts index 4a458a2..cad7669 100644 --- a/src/routeTree.gen.ts +++ b/src/routeTree.gen.ts @@ -11,27 +11,37 @@ // Import Routes import { Route as rootRoute } from './routes/__root' +import { Route as SignUpImport } from './routes/sign-up' +import { Route as SignInImport } from './routes/sign-in' import { Route as ResetPasswordImport } from './routes/reset-password' -import { Route as RegisterImport } from './routes/register' import { Route as ProfileImport } from './routes/profile' -import { Route as LoginImport } from './routes/login' import { Route as ForgotPasswordImport } from './routes/forgot-password' +import { Route as DownloadImport } from './routes/download' import { Route as IndexImport } from './routes/index' +import { Route as SupportIndexImport } from './routes/support/index' import { Route as ProfileIndexImport } from './routes/profile/index' +import { Route as RankingsPlayersImport } from './routes/rankings/players' +import { Route as RankingsGuildsImport } from './routes/rankings/guilds' import { Route as ProfileChangePasswordImport } from './routes/profile/change-password' import { Route as ProfileChangeEmailImport } from './routes/profile/change-email' // Create/Update Routes -const ResetPasswordRoute = ResetPasswordImport.update({ - id: '/reset-password', - path: '/reset-password', +const SignUpRoute = SignUpImport.update({ + id: '/sign-up', + path: '/sign-up', getParentRoute: () => rootRoute, } as any) -const RegisterRoute = RegisterImport.update({ - id: '/register', - path: '/register', +const SignInRoute = SignInImport.update({ + id: '/sign-in', + path: '/sign-in', + getParentRoute: () => rootRoute, +} as any) + +const ResetPasswordRoute = ResetPasswordImport.update({ + id: '/reset-password', + path: '/reset-password', getParentRoute: () => rootRoute, } as any) @@ -41,30 +51,48 @@ const ProfileRoute = ProfileImport.update({ getParentRoute: () => rootRoute, } as any) -const LoginRoute = LoginImport.update({ - id: '/login', - path: '/login', - getParentRoute: () => rootRoute, -} as any) - const ForgotPasswordRoute = ForgotPasswordImport.update({ id: '/forgot-password', path: '/forgot-password', getParentRoute: () => rootRoute, } as any) +const DownloadRoute = DownloadImport.update({ + id: '/download', + path: '/download', + getParentRoute: () => rootRoute, +} as any) + const IndexRoute = IndexImport.update({ id: '/', path: '/', getParentRoute: () => rootRoute, } as any) +const SupportIndexRoute = SupportIndexImport.update({ + id: '/support/', + path: '/support/', + getParentRoute: () => rootRoute, +} as any) + const ProfileIndexRoute = ProfileIndexImport.update({ id: '/', path: '/', getParentRoute: () => ProfileRoute, } as any) +const RankingsPlayersRoute = RankingsPlayersImport.update({ + id: '/rankings/players', + path: '/rankings/players', + getParentRoute: () => rootRoute, +} as any) + +const RankingsGuildsRoute = RankingsGuildsImport.update({ + id: '/rankings/guilds', + path: '/rankings/guilds', + getParentRoute: () => rootRoute, +} as any) + const ProfileChangePasswordRoute = ProfileChangePasswordImport.update({ id: '/change-password', path: '/change-password', @@ -88,6 +116,13 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof IndexImport parentRoute: typeof rootRoute } + '/download': { + id: '/download' + path: '/download' + fullPath: '/download' + preLoaderRoute: typeof DownloadImport + parentRoute: typeof rootRoute + } '/forgot-password': { id: '/forgot-password' path: '/forgot-password' @@ -95,13 +130,6 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof ForgotPasswordImport parentRoute: typeof rootRoute } - '/login': { - id: '/login' - path: '/login' - fullPath: '/login' - preLoaderRoute: typeof LoginImport - parentRoute: typeof rootRoute - } '/profile': { id: '/profile' path: '/profile' @@ -109,13 +137,6 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof ProfileImport parentRoute: typeof rootRoute } - '/register': { - id: '/register' - path: '/register' - fullPath: '/register' - preLoaderRoute: typeof RegisterImport - parentRoute: typeof rootRoute - } '/reset-password': { id: '/reset-password' path: '/reset-password' @@ -123,6 +144,20 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof ResetPasswordImport parentRoute: typeof rootRoute } + '/sign-in': { + id: '/sign-in' + path: '/sign-in' + fullPath: '/sign-in' + preLoaderRoute: typeof SignInImport + parentRoute: typeof rootRoute + } + '/sign-up': { + id: '/sign-up' + path: '/sign-up' + fullPath: '/sign-up' + preLoaderRoute: typeof SignUpImport + parentRoute: typeof rootRoute + } '/profile/change-email': { id: '/profile/change-email' path: '/change-email' @@ -137,6 +172,20 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof ProfileChangePasswordImport parentRoute: typeof ProfileImport } + '/rankings/guilds': { + id: '/rankings/guilds' + path: '/rankings/guilds' + fullPath: '/rankings/guilds' + preLoaderRoute: typeof RankingsGuildsImport + parentRoute: typeof rootRoute + } + '/rankings/players': { + id: '/rankings/players' + path: '/rankings/players' + fullPath: '/rankings/players' + preLoaderRoute: typeof RankingsPlayersImport + parentRoute: typeof rootRoute + } '/profile/': { id: '/profile/' path: '/' @@ -144,6 +193,13 @@ declare module '@tanstack/react-router' { preLoaderRoute: typeof ProfileIndexImport parentRoute: typeof ProfileImport } + '/support/': { + id: '/support/' + path: '/support' + fullPath: '/support' + preLoaderRoute: typeof SupportIndexImport + parentRoute: typeof rootRoute + } } } @@ -166,92 +222,124 @@ const ProfileRouteWithChildren = export interface FileRoutesByFullPath { '/': typeof IndexRoute + '/download': typeof DownloadRoute '/forgot-password': typeof ForgotPasswordRoute - '/login': typeof LoginRoute '/profile': typeof ProfileRouteWithChildren - '/register': typeof RegisterRoute '/reset-password': typeof ResetPasswordRoute + '/sign-in': typeof SignInRoute + '/sign-up': typeof SignUpRoute '/profile/change-email': typeof ProfileChangeEmailRoute '/profile/change-password': typeof ProfileChangePasswordRoute + '/rankings/guilds': typeof RankingsGuildsRoute + '/rankings/players': typeof RankingsPlayersRoute '/profile/': typeof ProfileIndexRoute + '/support': typeof SupportIndexRoute } export interface FileRoutesByTo { '/': typeof IndexRoute + '/download': typeof DownloadRoute '/forgot-password': typeof ForgotPasswordRoute - '/login': typeof LoginRoute - '/register': typeof RegisterRoute '/reset-password': typeof ResetPasswordRoute + '/sign-in': typeof SignInRoute + '/sign-up': typeof SignUpRoute '/profile/change-email': typeof ProfileChangeEmailRoute '/profile/change-password': typeof ProfileChangePasswordRoute + '/rankings/guilds': typeof RankingsGuildsRoute + '/rankings/players': typeof RankingsPlayersRoute '/profile': typeof ProfileIndexRoute + '/support': typeof SupportIndexRoute } export interface FileRoutesById { __root__: typeof rootRoute '/': typeof IndexRoute + '/download': typeof DownloadRoute '/forgot-password': typeof ForgotPasswordRoute - '/login': typeof LoginRoute '/profile': typeof ProfileRouteWithChildren - '/register': typeof RegisterRoute '/reset-password': typeof ResetPasswordRoute + '/sign-in': typeof SignInRoute + '/sign-up': typeof SignUpRoute '/profile/change-email': typeof ProfileChangeEmailRoute '/profile/change-password': typeof ProfileChangePasswordRoute + '/rankings/guilds': typeof RankingsGuildsRoute + '/rankings/players': typeof RankingsPlayersRoute '/profile/': typeof ProfileIndexRoute + '/support/': typeof SupportIndexRoute } export interface FileRouteTypes { fileRoutesByFullPath: FileRoutesByFullPath fullPaths: | '/' + | '/download' | '/forgot-password' - | '/login' | '/profile' - | '/register' | '/reset-password' + | '/sign-in' + | '/sign-up' | '/profile/change-email' | '/profile/change-password' + | '/rankings/guilds' + | '/rankings/players' | '/profile/' + | '/support' fileRoutesByTo: FileRoutesByTo to: | '/' + | '/download' | '/forgot-password' - | '/login' - | '/register' | '/reset-password' + | '/sign-in' + | '/sign-up' | '/profile/change-email' | '/profile/change-password' + | '/rankings/guilds' + | '/rankings/players' | '/profile' + | '/support' id: | '__root__' | '/' + | '/download' | '/forgot-password' - | '/login' | '/profile' - | '/register' | '/reset-password' + | '/sign-in' + | '/sign-up' | '/profile/change-email' | '/profile/change-password' + | '/rankings/guilds' + | '/rankings/players' | '/profile/' + | '/support/' fileRoutesById: FileRoutesById } export interface RootRouteChildren { IndexRoute: typeof IndexRoute + DownloadRoute: typeof DownloadRoute ForgotPasswordRoute: typeof ForgotPasswordRoute - LoginRoute: typeof LoginRoute ProfileRoute: typeof ProfileRouteWithChildren - RegisterRoute: typeof RegisterRoute ResetPasswordRoute: typeof ResetPasswordRoute + SignInRoute: typeof SignInRoute + SignUpRoute: typeof SignUpRoute + RankingsGuildsRoute: typeof RankingsGuildsRoute + RankingsPlayersRoute: typeof RankingsPlayersRoute + SupportIndexRoute: typeof SupportIndexRoute } const rootRouteChildren: RootRouteChildren = { IndexRoute: IndexRoute, + DownloadRoute: DownloadRoute, ForgotPasswordRoute: ForgotPasswordRoute, - LoginRoute: LoginRoute, ProfileRoute: ProfileRouteWithChildren, - RegisterRoute: RegisterRoute, ResetPasswordRoute: ResetPasswordRoute, + SignInRoute: SignInRoute, + SignUpRoute: SignUpRoute, + RankingsGuildsRoute: RankingsGuildsRoute, + RankingsPlayersRoute: RankingsPlayersRoute, + SupportIndexRoute: SupportIndexRoute, } export const routeTree = rootRoute @@ -265,22 +353,26 @@ export const routeTree = rootRoute "filePath": "__root.tsx", "children": [ "/", + "/download", "/forgot-password", - "/login", "/profile", - "/register", - "/reset-password" + "/reset-password", + "/sign-in", + "/sign-up", + "/rankings/guilds", + "/rankings/players", + "/support/" ] }, "/": { "filePath": "index.tsx" }, + "/download": { + "filePath": "download.tsx" + }, "/forgot-password": { "filePath": "forgot-password.tsx" }, - "/login": { - "filePath": "login.tsx" - }, "/profile": { "filePath": "profile.tsx", "children": [ @@ -289,12 +381,15 @@ export const routeTree = rootRoute "/profile/" ] }, - "/register": { - "filePath": "register.tsx" - }, "/reset-password": { "filePath": "reset-password.tsx" }, + "/sign-in": { + "filePath": "sign-in.tsx" + }, + "/sign-up": { + "filePath": "sign-up.tsx" + }, "/profile/change-email": { "filePath": "profile/change-email.tsx", "parent": "/profile" @@ -303,9 +398,18 @@ export const routeTree = rootRoute "filePath": "profile/change-password.tsx", "parent": "/profile" }, + "/rankings/guilds": { + "filePath": "rankings/guilds.tsx" + }, + "/rankings/players": { + "filePath": "rankings/players.tsx" + }, "/profile/": { "filePath": "profile/index.tsx", "parent": "/profile" + }, + "/support/": { + "filePath": "support/index.tsx" } } } diff --git a/src/routes/__root.tsx b/src/routes/__root.tsx index 9ff7c54..01926d1 100644 --- a/src/routes/__root.tsx +++ b/src/routes/__root.tsx @@ -1,4 +1,3 @@ -import '../i18n'; import { HeadContent, Link, @@ -34,6 +33,8 @@ import { import { useServerFn } from '@tanstack/react-start'; import { LoginForm } from '@/components/login/form'; import { Toaster } from '@/components/ui/sonner'; +import { m } from '@/paraglide/messages'; +import { getLocale, locales, setLocale } from '@/paraglide/runtime'; export const Route = createRootRoute({ head: () => ({ @@ -102,38 +103,45 @@ const queryClient = new QueryClient(); function RootComponent() { const { user } = Route.useRouteContext(); const doLogout = useServerFn(logout); + const currentLocale = getLocale(); return (
diff --git a/src/routes/api/users.$id.ts b/src/routes/api/users.$id.ts deleted file mode 100644 index 0038365..0000000 --- a/src/routes/api/users.$id.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { json } from '@tanstack/react-start'; -import { createAPIFileRoute } from '@tanstack/react-start/api'; -import type { User } from '../../utils/users'; - -export const APIRoute = createAPIFileRoute('/api/users/$id')({ - GET: async ({ request, params }) => { - console.info(`Fetching users by id=${params.id}... @`, request.url); - try { - const res = await fetch( - `https://jsonplaceholder.typicode.com/users/${params.id}`, - ); - if (!res.ok) { - throw new Error('Failed to fetch user'); - } - - const user = (await res.json()) as User; - - return json({ - id: user.id, - name: user.name, - email: user.email, - }); - } catch (e) { - console.error(e); - return json({ error: 'User not found' }, { status: 404 }); - } - }, -}); diff --git a/src/routes/api/users.ts b/src/routes/api/users.ts deleted file mode 100644 index 61ad3e5..0000000 --- a/src/routes/api/users.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { json } from '@tanstack/react-start' -import { createAPIFileRoute } from '@tanstack/react-start/api' -import type { User } from '../../utils/users' - -export const APIRoute = createAPIFileRoute('/api/users')({ - GET: async ({ request }) => { - console.info('Fetching users... @', request.url) - const res = await fetch('https://jsonplaceholder.typicode.com/users') - if (!res.ok) { - throw new Error('Failed to fetch users') - } - - const data = (await res.json()) as Array - - const list = data.slice(0, 10) - - return json(list.map((u) => ({ id: u.id, name: u.name, email: u.email }))) - }, -}) diff --git a/src/routes/download.tsx b/src/routes/download.tsx new file mode 100644 index 0000000..354d7db --- /dev/null +++ b/src/routes/download.tsx @@ -0,0 +1,9 @@ +import { createFileRoute } from '@tanstack/react-router'; + +export const Route = createFileRoute('/download')({ + component: Page, +}); + +function Page() { + return
Hello "/download"!
; +} diff --git a/src/routes/forgot-password.tsx b/src/routes/forgot-password.tsx index 6d5cb5b..e0cb15b 100644 --- a/src/routes/forgot-password.tsx +++ b/src/routes/forgot-password.tsx @@ -9,12 +9,15 @@ import { } from '@/components/ui/form'; import { Input } from '@/components/ui/input'; import { forgotPassword, ForgotPasswordSchema } from '@/lib/actions/password'; +import { isValidationError } from '@/lib/utils/http'; +import { m } from '@/paraglide/messages'; import { standardSchemaResolver } from '@hookform/resolvers/standard-schema'; import { useMutation } from '@tanstack/react-query'; import { createFileRoute, redirect } from '@tanstack/react-router'; import { useServerFn } from '@tanstack/react-start'; import { LoaderCircleIcon } from 'lucide-react'; import { useForm } from 'react-hook-form'; +import { toast } from 'sonner'; import type { z } from 'zod/v4'; export const Route = createFileRoute('/forgot-password')({ @@ -25,10 +28,10 @@ export const Route = createFileRoute('/forgot-password')({ }); } }, - component: RouteComponent, + component: Page, }); -function RouteComponent() { +function Page() { const serverFn = useServerFn(forgotPassword); const form = useForm>({ @@ -38,7 +41,30 @@ function RouteComponent() { const mutation = useMutation({ mutationFn: async (payload: z.infer) => await serverFn({ data: payload }), - // TODO Sonner + onMutate: () => { + return { + toastId: toast.loading(m['forgot-password.mutation.pending']()), + }; + }, + onSuccess: (_data, _variables, context) => { + toast.success(m['forgot-password.mutation.success'](), { + id: context.toastId, + }); + }, + onError: (err, _variables, context) => { + toast.error(err.message, { + id: context?.toastId, + }); + + if (isValidationError>(err)) { + for (const [key, errors] of Object.entries(err.errors) as [ + keyof typeof err.errors, + string[], + ][]) { + form.setError(key, { message: errors[0] }); + } + } + }, }); const onSubmit = form.handleSubmit((payload) => mutation.mutate(payload)); @@ -51,9 +77,13 @@ function RouteComponent() { name="email" render={({ field }) => ( - Email + {m['forgot-password.form.email']()} - + @@ -63,7 +93,7 @@ function RouteComponent() { {mutation.isPending && ( )} - Recover password + {m['forgot-password.form.submit']()} diff --git a/src/routes/index.tsx b/src/routes/index.tsx index 5a17456..72dfe4f 100644 --- a/src/routes/index.tsx +++ b/src/routes/index.tsx @@ -1,13 +1,17 @@ +import { helloWorld } from '@/lib/actions/test'; import { createFileRoute } from '@tanstack/react-router'; export const Route = createFileRoute('/')({ component: Page, + loader: async () => await helloWorld(), }); function Page() { + const message = Route.useLoaderData(); + return (
-

Welcome Home!!!

+

{message}

); } diff --git a/src/routes/profile/change-email.tsx b/src/routes/profile/change-email.tsx index 90eae2c..3da9b3c 100644 --- a/src/routes/profile/change-email.tsx +++ b/src/routes/profile/change-email.tsx @@ -1,9 +1,111 @@ -import { createFileRoute } from '@tanstack/react-router' +import { Button } from '@/components/ui/button'; +import { + Form, + FormControl, + FormField, + FormItem, + FormLabel, + FormMessage, +} from '@/components/ui/form'; +import { Input } from '@/components/ui/input'; +import { changeEmail, ChangeEmailSchema } from '@/lib/actions/profile'; +import { isValidationError } from '@/lib/utils/http'; +import { m } from '@/paraglide/messages'; +import { standardSchemaResolver } from '@hookform/resolvers/standard-schema'; +import { useMutation } from '@tanstack/react-query'; +import { createFileRoute } from '@tanstack/react-router'; +import { useServerFn } from '@tanstack/react-start'; +import { LoaderCircleIcon } from 'lucide-react'; +import { useForm } from 'react-hook-form'; +import { toast } from 'sonner'; +import type { z } from 'zod/v4'; export const Route = createFileRoute('/profile/change-email')({ component: Page, -}) +}); function Page() { - return
Hello "/profile/change-email"!
+ const serverFn = useServerFn(changeEmail); + + const form = useForm>({ + resolver: standardSchemaResolver(ChangeEmailSchema), + }); + + const mutation = useMutation({ + mutationFn: async (payload: z.infer) => + await serverFn({ data: payload }), + onMutate: () => { + return { + toastId: toast.loading(m['change-email.mutation.pending']()), + }; + }, + onSuccess: (data, _variables, context) => { + toast.success(data.message, { + id: context.toastId, + }); + }, + onError: (err, _variables, context) => { + toast.error(err.message, { + id: context?.toastId, + }); + + if (isValidationError>(err)) { + for (const [key, errors] of Object.entries(err.errors) as [ + keyof typeof err.errors, + string[], + ][]) { + form.setError(key, { message: errors[0] }); + } + } + }, + }); + + const onSubmit = form.handleSubmit((payload) => mutation.mutate(payload)); + + return ( +
+ + ( + + {m['change-email.form.password']()} + + + + + + )} + /> + ( + + {m['change-email.form.email']()} + + + + + + )} + /> + + + + ); } diff --git a/src/routes/profile/change-password.tsx b/src/routes/profile/change-password.tsx index ae84521..343cbee 100644 --- a/src/routes/profile/change-password.tsx +++ b/src/routes/profile/change-password.tsx @@ -1,9 +1,130 @@ -import { createFileRoute } from '@tanstack/react-router' +import { Button } from '@/components/ui/button'; +import { + Form, + FormControl, + FormField, + FormItem, + FormLabel, + FormMessage, +} from '@/components/ui/form'; +import { Input } from '@/components/ui/input'; +import { changePassword, ChangePasswordSchema } from '@/lib/actions/profile'; +import { isValidationError } from '@/lib/utils/http'; +import { m } from '@/paraglide/messages'; +import { standardSchemaResolver } from '@hookform/resolvers/standard-schema'; +import { useMutation } from '@tanstack/react-query'; +import { createFileRoute } from '@tanstack/react-router'; +import { useServerFn } from '@tanstack/react-start'; +import { LoaderCircleIcon } from 'lucide-react'; +import { useForm } from 'react-hook-form'; +import { toast } from 'sonner'; +import type { z } from 'zod/v4'; export const Route = createFileRoute('/profile/change-password')({ component: Page, -}) +}); function Page() { - return
Hello "/profile/change-password"!
+ const serverFn = useServerFn(changePassword); + + const form = useForm>({ + resolver: standardSchemaResolver(ChangePasswordSchema), + }); + + const mutation = useMutation({ + mutationFn: async (payload: z.infer) => + await serverFn({ data: payload }), + onMutate: () => { + return { + toastId: toast.loading(m['change-password.mutation.pending']()), + }; + }, + onSuccess: (data, _variables, context) => { + toast.success(data.message, { + id: context.toastId, + }); + }, + onError: (err, _variables, context) => { + toast.error(err.message, { + id: context?.toastId, + }); + + if (isValidationError>(err)) { + for (const [key, errors] of Object.entries(err.errors) as [ + keyof typeof err.errors, + string[], + ][]) { + form.setError(key, { message: errors[0] }); + } + } + }, + }); + + const onSubmit = form.handleSubmit((payload) => mutation.mutate(payload)); + + return ( +
+ + ( + + {m['change-password.form.password']()} + + + + + + )} + /> + ( + + {m['change-password.form.newPassword']()} + + + + + + )} + /> + ( + + + {m['change-password.form.newPasswordConfirm']()} + + + + + + + )} + /> + + + + ); } diff --git a/src/routes/profile/index.tsx b/src/routes/profile/index.tsx index f090741..8cffbc0 100644 --- a/src/routes/profile/index.tsx +++ b/src/routes/profile/index.tsx @@ -1,9 +1,10 @@ -import { createFileRoute } from '@tanstack/react-router'; +import { createFileRoute, Link } from '@tanstack/react-router'; export const Route = createFileRoute('/profile/')({ component: Page, }); +// TODO Structure function Page() { const { user } = Route.useRouteContext(); @@ -11,5 +12,17 @@ function Page() { return null; } - return
Hello {user.login}
; + return ( +
+ Hello {user.login} +
    +
  • + Change email +
  • +
  • + Change password +
  • +
+
+ ); } diff --git a/src/routes/rankings/guilds.tsx b/src/routes/rankings/guilds.tsx new file mode 100644 index 0000000..9e96ba0 --- /dev/null +++ b/src/routes/rankings/guilds.tsx @@ -0,0 +1,9 @@ +import { createFileRoute } from '@tanstack/react-router'; + +export const Route = createFileRoute('/rankings/guilds')({ + component: Page, +}); + +function Page() { + return
Hello "/rankings/guilds"!
; +} diff --git a/src/routes/rankings/players.tsx b/src/routes/rankings/players.tsx new file mode 100644 index 0000000..35f072c --- /dev/null +++ b/src/routes/rankings/players.tsx @@ -0,0 +1,9 @@ +import { createFileRoute } from '@tanstack/react-router'; + +export const Route = createFileRoute('/rankings/players')({ + component: Page, +}); + +function Page() { + return
Hello "/rankings/players"!
; +} diff --git a/src/routes/reset-password.tsx b/src/routes/reset-password.tsx index 2ecd7dc..b320162 100644 --- a/src/routes/reset-password.tsx +++ b/src/routes/reset-password.tsx @@ -14,12 +14,15 @@ import { ResetPasswordSchema, validateResetPassword, } from '@/lib/actions/password'; +import { isValidationError } from '@/lib/utils/http'; +import { m } from '@/paraglide/messages'; import { standardSchemaResolver } from '@hookform/resolvers/standard-schema'; import { useMutation } from '@tanstack/react-query'; import { createFileRoute, redirect } from '@tanstack/react-router'; import { useServerFn } from '@tanstack/react-start'; import { LoaderCircleIcon } from 'lucide-react'; import { useForm } from 'react-hook-form'; +import { toast } from 'sonner'; import type { z } from 'zod/v4'; export const Route = createFileRoute('/reset-password')({ @@ -56,7 +59,30 @@ function Page() { const mutation = useMutation({ mutationFn: async (payload: z.infer) => await serverFn({ data: payload }), - // TODO Sonner + onMutate: () => { + return { + toastId: toast.loading(m['reset-password.mutation.pending']()), + }; + }, + onSuccess: (_data, _variables, context) => { + toast.success(m['reset-password.mutation.success'](), { + id: context.toastId, + }); + }, + onError: (err, _variables, context) => { + toast.error(err.message, { + id: context?.toastId, + }); + + if (isValidationError>(err)) { + for (const [key, errors] of Object.entries(err.errors) as [ + keyof typeof err.errors, + string[], + ][]) { + form.setError(key, { message: errors[0] }); + } + } + }, }); const onSubmit = form.handleSubmit((payload) => mutation.mutate(payload)); @@ -69,9 +95,13 @@ function Page() { name="email" render={({ field }) => ( - Email + {m['reset-password.form.email']()} - + @@ -82,9 +112,13 @@ function Page() { name="password" render={({ field }) => ( - Password + {m['reset-password.form.password']()} - + @@ -94,7 +128,7 @@ function Page() { {mutation.isPending && ( )} - Reset Password + {m['reset-password.form.submit']()} diff --git a/src/routes/login.tsx b/src/routes/sign-in.tsx similarity index 78% rename from src/routes/login.tsx rename to src/routes/sign-in.tsx index 02d0241..8c55a21 100644 --- a/src/routes/login.tsx +++ b/src/routes/sign-in.tsx @@ -1,7 +1,7 @@ import { LoginForm } from '@/components/login/form'; import { createFileRoute, redirect } from '@tanstack/react-router'; -export const Route = createFileRoute('/login')({ +export const Route = createFileRoute('/sign-in')({ beforeLoad: ({ context }) => { if (context.user) { throw redirect({ href: '/' }); @@ -11,5 +11,5 @@ export const Route = createFileRoute('/login')({ }); function Page() { - return ; + return ; } diff --git a/src/routes/register.tsx b/src/routes/sign-up.tsx similarity index 71% rename from src/routes/register.tsx rename to src/routes/sign-up.tsx index 58ba139..596dbf6 100644 --- a/src/routes/register.tsx +++ b/src/routes/sign-up.tsx @@ -1,4 +1,4 @@ -import { createFileRoute, redirect } from '@tanstack/react-router'; +import { createFileRoute, Link, redirect } from '@tanstack/react-router'; import { useForm } from 'react-hook-form'; import { standardSchemaResolver } from '@hookform/resolvers/standard-schema'; import { @@ -18,8 +18,9 @@ import type { z } from 'zod/v4'; import { register, RegisterSchema } from '@/lib/actions/auth'; import { toast } from 'sonner'; import { isValidationError } from '@/lib/utils/http'; +import { m } from '@/paraglide/messages'; -export const Route = createFileRoute('/register')({ +export const Route = createFileRoute('/sign-up')({ beforeLoad: ({ context }) => { if (context.user) { throw redirect({ href: '/' }); @@ -40,11 +41,11 @@ function Page() { await serverFn({ data: payload }), onMutate: () => { return { - toastId: toast.loading('Signing up...'), + toastId: toast.loading(m['sign-up.mutation.pending']()), }; }, onSuccess: (_data, _variables, context) => { - toast.success('Signed up successfully, redirecting now', { + toast.success(m['sign-up.mutation.success'](), { id: context.toastId, }); }, @@ -74,9 +75,9 @@ function Page() { name="login" render={({ field }) => ( - Username + {m['sign-up.form.login']()} - + @@ -87,9 +88,13 @@ function Page() { name="email" render={({ field }) => ( - Email + {m['sign-up.form.email']()} - + @@ -100,9 +105,9 @@ function Page() { name="socialId" render={({ field }) => ( - Character deletion code + {m['sign-up.form.socialId']()} - + @@ -113,19 +118,28 @@ function Page() { name="password" render={({ field }) => ( - Password + {m['sign-up.form.password']()} - + )} /> +
+ + {m['sign-up.links.sign-in']()} + +
diff --git a/src/routes/support/index.tsx b/src/routes/support/index.tsx new file mode 100644 index 0000000..a2323ac --- /dev/null +++ b/src/routes/support/index.tsx @@ -0,0 +1,9 @@ +import { createFileRoute } from '@tanstack/react-router'; + +export const Route = createFileRoute('/support/')({ + component: Page, +}); + +function Page() { + return
Hello "/support/"!
; +}