diff --git a/drizzle.config.js b/drizzle.config.js index 873bcfc..4a9386c 100644 --- a/drizzle.config.js +++ b/drizzle.config.js @@ -5,10 +5,8 @@ dotenv.config() export default { "out": "./src/db/migrations", "schema": "./src/db/schemas.js", - "url": process.env.DATABASE_URL, "dbCredentials": { - "connectionString": process.env.DATABASE_URL + "url": process.env.DATABASE_URL }, - "dialect": "postgresql", - "driver": "pg" + "dialect": "postgresql" } diff --git a/package-lock.json b/package-lock.json index 2d10998..c1e3991 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,7 +13,7 @@ "@fastify/cors": "^8.4.2", "@fastify/multipart": "^8.2.0", "@fastify/oauth2": "^7.8.0", - "drizzle-orm": "^0.29.5", + "drizzle-orm": "^0.31.1", "fastify": "^4.25.0", "fastify-plugin": "^4.5.1", "googleapis": "^134.0.0", @@ -33,7 +33,7 @@ "@types/stripe-v3": "^3.1.33", "cli-color": "^2.0.3", "dotenv": "^16.3.1", - "drizzle-kit": "^0.20.0", + "drizzle-kit": "^0.22.4", "prettier": "^3.1.1", "tsc-alias": "^1.8.8", "tsx": "^3.12.7", @@ -226,126 +226,6 @@ "node": ">=4" } }, - "node_modules/@cloudflare/kv-asset-handler": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/@cloudflare/kv-asset-handler/-/kv-asset-handler-0.3.2.tgz", - "integrity": "sha512-EeEjMobfuJrwoctj7FA1y1KEbM0+Q1xSjobIEyie9k4haVEBB7vkDvsasw1pM3rO39mL2akxIAzLMUAtrMHZhA==", - "dev": true, - "dependencies": { - "mime": "^3.0.0" - }, - "engines": { - "node": ">=16.13" - } - }, - "node_modules/@cloudflare/workerd-darwin-64": { - "version": "1.20240512.0", - "resolved": "https://registry.npmjs.org/@cloudflare/workerd-darwin-64/-/workerd-darwin-64-1.20240512.0.tgz", - "integrity": "sha512-VMp+CsSHFALQiBzPdQ5dDI4T1qwLu0mQ0aeKVNDosXjueN0f3zj/lf+mFil5/9jBbG3t4mG0y+6MMnalP9Lobw==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=16" - } - }, - "node_modules/@cloudflare/workerd-darwin-arm64": { - "version": "1.20240512.0", - "resolved": "https://registry.npmjs.org/@cloudflare/workerd-darwin-arm64/-/workerd-darwin-arm64-1.20240512.0.tgz", - "integrity": "sha512-lZktXGmzMrB5rJqY9+PmnNfv1HKlj/YLZwMjPfF0WVKHUFdvQbAHsi7NlKv6mW9uIvlZnS+K4sIkWc0MDXcRnA==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=16" - } - }, - "node_modules/@cloudflare/workerd-linux-64": { - "version": "1.20240512.0", - "resolved": "https://registry.npmjs.org/@cloudflare/workerd-linux-64/-/workerd-linux-64-1.20240512.0.tgz", - "integrity": "sha512-wrHvqCZZqXz6Y3MUTn/9pQNsvaoNjbJpuA6vcXsXu8iCzJi911iVW2WUEBX+MpUWD+mBIP0oXni5tTlhkokOPw==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=16" - } - }, - "node_modules/@cloudflare/workerd-linux-arm64": { - "version": "1.20240512.0", - "resolved": "https://registry.npmjs.org/@cloudflare/workerd-linux-arm64/-/workerd-linux-arm64-1.20240512.0.tgz", - "integrity": "sha512-YPezHMySL9J9tFdzxz390eBswQ//QJNYcZolz9Dgvb3FEfdpK345cE/bsWbMOqw5ws2f82l388epoenghtYvAg==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=16" - } - }, - "node_modules/@cloudflare/workerd-windows-64": { - "version": "1.20240512.0", - "resolved": "https://registry.npmjs.org/@cloudflare/workerd-windows-64/-/workerd-windows-64-1.20240512.0.tgz", - "integrity": "sha512-SxKapDrIYSscMR7lGIp/av0l6vokjH4xQ9ACxHgXh+OdOus9azppSmjaPyw4/ePvg7yqpkaNjf9o258IxWtvKQ==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=16" - } - }, - "node_modules/@cspotcode/source-map-support": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", - "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", - "dev": true, - "dependencies": { - "@jridgewell/trace-mapping": "0.3.9" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/@cspotcode/source-map-support/node_modules/@jridgewell/trace-mapping": { - "version": "0.3.9", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", - "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", - "dev": true, - "dependencies": { - "@jridgewell/resolve-uri": "^3.0.3", - "@jridgewell/sourcemap-codec": "^1.4.10" - } - }, - "node_modules/@drizzle-team/studio": { - "version": "0.0.27", - "resolved": "https://registry.npmjs.org/@drizzle-team/studio/-/studio-0.0.27.tgz", - "integrity": "sha512-vkgflb8g/7WCdVCuxWE6tCzjZB0q4lLIK6mwH1aleNRqIGOhEWq/E2I8HmKquz1v0GRDHLFd19ZzrVSITt2Uqg==", - "dev": true - }, "node_modules/@esbuild-kit/cjs-loader": { "version": "2.4.2", "resolved": "https://registry.npmjs.org/@esbuild-kit/cjs-loader/-/cjs-loader-2.4.2.tgz", @@ -379,44 +259,26 @@ "get-tsconfig": "^4.4.0" } }, - "node_modules/@esbuild-plugins/node-globals-polyfill": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/@esbuild-plugins/node-globals-polyfill/-/node-globals-polyfill-0.2.3.tgz", - "integrity": "sha512-r3MIryXDeXDOZh7ih1l/yE9ZLORCd5e8vWg02azWRGj5SPTuoh69A2AIyn0Z31V/kHBfZ4HgWJ+OK3GTTwLmnw==", - "dev": true, - "peerDependencies": { - "esbuild": "*" - } - }, - "node_modules/@esbuild-plugins/node-modules-polyfill": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/@esbuild-plugins/node-modules-polyfill/-/node-modules-polyfill-0.2.2.tgz", - "integrity": "sha512-LXV7QsWJxRuMYvKbiznh+U1ilIop3g2TeKRzUxOG5X3YITc8JyyTa90BmLwqqv0YnX4v32CSlG+vsziZp9dMvA==", - "dev": true, - "dependencies": { - "escape-string-regexp": "^4.0.0", - "rollup-plugin-node-polyfills": "^0.2.1" - }, - "peerDependencies": { - "esbuild": "*" - } - }, - "node_modules/@esbuild-plugins/node-modules-polyfill/node_modules/escape-string-regexp": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", - "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "node_modules/@esbuild/aix-ppc64": { + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.19.12.tgz", + "integrity": "sha512-bmoCYyWdEL3wDQIVbcyzRyeKLgk2WtWLTWz1ZIAZF/EGbNOwSA6ew3PftJ1PqMiOOGu0OyFMzG53L0zqIpPeNA==", + "cpu": [ + "ppc64" + ], "dev": true, + "optional": true, + "os": [ + "aix" + ], "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "node": ">=12" } }, "node_modules/@esbuild/android-arm": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.18.20.tgz", - "integrity": "sha512-fyi7TDI/ijKKNZTUJAQqiG5T7YjJXgnzkURqmGj13C6dCqckZBLdl4h7bkhHt/t0WP+zO9/zwroDvANaOqO5Sw==", + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.19.12.tgz", + "integrity": "sha512-qg/Lj1mu3CdQlDEEiWrlC4eaPZ1KztwGJ9B6J+/6G+/4ewxJg7gqj8eVYWvao1bXrqGiW2rsBZFSX3q2lcW05w==", "cpu": [ "arm" ], @@ -430,9 +292,9 @@ } }, "node_modules/@esbuild/android-arm64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.18.20.tgz", - "integrity": "sha512-Nz4rJcchGDtENV0eMKUNa6L12zz2zBDXuhj/Vjh18zGqB44Bi7MBMSXjgunJgjRhCmKOjnPuZp4Mb6OKqtMHLQ==", + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.19.12.tgz", + "integrity": "sha512-P0UVNGIienjZv3f5zq0DP3Nt2IE/3plFzuaS96vihvD0Hd6H/q4WXUGpCxD/E8YrSXfNyRPbpTq+T8ZQioSuPA==", "cpu": [ "arm64" ], @@ -446,9 +308,9 @@ } }, "node_modules/@esbuild/android-x64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.18.20.tgz", - "integrity": "sha512-8GDdlePJA8D6zlZYJV/jnrRAi6rOiNaCC/JclcXpB+KIuvfBN4owLtgzY2bsxnx666XjJx2kDPUmnTtR8qKQUg==", + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.19.12.tgz", + "integrity": "sha512-3k7ZoUW6Q6YqhdhIaq/WZ7HwBpnFBlW905Fa4s4qWJyiNOgT1dOqDiVAQFwBH7gBRZr17gLrlFCRzF6jFh7Kew==", "cpu": [ "x64" ], @@ -462,9 +324,9 @@ } }, "node_modules/@esbuild/darwin-arm64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.18.20.tgz", - "integrity": "sha512-bxRHW5kHU38zS2lPTPOyuyTm+S+eobPUnTNkdJEfAddYgEcll4xkT8DB9d2008DtTbl7uJag2HuE5NZAZgnNEA==", + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.19.12.tgz", + "integrity": "sha512-B6IeSgZgtEzGC42jsI+YYu9Z3HKRxp8ZT3cqhvliEHovq8HSX2YX8lNocDn79gCKJXOSaEot9MVYky7AKjCs8g==", "cpu": [ "arm64" ], @@ -478,9 +340,9 @@ } }, "node_modules/@esbuild/darwin-x64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.18.20.tgz", - "integrity": "sha512-pc5gxlMDxzm513qPGbCbDukOdsGtKhfxD1zJKXjCCcU7ju50O7MeAZ8c4krSJcOIJGFR+qx21yMMVYwiQvyTyQ==", + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.19.12.tgz", + "integrity": "sha512-hKoVkKzFiToTgn+41qGhsUJXFlIjxI/jSYeZf3ugemDYZldIXIxhvwN6erJGlX4t5h417iFuheZ7l+YVn05N3A==", "cpu": [ "x64" ], @@ -494,9 +356,9 @@ } }, "node_modules/@esbuild/freebsd-arm64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.18.20.tgz", - "integrity": "sha512-yqDQHy4QHevpMAaxhhIwYPMv1NECwOvIpGCZkECn8w2WFHXjEwrBn3CeNIYsibZ/iZEUemj++M26W3cNR5h+Tw==", + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.19.12.tgz", + "integrity": "sha512-4aRvFIXmwAcDBw9AueDQ2YnGmz5L6obe5kmPT8Vd+/+x/JMVKCgdcRwH6APrbpNXsPz+K653Qg8HB/oXvXVukA==", "cpu": [ "arm64" ], @@ -510,9 +372,9 @@ } }, "node_modules/@esbuild/freebsd-x64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.18.20.tgz", - "integrity": "sha512-tgWRPPuQsd3RmBZwarGVHZQvtzfEBOreNuxEMKFcd5DaDn2PbBxfwLcj4+aenoh7ctXcbXmOQIn8HI6mCSw5MQ==", + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.19.12.tgz", + "integrity": "sha512-EYoXZ4d8xtBoVN7CEwWY2IN4ho76xjYXqSXMNccFSx2lgqOG/1TBPW0yPx1bJZk94qu3tX0fycJeeQsKovA8gg==", "cpu": [ "x64" ], @@ -526,9 +388,9 @@ } }, "node_modules/@esbuild/linux-arm": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.18.20.tgz", - "integrity": "sha512-/5bHkMWnq1EgKr1V+Ybz3s1hWXok7mDFUMQ4cG10AfW3wL02PSZi5kFpYKrptDsgb2WAJIvRcDm+qIvXf/apvg==", + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.19.12.tgz", + "integrity": "sha512-J5jPms//KhSNv+LO1S1TX1UWp1ucM6N6XuL6ITdKWElCu8wXP72l9MM0zDTzzeikVyqFE6U8YAV9/tFyj0ti+w==", "cpu": [ "arm" ], @@ -559,9 +421,9 @@ } }, "node_modules/@esbuild/linux-ia32": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.18.20.tgz", - "integrity": "sha512-P4etWwq6IsReT0E1KHU40bOnzMHoH73aXp96Fs8TIT6z9Hu8G6+0SHSw9i2isWrD2nbx2qo5yUqACgdfVGx7TA==", + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.19.12.tgz", + "integrity": "sha512-Thsa42rrP1+UIGaWz47uydHSBOgTUnwBwNq59khgIwktK6x60Hivfbux9iNR0eHCHzOLjLMLfUMLCypBkZXMHA==", "cpu": [ "ia32" ], @@ -575,9 +437,9 @@ } }, "node_modules/@esbuild/linux-loong64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.18.20.tgz", - "integrity": "sha512-nXW8nqBTrOpDLPgPY9uV+/1DjxoQ7DoB2N8eocyq8I9XuqJ7BiAMDMf9n1xZM9TgW0J8zrquIb/A7s3BJv7rjg==", + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.19.12.tgz", + "integrity": "sha512-LiXdXA0s3IqRRjm6rV6XaWATScKAXjI4R4LoDlvO7+yQqFdlr1Bax62sRwkVvRIrwXxvtYEHHI4dm50jAXkuAA==", "cpu": [ "loong64" ], @@ -591,9 +453,9 @@ } }, "node_modules/@esbuild/linux-mips64el": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.18.20.tgz", - "integrity": "sha512-d5NeaXZcHp8PzYy5VnXV3VSd2D328Zb+9dEq5HE6bw6+N86JVPExrA6O68OPwobntbNJ0pzCpUFZTo3w0GyetQ==", + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.19.12.tgz", + "integrity": "sha512-fEnAuj5VGTanfJ07ff0gOA6IPsvrVHLVb6Lyd1g2/ed67oU1eFzL0r9WL7ZzscD+/N6i3dWumGE1Un4f7Amf+w==", "cpu": [ "mips64el" ], @@ -607,9 +469,9 @@ } }, "node_modules/@esbuild/linux-ppc64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.18.20.tgz", - "integrity": "sha512-WHPyeScRNcmANnLQkq6AfyXRFr5D6N2sKgkFo2FqguP44Nw2eyDlbTdZwd9GYk98DZG9QItIiTlFLHJHjxP3FA==", + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.19.12.tgz", + "integrity": "sha512-nYJA2/QPimDQOh1rKWedNOe3Gfc8PabU7HT3iXWtNUbRzXS9+vgB0Fjaqr//XNbd82mCxHzik2qotuI89cfixg==", "cpu": [ "ppc64" ], @@ -623,9 +485,9 @@ } }, "node_modules/@esbuild/linux-riscv64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.18.20.tgz", - "integrity": "sha512-WSxo6h5ecI5XH34KC7w5veNnKkju3zBRLEQNY7mv5mtBmrP/MjNBCAlsM2u5hDBlS3NGcTQpoBvRzqBcRtpq1A==", + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.19.12.tgz", + "integrity": "sha512-2MueBrlPQCw5dVJJpQdUYgeqIzDQgw3QtiAHUC4RBz9FXPrskyyU3VI1hw7C0BSKB9OduwSJ79FTCqtGMWqJHg==", "cpu": [ "riscv64" ], @@ -639,9 +501,9 @@ } }, "node_modules/@esbuild/linux-s390x": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.18.20.tgz", - "integrity": "sha512-+8231GMs3mAEth6Ja1iK0a1sQ3ohfcpzpRLH8uuc5/KVDFneH6jtAJLFGafpzpMRO6DzJ6AvXKze9LfFMrIHVQ==", + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.19.12.tgz", + "integrity": "sha512-+Pil1Nv3Umes4m3AZKqA2anfhJiVmNCYkPchwFJNEJN5QxmTs1uzyy4TvmDrCRNT2ApwSari7ZIgrPeUx4UZDg==", "cpu": [ "s390x" ], @@ -655,9 +517,9 @@ } }, "node_modules/@esbuild/linux-x64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.18.20.tgz", - "integrity": "sha512-UYqiqemphJcNsFEskc73jQ7B9jgwjWrSayxawS6UVFZGWrAAtkzjxSqnoclCXxWtfwLdzU+vTpcNYhpn43uP1w==", + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.19.12.tgz", + "integrity": "sha512-B71g1QpxfwBvNrfyJdVDexenDIt1CiDN1TIXLbhOw0KhJzE78KIFGX6OJ9MrtC0oOqMWf+0xop4qEU8JrJTwCg==", "cpu": [ "x64" ], @@ -671,9 +533,9 @@ } }, "node_modules/@esbuild/netbsd-x64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.18.20.tgz", - "integrity": "sha512-iO1c++VP6xUBUmltHZoMtCUdPlnPGdBom6IrO4gyKPFFVBKioIImVooR5I83nTew5UOYrk3gIJhbZh8X44y06A==", + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.19.12.tgz", + "integrity": "sha512-3ltjQ7n1owJgFbuC61Oj++XhtzmymoCihNFgT84UAmJnxJfm4sYCiSLTXZtE00VWYpPMYc+ZQmB6xbSdVh0JWA==", "cpu": [ "x64" ], @@ -687,9 +549,9 @@ } }, "node_modules/@esbuild/openbsd-x64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.18.20.tgz", - "integrity": "sha512-e5e4YSsuQfX4cxcygw/UCPIEP6wbIL+se3sxPdCiMbFLBWu0eiZOJ7WoD+ptCLrmjZBK1Wk7I6D/I3NglUGOxg==", + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.19.12.tgz", + "integrity": "sha512-RbrfTB9SWsr0kWmb9srfF+L933uMDdu9BIzdA7os2t0TXhCRjrQyCeOt6wVxr79CKD4c+p+YhCj31HBkYcXebw==", "cpu": [ "x64" ], @@ -703,9 +565,9 @@ } }, "node_modules/@esbuild/sunos-x64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.18.20.tgz", - "integrity": "sha512-kDbFRFp0YpTQVVrqUd5FTYmWo45zGaXe0X8E1G/LKFC0v8x0vWrhOWSLITcCn63lmZIxfOMXtCfti/RxN/0wnQ==", + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.19.12.tgz", + "integrity": "sha512-HKjJwRrW8uWtCQnQOz9qcU3mUZhTUQvi56Q8DPTLLB+DawoiQdjsYq+j+D3s9I8VFtDr+F9CjgXKKC4ss89IeA==", "cpu": [ "x64" ], @@ -719,9 +581,9 @@ } }, "node_modules/@esbuild/win32-arm64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.18.20.tgz", - "integrity": "sha512-ddYFR6ItYgoaq4v4JmQQaAI5s7npztfV4Ag6NrhiaW0RrnOXqBkgwZLofVTlq1daVTQNhtI5oieTvkRPfZrePg==", + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.19.12.tgz", + "integrity": "sha512-URgtR1dJnmGvX864pn1B2YUYNzjmXkuJOIqG2HdU62MVS4EHpU2946OZoTMnRUHklGtJdJZ33QfzdjGACXhn1A==", "cpu": [ "arm64" ], @@ -735,9 +597,9 @@ } }, "node_modules/@esbuild/win32-ia32": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.18.20.tgz", - "integrity": "sha512-Wv7QBi3ID/rROT08SABTS7eV4hX26sVduqDOTe1MvGMjNd3EjOz4b7zeexIR62GTIEKrfJXKL9LFxTYgkyeu7g==", + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.19.12.tgz", + "integrity": "sha512-+ZOE6pUkMOJfmxmBZElNOx72NKpIa/HFOMGzu8fqzQJ5kgf6aTGrcJaFsNiVMH4JKpMipyK+7k0n2UXN7a8YKQ==", "cpu": [ "ia32" ], @@ -751,9 +613,9 @@ } }, "node_modules/@esbuild/win32-x64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.18.20.tgz", - "integrity": "sha512-kTdfRcSiDfQca/y9QIkng02avJ+NCaQvrMejlsB3RRv5sE9rRoeBPISaZpKxHELzRxZyLvNts1P27W3wV+8geQ==", + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.19.12.tgz", + "integrity": "sha512-T1QyPSDCyMXaO3pzBkF96E8xMkiRYbUEZADd29SyPGabqxMViNoii+NcK7eWJAEoU6RZyEm5lVSIjTmcdoB9HA==", "cpu": [ "x64" ], @@ -1080,6 +942,7 @@ "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", "dev": true, + "peer": true, "engines": { "node": ">=6.0.0" } @@ -1109,7 +972,8 @@ "version": "1.4.15", "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", - "dev": true + "dev": true, + "peer": true }, "node_modules/@jridgewell/trace-mapping": { "version": "0.3.25", @@ -1348,15 +1212,6 @@ "form-data": "^4.0.0" } }, - "node_modules/@types/node-forge": { - "version": "1.3.11", - "resolved": "https://registry.npmjs.org/@types/node-forge/-/node-forge-1.3.11.tgz", - "integrity": "sha512-FQx220y22OKNTqaByeBGqHWYz4cl94tpcxeFdvBo3wjG6XPBuZ0BNgNZRV5J5TFmmcsJ4IzsLkmGRiQbnYsBEQ==", - "dev": true, - "dependencies": { - "@types/node": "*" - } - }, "node_modules/@types/normalize-package-data": { "version": "2.4.4", "resolved": "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.4.tgz", @@ -1888,15 +1743,6 @@ "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" } }, - "node_modules/acorn-walk": { - "version": "8.3.2", - "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.2.tgz", - "integrity": "sha512-cjkyv4OtNCIeqhHrfS81QWXoCBPExR/J62oyEqepVw8WaQeSqpW2uhuLPh1m9eWhDuOo/jUXVTlifvesOWp/4A==", - "dev": true, - "engines": { - "node": ">=0.4.0" - } - }, "node_modules/agent-base": { "version": "7.1.1", "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.1.tgz", @@ -2168,15 +2014,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/as-table": { - "version": "1.0.55", - "resolved": "https://registry.npmjs.org/as-table/-/as-table-1.0.55.tgz", - "integrity": "sha512-xvsWESUJn0JN421Xb9MQw6AsMHRCUknCe0Wjlxvjud80mU4E6hQf1A6NzQKcYNmYw62MfzEtXc+badstZP3JpQ==", - "dev": true, - "dependencies": { - "printable-characters": "^1.0.42" - } - }, "node_modules/asynckit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", @@ -2281,12 +2118,6 @@ "node": ">=8" } }, - "node_modules/blake3-wasm": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/blake3-wasm/-/blake3-wasm-2.1.5.tgz", - "integrity": "sha512-F1+K8EbfOZE49dtoPtmxUQrpXaBIl3ICvasLh+nJta0xkz+9kF/7uet9fLnwKqhDrmj6g+6K3Tw9yQPUg2ka5g==", - "dev": true - }, "node_modules/bplist-parser": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/bplist-parser/-/bplist-parser-0.2.0.tgz", @@ -2300,16 +2131,6 @@ "node": ">= 5.10.0" } }, - "node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0" - } - }, "node_modules/braces": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", @@ -2466,18 +2287,6 @@ "node": ">=6" } }, - "node_modules/camelcase": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-7.0.1.tgz", - "integrity": "sha512-xlx1yCK2Oc1APsPXDL2LdlNP6+uu8OCDdhOBSVT279M/S+y75O30C2VuD8T2ogdePBBl7PfPF4504tnLgX3zfw==", - "dev": true, - "engines": { - "node": ">=14.16" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/caniuse-lite": { "version": "1.0.30001612", "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001612.tgz", @@ -2499,16 +2308,6 @@ ], "peer": true }, - "node_modules/capnp-ts": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/capnp-ts/-/capnp-ts-0.7.0.tgz", - "integrity": "sha512-XKxXAC3HVPv7r674zP0VC3RTXz+/JKhfyw94ljvF80yynK6VkTnqE3jMuN8b3dUVmmc43TjyxjW4KTsmB3c86g==", - "dev": true, - "dependencies": { - "debug": "^4.3.1", - "tslib": "^2.2.0" - } - }, "node_modules/chalk": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", @@ -2752,12 +2551,6 @@ "type": "^1.0.1" } }, - "node_modules/data-uri-to-buffer": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-2.0.2.tgz", - "integrity": "sha512-ND9qDTLc6diwj+Xe5cdAgVTbLVdXbtxTJRXRhli8Mowuaan+0EJOtdqJ0QCHNSSPyoXGx9HX2/VMnKeC34AChA==", - "dev": true - }, "node_modules/debug": { "version": "4.3.4", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", @@ -3005,15 +2798,6 @@ "node": ">=0.4.0" } }, - "node_modules/difflib": { - "version": "0.2.4", - "resolved": "https://registry.npmjs.org/difflib/-/difflib-0.2.4.tgz", - "integrity": "sha512-9YVwmMb0wQHQNr5J9m6BSj6fk4pfGITGQOOs+D9Fl+INODWFOfvhIU1hNv6GgR1RBoC/9NJcwu77zShxV0kT7w==", - "dev": true, - "dependencies": { - "heap": ">= 0.2.0" - } - }, "node_modules/dir-glob": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", @@ -3053,46 +2837,24 @@ "url": "https://github.com/motdotla/dotenv?sponsor=1" } }, - "node_modules/dreamopt": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/dreamopt/-/dreamopt-0.8.0.tgz", - "integrity": "sha512-vyJTp8+mC+G+5dfgsY+r3ckxlz+QMX40VjPQsZc5gxVAxLmi64TBoVkP54A/pRAXMXsbu2GMMBrZPxNv23waMg==", - "dev": true, - "dependencies": { - "wordwrap": ">=0.0.2" - }, - "engines": { - "node": ">=0.4.0" - } - }, "node_modules/drizzle-kit": { - "version": "0.20.0", - "resolved": "https://registry.npmjs.org/drizzle-kit/-/drizzle-kit-0.20.0.tgz", - "integrity": "sha512-5z9wDIPMHXICe44JnM3OcGVjftu2k676IWYkvplJ4AOKhye4Hkf+uM73Dj+NWqmBtqbZ3A34Qt2QvhrLXvWMLw==", + "version": "0.22.4", + "resolved": "https://registry.npmjs.org/drizzle-kit/-/drizzle-kit-0.22.4.tgz", + "integrity": "sha512-jsiYGqHsbsP/GtM26y/bGK7je1ja+1H/RniCt1ovg2E7tMNraw6XdqKcjxHhb8FonCfDDjvwFgouRsZS46vrmA==", "dev": true, "dependencies": { - "@drizzle-team/studio": "^0.0.27", "@esbuild-kit/esm-loader": "^2.5.5", - "camelcase": "^7.0.1", - "chalk": "^5.2.0", - "commander": "^9.4.1", - "esbuild": "^0.18.6", - "esbuild-register": "^3.4.2", - "glob": "^8.1.0", - "hanji": "^0.0.5", - "json-diff": "0.9.0", - "minimatch": "^7.4.3", - "wrangler": "^3.7.0", - "zod": "^3.20.2" + "esbuild": "^0.19.7", + "esbuild-register": "^3.5.0" }, "bin": { - "drizzle-kit": "index.cjs" + "drizzle-kit": "bin.cjs" } }, "node_modules/drizzle-kit/node_modules/@esbuild/linux-arm64": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.18.20.tgz", - "integrity": "sha512-2YbscF+UL7SQAVIpnWvYwM+3LskyDmPhe31pE7/aoTMFKKzIc9lLbyGUpmmb8a8AixOL61sQ/mFh3jEjHYFvdA==", + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.19.12.tgz", + "integrity": "sha512-EoTjyYyLuVPfdPLsGVVVC8a0p1BFFvtpQDB/YLEhaXyf/5bczaGeN15QkR+O4S5LeJ92Tqotve7i1jn35qwvdA==", "cpu": [ "arm64" ], @@ -3105,22 +2867,10 @@ "node": ">=12" } }, - "node_modules/drizzle-kit/node_modules/chalk": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.3.0.tgz", - "integrity": "sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==", - "dev": true, - "engines": { - "node": "^12.17.0 || ^14.13 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, "node_modules/drizzle-kit/node_modules/esbuild": { - "version": "0.18.20", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.18.20.tgz", - "integrity": "sha512-ceqxoedUrcayh7Y7ZX6NdbbDzGROiyVBgC4PriJThBKSVPWnnFHZAkfI1lJT8QFkOwH4qOS2SJkS4wvpGl8BpA==", + "version": "0.19.12", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.19.12.tgz", + "integrity": "sha512-aARqgq8roFBj054KvQr5f1sFu0D65G+miZRCuJyJ0G13Zwx7vRar5Zhn2tkQNzIXcBrNVsv/8stehpj+GAjgbg==", "dev": true, "hasInstallScript": true, "bin": { @@ -3130,28 +2880,29 @@ "node": ">=12" }, "optionalDependencies": { - "@esbuild/android-arm": "0.18.20", - "@esbuild/android-arm64": "0.18.20", - "@esbuild/android-x64": "0.18.20", - "@esbuild/darwin-arm64": "0.18.20", - "@esbuild/darwin-x64": "0.18.20", - "@esbuild/freebsd-arm64": "0.18.20", - "@esbuild/freebsd-x64": "0.18.20", - "@esbuild/linux-arm": "0.18.20", - "@esbuild/linux-arm64": "0.18.20", - "@esbuild/linux-ia32": "0.18.20", - "@esbuild/linux-loong64": "0.18.20", - "@esbuild/linux-mips64el": "0.18.20", - "@esbuild/linux-ppc64": "0.18.20", - "@esbuild/linux-riscv64": "0.18.20", - "@esbuild/linux-s390x": "0.18.20", - "@esbuild/linux-x64": "0.18.20", - "@esbuild/netbsd-x64": "0.18.20", - "@esbuild/openbsd-x64": "0.18.20", - "@esbuild/sunos-x64": "0.18.20", - "@esbuild/win32-arm64": "0.18.20", - "@esbuild/win32-ia32": "0.18.20", - "@esbuild/win32-x64": "0.18.20" + "@esbuild/aix-ppc64": "0.19.12", + "@esbuild/android-arm": "0.19.12", + "@esbuild/android-arm64": "0.19.12", + "@esbuild/android-x64": "0.19.12", + "@esbuild/darwin-arm64": "0.19.12", + "@esbuild/darwin-x64": "0.19.12", + "@esbuild/freebsd-arm64": "0.19.12", + "@esbuild/freebsd-x64": "0.19.12", + "@esbuild/linux-arm": "0.19.12", + "@esbuild/linux-arm64": "0.19.12", + "@esbuild/linux-ia32": "0.19.12", + "@esbuild/linux-loong64": "0.19.12", + "@esbuild/linux-mips64el": "0.19.12", + "@esbuild/linux-ppc64": "0.19.12", + "@esbuild/linux-riscv64": "0.19.12", + "@esbuild/linux-s390x": "0.19.12", + "@esbuild/linux-x64": "0.19.12", + "@esbuild/netbsd-x64": "0.19.12", + "@esbuild/openbsd-x64": "0.19.12", + "@esbuild/sunos-x64": "0.19.12", + "@esbuild/win32-arm64": "0.19.12", + "@esbuild/win32-ia32": "0.19.12", + "@esbuild/win32-x64": "0.19.12" } }, "node_modules/drizzle-kit/node_modules/esbuild-register": { @@ -3167,37 +2918,25 @@ "esbuild": ">=0.12 <1" } }, - "node_modules/drizzle-kit/node_modules/minimatch": { - "version": "7.4.6", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-7.4.6.tgz", - "integrity": "sha512-sBz8G/YjVniEz6lKPNpKxXwazJe4c19fEfV2GDMX6AjFz+MX9uDWIZW8XreVhkFW3fkIdTv/gxWr/Kks5FFAVw==", - "dev": true, - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/drizzle-orm": { - "version": "0.29.5", - "resolved": "https://registry.npmjs.org/drizzle-orm/-/drizzle-orm-0.29.5.tgz", - "integrity": "sha512-jS3+uyzTz4P0Y2CICx8FmRQ1eplURPaIMWDn/yq6k4ShRFj9V7vlJk67lSf2kyYPzQ60GkkNGXcJcwrxZ6QCRw==", + "version": "0.31.1", + "resolved": "https://registry.npmjs.org/drizzle-orm/-/drizzle-orm-0.31.1.tgz", + "integrity": "sha512-hTbYne2XX3y6sV7WSxcPH6/vNSiQSUG9VZsFI27jBMCN0OT3Ok7ao3pIT5OMAqWkzJCRFgGjAaUeTAZWPgOKag==", "peerDependencies": { "@aws-sdk/client-rds-data": ">=3", "@cloudflare/workers-types": ">=3", + "@electric-sql/pglite": ">=0.1.1", "@libsql/client": "*", "@neondatabase/serverless": ">=0.1", + "@op-engineering/op-sqlite": ">=2", "@opentelemetry/api": "^1.4.1", "@planetscale/database": ">=1", "@types/better-sqlite3": "*", "@types/pg": "*", "@types/react": ">=18", "@types/sql.js": "*", - "@vercel/postgres": "*", + "@vercel/postgres": ">=0.8.0", + "@xata.io/client": "*", "better-sqlite3": ">=7", "bun-types": "*", "expo-sqlite": ">=13.2.0", @@ -3217,12 +2956,18 @@ "@cloudflare/workers-types": { "optional": true }, + "@electric-sql/pglite": { + "optional": true + }, "@libsql/client": { "optional": true }, "@neondatabase/serverless": { "optional": true }, + "@op-engineering/op-sqlite": { + "optional": true + }, "@opentelemetry/api": { "optional": true }, @@ -3244,6 +2989,9 @@ "@vercel/postgres": { "optional": true }, + "@xata.io/client": { + "optional": true + }, "better-sqlite3": { "optional": true }, @@ -4676,12 +4424,6 @@ "node": ">=4.0" } }, - "node_modules/estree-walker": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-0.6.1.tgz", - "integrity": "sha512-SqmZANLWS0mnatqbSfRP5g8OXZC12Fgg1IwNtLsyHDzJizORW4khDfjPqJZsemPWBB2uqykUah5YpQ6epsqC/w==", - "dev": true - }, "node_modules/esutils": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", @@ -4745,18 +4487,6 @@ "url": "https://github.com/sindresorhus/execa?sponsor=1" } }, - "node_modules/exit-hook": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/exit-hook/-/exit-hook-2.2.1.tgz", - "integrity": "sha512-eNTPlAD67BmP31LDINZ3U7HSF8l57TxOY2PmBJ1shpCvpnxBF93mWCE8YHBnXs8qiUZJc9WDcWIeC3a2HIAMfw==", - "dev": true, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/ext": { "version": "1.7.0", "resolved": "https://registry.npmjs.org/ext/-/ext-1.7.0.tgz", @@ -5325,16 +5055,6 @@ "node": ">=0.10.0" } }, - "node_modules/get-source": { - "version": "2.0.12", - "resolved": "https://registry.npmjs.org/get-source/-/get-source-2.0.12.tgz", - "integrity": "sha512-X5+4+iD+HoSeEED+uwrQ07BOQr0kEDFMVqqpBuI+RaZBpBpHCuXxo70bjar6f0b0u/DQJsJ7ssurpP0V60Az+w==", - "dev": true, - "dependencies": { - "data-uri-to-buffer": "^2.0.0", - "source-map": "^0.6.1" - } - }, "node_modules/get-stdin": { "version": "9.0.0", "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-9.0.0.tgz", @@ -5391,26 +5111,6 @@ "url": "https://github.com/privatenumber/get-tsconfig?sponsor=1" } }, - "node_modules/glob": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", - "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==", - "dev": true, - "license": "ISC", - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^5.0.1", - "once": "^1.3.0" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/glob-parent": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", @@ -5429,20 +5129,8 @@ "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz", "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==", "dev": true, - "license": "BSD-2-Clause" - }, - "node_modules/glob/node_modules/minimatch": { - "version": "5.1.6", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", - "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=10" - } + "license": "BSD-2-Clause", + "peer": true }, "node_modules/globals": { "version": "13.24.0", @@ -5610,17 +5298,6 @@ "node": ">=14.0.0" } }, - "node_modules/hanji": { - "version": "0.0.5", - "resolved": "https://registry.npmjs.org/hanji/-/hanji-0.0.5.tgz", - "integrity": "sha512-Abxw1Lq+TnYiL4BueXqMau222fPSPMFtya8HdpWsz/xVAhifXou71mPh/kY2+08RgFcVccjG3uZHs6K5HAe3zw==", - "dev": true, - "license": "ISC", - "dependencies": { - "lodash.throttle": "^4.1.1", - "sisteransi": "^1.0.5" - } - }, "node_modules/has": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/has/-/has-1.0.4.tgz", @@ -5716,13 +5393,6 @@ "node": ">= 0.4" } }, - "node_modules/heap": { - "version": "0.2.7", - "resolved": "https://registry.npmjs.org/heap/-/heap-0.2.7.tgz", - "integrity": "sha512-2bsegYkkHO+h/9MGbn6KWcE45cHZgPANo5LXF7EvWdT0yT2EguSVO1nDgU5c8+ZOPwp2vMNa7YFsJhVcDR9Sdg==", - "dev": true, - "license": "MIT" - }, "node_modules/hosted-git-info": { "version": "2.8.9", "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", @@ -6551,24 +6221,6 @@ "dev": true, "license": "MIT" }, - "node_modules/json-diff": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/json-diff/-/json-diff-0.9.0.tgz", - "integrity": "sha512-cVnggDrVkAAA3OvFfHpFEhOnmcsUpleEKq4d4O8sQWWSH40MBrWstKigVB1kGrgLWzuom+7rRdaCsnBD6VyObQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "cli-color": "^2.0.0", - "difflib": "~0.2.1", - "dreamopt": "~0.8.0" - }, - "bin": { - "json-diff": "bin/json-diff.js" - }, - "engines": { - "node": "*" - } - }, "node_modules/json-parse-even-better-errors": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", @@ -6750,13 +6402,6 @@ "dev": true, "license": "MIT" }, - "node_modules/lodash.throttle": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/lodash.throttle/-/lodash.throttle-4.1.1.tgz", - "integrity": "sha512-wIkUCfVKpVsWo3JSZlc+8MB5it+2AN5W8J7YVMST30UrvcQNZ1Okbj+rbVniijTWE6FGYy4XJq/rHkas8qJMLQ==", - "dev": true, - "license": "MIT" - }, "node_modules/log-symbols": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", @@ -6806,15 +6451,6 @@ "es5-ext": "~0.10.2" } }, - "node_modules/magic-string": { - "version": "0.25.9", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.9.tgz", - "integrity": "sha512-RmF0AsMzgt25qzqqLc1+MbHmhdx0ojF2Fvs4XnOqz2ZOBXzzkEwc/dJQZCYHAn7v1jbVOjAZfK8msRn4BxO4VQ==", - "dev": true, - "dependencies": { - "sourcemap-codec": "^1.4.8" - } - }, "node_modules/mailtrap": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/mailtrap/-/mailtrap-3.3.0.tgz", @@ -6914,18 +6550,6 @@ "node": ">=8.6" } }, - "node_modules/mime": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/mime/-/mime-3.0.0.tgz", - "integrity": "sha512-jSCU7/VB1loIWBZe14aEYHU/+1UMEHoaO7qxCOVJOw9GgH72VAWppxNcjU+x9a2k3GSIBXNKxXQFqRvvZ7vr3A==", - "dev": true, - "bin": { - "mime": "cli.js" - }, - "engines": { - "node": ">=10.0.0" - } - }, "node_modules/mime-db": { "version": "1.52.0", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", @@ -6977,32 +6601,6 @@ "node": ">=4" } }, - "node_modules/miniflare": { - "version": "3.20240512.0", - "resolved": "https://registry.npmjs.org/miniflare/-/miniflare-3.20240512.0.tgz", - "integrity": "sha512-X0PlKR0AROKpxFoJNmRtCMIuJxj+ngEcyTOlEokj2rAQ0TBwUhB4/1uiPvdI6ofW5NugPOD1uomAv+gLjwsLDQ==", - "dev": true, - "dependencies": { - "@cspotcode/source-map-support": "0.8.1", - "acorn": "^8.8.0", - "acorn-walk": "^8.2.0", - "capnp-ts": "^0.7.0", - "exit-hook": "^2.2.1", - "glob-to-regexp": "^0.4.1", - "stoppable": "^1.1.0", - "undici": "^5.28.2", - "workerd": "1.20240512.0", - "ws": "^8.11.0", - "youch": "^3.2.2", - "zod": "^3.20.6" - }, - "bin": { - "miniflare": "bootstrap.js" - }, - "engines": { - "node": ">=16.13" - } - }, "node_modules/minimatch": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", @@ -7052,15 +6650,6 @@ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "license": "MIT" }, - "node_modules/mustache": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/mustache/-/mustache-4.2.0.tgz", - "integrity": "sha512-71ippSywq5Yb7/tVYyGbkBggbU8H3u5Rz56fH60jGFgr8uHwxs+aSKeqmluIVzM0m0kB7xQjKS6qPfd0b2ZoqQ==", - "dev": true, - "bin": { - "mustache": "bin/mustache" - } - }, "node_modules/mylas": { "version": "2.1.13", "resolved": "https://registry.npmjs.org/mylas/-/mylas-2.1.13.tgz", @@ -7075,24 +6664,6 @@ "url": "https://github.com/sponsors/raouldeheer" } }, - "node_modules/nanoid": { - "version": "3.3.7", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz", - "integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "bin": { - "nanoid": "bin/nanoid.cjs" - }, - "engines": { - "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" - } - }, "node_modules/natural-compare": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", @@ -7152,15 +6723,6 @@ } } }, - "node_modules/node-forge": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-1.3.1.tgz", - "integrity": "sha512-dPEtOeMvF9VMcYV/1Wb8CPoVAXtp6MKMlcbAt4ddqmGqUJ6fQZFXkNZNkNlfevtNkGtaSoXf/vNNNSvgrdXwtA==", - "dev": true, - "engines": { - "node": ">= 6.13.0" - } - }, "node_modules/node-releases": { "version": "2.0.14", "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.14.tgz", @@ -7532,12 +7094,6 @@ "dev": true, "license": "MIT" }, - "node_modules/path-to-regexp": { - "version": "6.2.2", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-6.2.2.tgz", - "integrity": "sha512-GQX3SSMokngb36+whdpRXE+3f9V8UzyAorlYvOGx87ufGHehNTn5lCxrKtLyZ4Yl/wEKnNnr98ZzOwwDZV5ogw==", - "dev": true - }, "node_modules/path-type": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", @@ -7841,12 +7397,6 @@ "node": ">=6.0.0" } }, - "node_modules/printable-characters": { - "version": "1.0.42", - "resolved": "https://registry.npmjs.org/printable-characters/-/printable-characters-1.0.42.tgz", - "integrity": "sha512-dKp+C4iXWK4vVYZmYSd0KBH5F/h1HoZRsbJ82AVKRO3PEo8L4lBS/vLwhVtpwwuYcoIsVY+1JYKR268yn480uQ==", - "dev": true - }, "node_modules/process": { "version": "0.11.10", "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", @@ -8219,15 +7769,6 @@ "url": "https://github.com/privatenumber/resolve-pkg-maps?sponsor=1" } }, - "node_modules/resolve.exports": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/resolve.exports/-/resolve.exports-2.0.2.tgz", - "integrity": "sha512-X2UW6Nw3n/aMgDVy+0rSqgHlv39WZAlZrXCdnbyEiKm17DSqHX4MmQMaST3FbeWR5FTuRcUwYAziZajji0Y7mg==", - "dev": true, - "engines": { - "node": ">=10" - } - }, "node_modules/ret": { "version": "0.2.2", "resolved": "https://registry.npmjs.org/ret/-/ret-0.2.2.tgz", @@ -8290,36 +7831,6 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/rollup-plugin-inject": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rollup-plugin-inject/-/rollup-plugin-inject-3.0.2.tgz", - "integrity": "sha512-ptg9PQwzs3orn4jkgXJ74bfs5vYz1NCZlSQMBUA0wKcGp5i5pA1AO3fOUEte8enhGUC+iapTCzEWw2jEFFUO/w==", - "deprecated": "This package has been deprecated and is no longer maintained. Please use @rollup/plugin-inject.", - "dev": true, - "dependencies": { - "estree-walker": "^0.6.1", - "magic-string": "^0.25.3", - "rollup-pluginutils": "^2.8.1" - } - }, - "node_modules/rollup-plugin-node-polyfills": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/rollup-plugin-node-polyfills/-/rollup-plugin-node-polyfills-0.2.1.tgz", - "integrity": "sha512-4kCrKPTJ6sK4/gLL/U5QzVT8cxJcofO0OU74tnB19F40cmuAKSzH5/siithxlofFEjwvw1YAhPmbvGNA6jEroA==", - "dev": true, - "dependencies": { - "rollup-plugin-inject": "^3.0.0" - } - }, - "node_modules/rollup-pluginutils": { - "version": "2.8.2", - "resolved": "https://registry.npmjs.org/rollup-pluginutils/-/rollup-pluginutils-2.8.2.tgz", - "integrity": "sha512-EEp9NhnUkwY8aif6bxgovPHMoMoNr2FulJziTndpt5H9RdwC47GSGuII9XxpSdzVGM0GWrNPHV6ie1LTNJPaLQ==", - "dev": true, - "dependencies": { - "estree-walker": "^0.6.1" - } - }, "node_modules/run-applescript": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/run-applescript/-/run-applescript-5.0.0.tgz", @@ -8491,19 +8002,6 @@ "integrity": "sha512-6aU+Rwsezw7VR8/nyvKTx8QpWH9FrcYiXXlqC4z5d5XQBDRqtbfsRjnwGyqbi3gddNtWHuEk9OANUotL26qKUw==", "license": "BSD-3-Clause" }, - "node_modules/selfsigned": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/selfsigned/-/selfsigned-2.4.1.tgz", - "integrity": "sha512-th5B4L2U+eGLq1TVh7zNRGBapioSORUeymIydxgFpwww9d2qyKvtuPU2jJuHvYAwwqi2Y596QBL3eEqcPEYL8Q==", - "dev": true, - "dependencies": { - "@types/node-forge": "^1.3.0", - "node-forge": "^1" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/semver": { "version": "7.5.4", "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", @@ -8761,13 +8259,6 @@ "integrity": "sha512-CvlW7jmOhWzuqOqiJQ3rQVLMcREh0eel4IBnxDx2FAcK8g7qoJRQK4L1CPBASoCY6y8e6zuCy3f2g+HWdkzcMw==", "license": "BSD-3-Clause" }, - "node_modules/sisteransi": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", - "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==", - "dev": true, - "license": "MIT" - }, "node_modules/slash": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", @@ -8808,13 +8299,6 @@ "source-map": "^0.6.0" } }, - "node_modules/sourcemap-codec": { - "version": "1.4.8", - "resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz", - "integrity": "sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==", - "deprecated": "Please use @jridgewell/sourcemap-codec instead", - "dev": true - }, "node_modules/spdx-correct": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.2.0.tgz", @@ -8860,26 +8344,6 @@ "node": ">= 10.x" } }, - "node_modules/stacktracey": { - "version": "2.1.8", - "resolved": "https://registry.npmjs.org/stacktracey/-/stacktracey-2.1.8.tgz", - "integrity": "sha512-Kpij9riA+UNg7TnphqjH7/CzctQ/owJGNbFkfEeve4Z4uxT5+JapVLFXcsurIfN34gnTWZNJ/f7NMG0E8JDzTw==", - "dev": true, - "dependencies": { - "as-table": "^1.0.36", - "get-source": "^2.0.12" - } - }, - "node_modules/stoppable": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/stoppable/-/stoppable-1.1.0.tgz", - "integrity": "sha512-KXDYZ9dszj6bzvnEMRYvxgeTHU74QBFL54XKtP3nyMuJ81CFYtABZ3bAzL2EdFUaEwJOBOgENyFj3R7oTzDyyw==", - "dev": true, - "engines": { - "node": ">=4", - "npm": ">=6" - } - }, "node_modules/stream-wormhole": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/stream-wormhole/-/stream-wormhole-1.1.0.tgz", @@ -9452,18 +8916,6 @@ "node": ">=0.10.0" } }, - "node_modules/undici": { - "version": "5.28.4", - "resolved": "https://registry.npmjs.org/undici/-/undici-5.28.4.tgz", - "integrity": "sha512-72RFADWFqKmUb2hmmvNODKL3p9hcB6Gt2DOQMis1SEBaV6a4MH8soBvzg+95CYhCKPFedut2JY9bMfrDl9D23g==", - "dev": true, - "dependencies": { - "@fastify/busboy": "^2.0.0" - }, - "engines": { - "node": ">=14.0" - } - }, "node_modules/undici-types": { "version": "5.26.5", "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", @@ -9757,100 +9209,12 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/wordwrap": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", - "integrity": "sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==", - "dev": true, - "license": "MIT" - }, - "node_modules/workerd": { - "version": "1.20240512.0", - "resolved": "https://registry.npmjs.org/workerd/-/workerd-1.20240512.0.tgz", - "integrity": "sha512-VUBmR1PscAPHEE0OF/G2K7/H1gnr9aDWWZzdkIgWfNKkv8dKFCT75H+GJtUHjfwqz3rYCzaNZmatSXOpLGpF8A==", - "dev": true, - "hasInstallScript": true, - "bin": { - "workerd": "bin/workerd" - }, - "engines": { - "node": ">=16" - }, - "optionalDependencies": { - "@cloudflare/workerd-darwin-64": "1.20240512.0", - "@cloudflare/workerd-darwin-arm64": "1.20240512.0", - "@cloudflare/workerd-linux-64": "1.20240512.0", - "@cloudflare/workerd-linux-arm64": "1.20240512.0", - "@cloudflare/workerd-windows-64": "1.20240512.0" - } - }, - "node_modules/wrangler": { - "version": "3.57.1", - "resolved": "https://registry.npmjs.org/wrangler/-/wrangler-3.57.1.tgz", - "integrity": "sha512-M8YnWUwdrb8AFiRePtVnzlDn02OX4osWvdl8oVh6eyZqqkqXYg7lwlYBr14Qj92pMN4JvMBmDZoukkYHvwpJRg==", - "dev": true, - "dependencies": { - "@cloudflare/kv-asset-handler": "0.3.2", - "@esbuild-plugins/node-globals-polyfill": "^0.2.3", - "@esbuild-plugins/node-modules-polyfill": "^0.2.2", - "blake3-wasm": "^2.1.5", - "chokidar": "^3.5.3", - "esbuild": "0.17.19", - "miniflare": "3.20240512.0", - "nanoid": "^3.3.3", - "path-to-regexp": "^6.2.0", - "resolve": "^1.22.8", - "resolve.exports": "^2.0.2", - "selfsigned": "^2.0.1", - "source-map": "0.6.1", - "xxhash-wasm": "^1.0.1" - }, - "bin": { - "wrangler": "bin/wrangler.js", - "wrangler2": "bin/wrangler.js" - }, - "engines": { - "node": ">=16.17.0" - }, - "optionalDependencies": { - "fsevents": "~2.3.2" - }, - "peerDependencies": { - "@cloudflare/workers-types": "^4.20240512.0" - }, - "peerDependenciesMeta": { - "@cloudflare/workers-types": { - "optional": true - } - } - }, "node_modules/wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", "license": "ISC" }, - "node_modules/ws": { - "version": "8.17.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.17.0.tgz", - "integrity": "sha512-uJq6108EgZMAl20KagGkzCKfMEjxmKvZHG7Tlq0Z6nOky7YF7aq4mOx6xK8TJ/i1LeK4Qus7INktacctDgY8Ow==", - "dev": true, - "engines": { - "node": ">=10.0.0" - }, - "peerDependencies": { - "bufferutil": "^4.0.1", - "utf-8-validate": ">=5.0.2" - }, - "peerDependenciesMeta": { - "bufferutil": { - "optional": true - }, - "utf-8-validate": { - "optional": true - } - } - }, "node_modules/xo": { "version": "0.56.0", "resolved": "https://registry.npmjs.org/xo/-/xo-0.56.0.tgz", @@ -10061,12 +9425,6 @@ "node": ">=0.4" } }, - "node_modules/xxhash-wasm": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/xxhash-wasm/-/xxhash-wasm-1.0.2.tgz", - "integrity": "sha512-ibF0Or+FivM9lNrg+HGJfVX8WJqgo+kCLDc4vx6xMeTce7Aj+DLttKbxxRR/gNLSAelRc1omAPlJ77N/Jem07A==", - "dev": true - }, "node_modules/yallist": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", @@ -10086,17 +9444,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/youch": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/youch/-/youch-3.3.3.tgz", - "integrity": "sha512-qSFXUk3UZBLfggAW3dJKg0BMblG5biqSF8M34E06o5CSsZtH92u9Hqmj2RzGiHDi64fhe83+4tENFP2DB6t6ZA==", - "dev": true, - "dependencies": { - "cookie": "^0.5.0", - "mustache": "^4.2.0", - "stacktracey": "^2.1.8" - } - }, "node_modules/zod": { "version": "3.22.4", "resolved": "https://registry.npmjs.org/zod/-/zod-3.22.4.tgz", diff --git a/package.json b/package.json index f63f8b6..61f0e70 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,7 @@ "@types/stripe-v3": "^3.1.33", "cli-color": "^2.0.3", "dotenv": "^16.3.1", - "drizzle-kit": "^0.20.0", + "drizzle-kit": "^0.22.4", "prettier": "^3.1.1", "tsc-alias": "^1.8.8", "tsx": "^3.12.7", @@ -33,7 +33,7 @@ "@fastify/cors": "^8.4.2", "@fastify/multipart": "^8.2.0", "@fastify/oauth2": "^7.8.0", - "drizzle-orm": "^0.29.5", + "drizzle-orm": "^0.31.1", "fastify": "^4.25.0", "fastify-plugin": "^4.5.1", "googleapis": "^134.0.0", diff --git a/src/db/index.js b/src/db/index.js index 17d3b39..0fffc79 100644 --- a/src/db/index.js +++ b/src/db/index.js @@ -21,14 +21,14 @@ export const initDb = async () => { schema, }); - // await migrate(db, { - // migrationsFolder: "./src/db/migrations", - // }) - // .then(() => { - // Logger.info("INIT", "Migrated database"); - // }) - // .catch((error) => { - // Logger.error("INIT", `Failed to migrate database ${String(error)}`); - // throw new Error(`Failed to migrate database ${String(error)}`); - // }); + await migrate(db, { + migrationsFolder: "./src/db/migrations", + }) + .then(() => { + Logger.info("INIT", "Migrated database"); + }) + .catch((error) => { + Logger.error("INIT", `Failed to migrate database ${String(error)}`); + throw new Error(`Failed to migrate database ${String(error)}`); + }); }; diff --git a/src/db/migrations/0000_rapid_moira_mactaggert.sql b/src/db/migrations/0000_gorgeous_amazoness.sql similarity index 64% rename from src/db/migrations/0000_rapid_moira_mactaggert.sql rename to src/db/migrations/0000_gorgeous_amazoness.sql index 483e5d3..1064ae3 100644 --- a/src/db/migrations/0000_rapid_moira_mactaggert.sql +++ b/src/db/migrations/0000_gorgeous_amazoness.sql @@ -1,16 +1,17 @@ +-- Current sql file was generated after introspecting the database +-- If you want to run this migration please uncomment this code before executing migrations +/* DO $$ BEGIN - CREATE TYPE "subscription_tier" AS ENUM('enterprise', 'pro', 'basic', 'free'); + CREATE TYPE "public"."subscription_tier" AS ENUM('free', 'basic', 'pro', 'enterprise'); EXCEPTION WHEN duplicate_object THEN null; END $$; --> statement-breakpoint -CREATE TABLE IF NOT EXISTS "sites" ( - "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL, - "user_id" uuid, - "name" text, - "primary_color_hex" varchar(6) DEFAULT 'c4ced4'::character varying NOT NULL, - "secondary_color_hex" varchar(6) DEFAULT '27251f'::character varying NOT NULL, - "text_color_hex" varchar(6) DEFAULT 'ffffff'::character varying NOT NULL +CREATE TABLE IF NOT EXISTS "signups" ( + "email" text NOT NULL, + "site_id" uuid NOT NULL, + "created_at" timestamp DEFAULT now() NOT NULL, + "source" text ); --> statement-breakpoint CREATE TABLE IF NOT EXISTS "users" ( @@ -25,16 +26,23 @@ CREATE TABLE IF NOT EXISTS "users" ( "stripe_id" text ); --> statement-breakpoint -CREATE TABLE IF NOT EXISTS "articles" ( +CREATE TABLE IF NOT EXISTS "sites" ( "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL, - "site_id" uuid, - "content" text, - "source_video_id" text, - "title" text, - "seo_slug" text, - "created_at" timestamp DEFAULT now(), - "is_public" boolean DEFAULT true, - "views" integer DEFAULT 0 + "user_id" uuid, + "name" text, + "primary_color_hex" varchar(6) DEFAULT 'c4ced4'::character varying NOT NULL, + "secondary_color_hex" varchar(6) DEFAULT '27251f'::character varying NOT NULL, + "text_color_hex" varchar(6) DEFAULT 'ffffff'::character varying NOT NULL, + "title" text DEFAULT 'The best blog in the world!', + "subtitle" text DEFAULT 'Some extra info about the best blog in the world!', + "domain" text, + "send_freebie" boolean DEFAULT false, + "freebie_name" text DEFAULT '', + "freebie_url" text DEFAULT '', + "freebie_text" text DEFAULT '', + "freebie_image_url" text DEFAULT '', + "subdomain_slug" text, + "social_medias" jsonb ); --> statement-breakpoint CREATE TABLE IF NOT EXISTS "sessions" ( @@ -45,11 +53,19 @@ CREATE TABLE IF NOT EXISTS "sessions" ( "expires_at" timestamp ); --> statement-breakpoint -CREATE TABLE IF NOT EXISTS "signups" ( - "email" text NOT NULL, - "site_id" uuid NOT NULL, - "created_at" timestamp DEFAULT now() NOT NULL, - "source" text +CREATE TABLE IF NOT EXISTS "articles" ( + "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL, + "site_id" uuid, + "content" text, + "source_video_id" text, + "title" text, + "seo_slug" text, + "created_at" timestamp DEFAULT now(), + "is_public" boolean DEFAULT false, + "views" integer DEFAULT 0, + "seo_title" text, + "seo_description" text, + "excerp" text ); --> statement-breakpoint CREATE TABLE IF NOT EXISTS "waitlist" ( @@ -57,25 +73,27 @@ CREATE TABLE IF NOT EXISTS "waitlist" ( ); --> statement-breakpoint DO $$ BEGIN - ALTER TABLE "sites" ADD CONSTRAINT "sites_user_id_users_id_fk" FOREIGN KEY ("user_id") REFERENCES "users"("id") ON DELETE no action ON UPDATE no action; + ALTER TABLE "signups" ADD CONSTRAINT "signups_site_id_sites_id_fk" FOREIGN KEY ("site_id") REFERENCES "public"."sites"("id") ON DELETE no action ON UPDATE no action; EXCEPTION WHEN duplicate_object THEN null; END $$; --> statement-breakpoint DO $$ BEGIN - ALTER TABLE "articles" ADD CONSTRAINT "articles_site_id_sites_id_fk" FOREIGN KEY ("site_id") REFERENCES "sites"("id") ON DELETE no action ON UPDATE no action; + ALTER TABLE "sites" ADD CONSTRAINT "sites_user_id_users_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."users"("id") ON DELETE no action ON UPDATE no action; EXCEPTION WHEN duplicate_object THEN null; END $$; --> statement-breakpoint DO $$ BEGIN - ALTER TABLE "sessions" ADD CONSTRAINT "sessions_user_id_users_id_fk" FOREIGN KEY ("user_id") REFERENCES "users"("id") ON DELETE no action ON UPDATE no action; + ALTER TABLE "sessions" ADD CONSTRAINT "sessions_user_id_users_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."users"("id") ON DELETE no action ON UPDATE no action; EXCEPTION WHEN duplicate_object THEN null; END $$; --> statement-breakpoint DO $$ BEGIN - ALTER TABLE "signups" ADD CONSTRAINT "signups_site_id_sites_id_fk" FOREIGN KEY ("site_id") REFERENCES "sites"("id") ON DELETE no action ON UPDATE no action; + ALTER TABLE "articles" ADD CONSTRAINT "articles_site_id_sites_id_fk" FOREIGN KEY ("site_id") REFERENCES "public"."sites"("id") ON DELETE no action ON UPDATE no action; EXCEPTION WHEN duplicate_object THEN null; -END $$; \ No newline at end of file +END $$; + +*/ \ No newline at end of file diff --git a/src/db/migrations/0001_dizzy_preak.sql b/src/db/migrations/0001_big_sugar_man.sql similarity index 57% rename from src/db/migrations/0001_dizzy_preak.sql rename to src/db/migrations/0001_big_sugar_man.sql index 75a0838..3ab7b00 100644 --- a/src/db/migrations/0001_dizzy_preak.sql +++ b/src/db/migrations/0001_big_sugar_man.sql @@ -1,4 +1,5 @@ ALTER TABLE "sites" ALTER COLUMN "primary_color_hex" SET DEFAULT 'c4ced4';--> statement-breakpoint ALTER TABLE "sites" ALTER COLUMN "secondary_color_hex" SET DEFAULT '27251f';--> statement-breakpoint ALTER TABLE "sites" ALTER COLUMN "text_color_hex" SET DEFAULT 'ffffff';--> statement-breakpoint -ALTER TABLE "articles" ADD CONSTRAINT "articles_site_id_seo_slug_unique" UNIQUE NULLS NOT DISTINCT("site_id","seo_slug"); \ No newline at end of file +ALTER TABLE "sites" ALTER COLUMN "domain" SET DEFAULT null;--> statement-breakpoint +CREATE UNIQUE INDEX IF NOT EXISTS "domainUniqueIndex" ON "sites" USING btree ((lower("domain"))) WHERE "sites"."domain" IS NOT NULL; \ No newline at end of file diff --git a/src/db/migrations/0002_bent_warpath.sql b/src/db/migrations/0002_bent_warpath.sql deleted file mode 100644 index 44b7ae0..0000000 --- a/src/db/migrations/0002_bent_warpath.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE "articles" DROP CONSTRAINT "articles_site_id_seo_slug_unique"; \ No newline at end of file diff --git a/src/db/migrations/0003_past_mikhail_rasputin.sql b/src/db/migrations/0003_past_mikhail_rasputin.sql deleted file mode 100644 index c86c9b2..0000000 --- a/src/db/migrations/0003_past_mikhail_rasputin.sql +++ /dev/null @@ -1,2 +0,0 @@ -ALTER TABLE "sites" ADD COLUMN "domain" text;--> statement-breakpoint -ALTER TABLE "sites" ADD CONSTRAINT "sites_domain_unique" UNIQUE("domain"); \ No newline at end of file diff --git a/src/db/migrations/0004_worthless_meltdown.sql b/src/db/migrations/0004_worthless_meltdown.sql deleted file mode 100644 index 1068950..0000000 --- a/src/db/migrations/0004_worthless_meltdown.sql +++ /dev/null @@ -1,4 +0,0 @@ -ALTER TABLE "sites" ADD COLUMN "send_freebie" boolean;--> statement-breakpoint -ALTER TABLE "sites" ADD COLUMN "freebie_url" text;--> statement-breakpoint -ALTER TABLE "sites" ADD COLUMN "freebie_text" text;--> statement-breakpoint -ALTER TABLE "sites" ADD COLUMN "freebie_image_url" text; \ No newline at end of file diff --git a/src/db/migrations/0005_purple_firebird.sql b/src/db/migrations/0005_purple_firebird.sql deleted file mode 100644 index 870fb1d..0000000 --- a/src/db/migrations/0005_purple_firebird.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE "sites" ADD COLUMN "freebie_name" text; \ No newline at end of file diff --git a/src/db/migrations/0006_same_bulldozer.sql b/src/db/migrations/0006_same_bulldozer.sql deleted file mode 100644 index 450a154..0000000 --- a/src/db/migrations/0006_same_bulldozer.sql +++ /dev/null @@ -1,2 +0,0 @@ -ALTER TABLE "sites" ADD COLUMN "title" text;--> statement-breakpoint -ALTER TABLE "sites" ADD COLUMN "subtitle" text; \ No newline at end of file diff --git a/src/db/migrations/0007_shiny_colossus.sql b/src/db/migrations/0007_shiny_colossus.sql deleted file mode 100644 index 1a4ef59..0000000 --- a/src/db/migrations/0007_shiny_colossus.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE "sites" ADD COLUMN "subdomain_slug" text NOT NULL; \ No newline at end of file diff --git a/src/db/migrations/0008_long_chameleon.sql b/src/db/migrations/0008_long_chameleon.sql deleted file mode 100644 index 5b9dcec..0000000 --- a/src/db/migrations/0008_long_chameleon.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE "sites" ALTER COLUMN "subdomain_slug" DROP NOT NULL; \ No newline at end of file diff --git a/src/db/migrations/0009_aromatic_rachel_grey.sql b/src/db/migrations/0009_aromatic_rachel_grey.sql deleted file mode 100644 index 41c958f..0000000 --- a/src/db/migrations/0009_aromatic_rachel_grey.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE "sites" ADD COLUMN "social_medias" jsonb; \ No newline at end of file diff --git a/src/db/migrations/0015_special_weapon_omega.sql b/src/db/migrations/0015_special_weapon_omega.sql deleted file mode 100644 index d85fa58..0000000 --- a/src/db/migrations/0015_special_weapon_omega.sql +++ /dev/null @@ -1,12 +0,0 @@ -ALTER TABLE "articles" ALTER COLUMN "is_public" SET DEFAULT false;--> statement-breakpoint -ALTER TABLE "sites" ALTER COLUMN "title" SET DEFAULT 'The best blog in the world!';--> statement-breakpoint -ALTER TABLE "sites" ALTER COLUMN "subtitle" SET DEFAULT 'Some extra info about the best blog in the world!';--> statement-breakpoint -ALTER TABLE "sites" ALTER COLUMN "domain" SET DEFAULT '';--> statement-breakpoint -ALTER TABLE "sites" ALTER COLUMN "send_freebie" SET DEFAULT false;--> statement-breakpoint -ALTER TABLE "sites" ALTER COLUMN "freebie_name" SET DEFAULT '';--> statement-breakpoint -ALTER TABLE "sites" ALTER COLUMN "freebie_url" SET DEFAULT '';--> statement-breakpoint -ALTER TABLE "sites" ALTER COLUMN "freebie_text" SET DEFAULT '';--> statement-breakpoint -ALTER TABLE "sites" ALTER COLUMN "freebie_image_url" SET DEFAULT '';--> statement-breakpoint -ALTER TABLE "articles" ADD COLUMN "seo_title" text;--> statement-breakpoint -ALTER TABLE "articles" ADD COLUMN "seo_description" text;--> statement-breakpoint -ALTER TABLE "articles" ADD COLUMN "excerp" text; \ No newline at end of file diff --git a/src/db/migrations/meta/0000_snapshot.json b/src/db/migrations/meta/0000_snapshot.json index b63d533..5aab939 100644 --- a/src/db/migrations/meta/0000_snapshot.json +++ b/src/db/migrations/meta/0000_snapshot.json @@ -1,62 +1,48 @@ { "id": "00000000-0000-0000-0000-000000000000", "prevId": "", - "version": "5", - "dialect": "pg", + "version": "7", + "dialect": "postgresql", "tables": { - "sites": { - "name": "sites", + "public.signups": { + "name": "signups", "schema": "", "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "gen_random_uuid()" + "email": { + "name": "email", + "type": "text", + "primaryKey": false, + "notNull": true }, - "user_id": { - "name": "user_id", + "site_id": { + "name": "site_id", "type": "uuid", "primaryKey": false, - "notNull": false + "notNull": true }, - "name": { - "name": "name", + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "source": { + "name": "source", "type": "text", "primaryKey": false, "notNull": false - }, - "primary_color_hex": { - "name": "primary_color_hex", - "type": "varchar(6)", - "primaryKey": false, - "notNull": true, - "default": "'c4ced4'::character varying" - }, - "secondary_color_hex": { - "name": "secondary_color_hex", - "type": "varchar(6)", - "primaryKey": false, - "notNull": true, - "default": "'27251f'::character varying" - }, - "text_color_hex": { - "name": "text_color_hex", - "type": "varchar(6)", - "primaryKey": false, - "notNull": true, - "default": "'ffffff'::character varying" } }, "indexes": {}, "foreignKeys": { - "sites_user_id_users_id_fk": { - "name": "sites_user_id_users_id_fk", - "tableFrom": "sites", - "tableTo": "users", + "signups_site_id_sites_id_fk": { + "name": "signups_site_id_sites_id_fk", + "tableFrom": "signups", + "tableTo": "sites", + "schemaTo": "public", "columnsFrom": [ - "user_id" + "site_id" ], "columnsTo": [ "id" @@ -68,7 +54,7 @@ "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "users": { + "public.users": { "name": "users", "schema": "", "columns": { @@ -112,6 +98,7 @@ "subscription_tier": { "name": "subscription_tier", "type": "subscription_tier", + "typeSchema": "public", "primaryKey": false, "notNull": true, "default": "'free'" @@ -135,7 +122,195 @@ "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "articles": { + "public.sites": { + "name": "sites", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "user_id": { + "name": "user_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "primary_color_hex": { + "name": "primary_color_hex", + "type": "varchar(6)", + "primaryKey": false, + "notNull": true, + "default": "'c4ced4'::character varying" + }, + "secondary_color_hex": { + "name": "secondary_color_hex", + "type": "varchar(6)", + "primaryKey": false, + "notNull": true, + "default": "'27251f'::character varying" + }, + "text_color_hex": { + "name": "text_color_hex", + "type": "varchar(6)", + "primaryKey": false, + "notNull": true, + "default": "'ffffff'::character varying" + }, + "title": { + "name": "title", + "type": "text", + "primaryKey": false, + "notNull": false, + "default": "'The best blog in the world!'" + }, + "subtitle": { + "name": "subtitle", + "type": "text", + "primaryKey": false, + "notNull": false, + "default": "'Some extra info about the best blog in the world!'" + }, + "domain": { + "name": "domain", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "send_freebie": { + "name": "send_freebie", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "freebie_name": { + "name": "freebie_name", + "type": "text", + "primaryKey": false, + "notNull": false, + "default": "''" + }, + "freebie_url": { + "name": "freebie_url", + "type": "text", + "primaryKey": false, + "notNull": false, + "default": "''" + }, + "freebie_text": { + "name": "freebie_text", + "type": "text", + "primaryKey": false, + "notNull": false, + "default": "''" + }, + "freebie_image_url": { + "name": "freebie_image_url", + "type": "text", + "primaryKey": false, + "notNull": false, + "default": "''" + }, + "subdomain_slug": { + "name": "subdomain_slug", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "social_medias": { + "name": "social_medias", + "type": "jsonb", + "primaryKey": false, + "notNull": false + } + }, + "indexes": {}, + "foreignKeys": { + "sites_user_id_users_id_fk": { + "name": "sites_user_id_users_id_fk", + "tableFrom": "sites", + "tableTo": "users", + "schemaTo": "public", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "public.sessions": { + "name": "sessions", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "user_id": { + "name": "user_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "google_access_token": { + "name": "google_access_token", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "google_refresh_token": { + "name": "google_refresh_token", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "expires_at": { + "name": "expires_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + } + }, + "indexes": {}, + "foreignKeys": { + "sessions_user_id_users_id_fk": { + "name": "sessions_user_id_users_id_fk", + "tableFrom": "sessions", + "tableTo": "users", + "schemaTo": "public", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "public.articles": { "name": "articles", "schema": "", "columns": { @@ -188,7 +363,7 @@ "type": "boolean", "primaryKey": false, "notNull": false, - "default": true + "default": false }, "views": { "name": "views", @@ -196,6 +371,24 @@ "primaryKey": false, "notNull": false, "default": 0 + }, + "seo_title": { + "name": "seo_title", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "seo_description": { + "name": "seo_description", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "excerp": { + "name": "excerp", + "type": "text", + "primaryKey": false, + "notNull": false } }, "indexes": {}, @@ -204,6 +397,7 @@ "name": "articles_site_id_sites_id_fk", "tableFrom": "articles", "tableTo": "sites", + "schemaTo": "public", "columnsFrom": [ "site_id" ], @@ -217,111 +411,7 @@ "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "sessions": { - "name": "sessions", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "gen_random_uuid()" - }, - "user_id": { - "name": "user_id", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "google_access_token": { - "name": "google_access_token", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "google_refresh_token": { - "name": "google_refresh_token", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "expires_at": { - "name": "expires_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": { - "sessions_user_id_users_id_fk": { - "name": "sessions_user_id_users_id_fk", - "tableFrom": "sessions", - "tableTo": "users", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "signups": { - "name": "signups", - "schema": "", - "columns": { - "email": { - "name": "email", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "site_id": { - "name": "site_id", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - }, - "source": { - "name": "source", - "type": "text", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": { - "signups_site_id_sites_id_fk": { - "name": "signups_site_id_sites_id_fk", - "tableFrom": "signups", - "tableTo": "sites", - "columnsFrom": [ - "site_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "waitlist": { + "public.waitlist": { "name": "waitlist", "schema": "", "columns": { @@ -339,14 +429,15 @@ } }, "enums": { - "subscription_tier": { + "public.subscription_tier": { "name": "subscription_tier", - "values": { - "enterprise": "enterprise", - "pro": "pro", - "basic": "basic", - "free": "free" - } + "values": [ + "free", + "basic", + "pro", + "enterprise" + ], + "schema": "public" } }, "schemas": {}, @@ -354,5 +445,8 @@ "schemas": {}, "tables": {}, "columns": {} + }, + "internal": { + "tables": {} } } \ No newline at end of file diff --git a/src/db/migrations/meta/0001_snapshot.json b/src/db/migrations/meta/0001_snapshot.json index 1dc22ae..484b1fb 100644 --- a/src/db/migrations/meta/0001_snapshot.json +++ b/src/db/migrations/meta/0001_snapshot.json @@ -1,10 +1,10 @@ { - "id": "c1509dda-926d-4cd4-b876-3ec5dfca0729", + "id": "4bc82cd1-68f2-4b03-bdc9-058a4f3ff395", "prevId": "00000000-0000-0000-0000-000000000000", - "version": "5", - "dialect": "pg", + "version": "7", + "dialect": "postgresql", "tables": { - "articles": { + "public.articles": { "name": "articles", "schema": "", "columns": { @@ -50,7 +50,7 @@ "type": "boolean", "primaryKey": false, "notNull": false, - "default": true + "default": false }, "views": { "name": "views", @@ -59,6 +59,24 @@ "notNull": false, "default": 0 }, + "seo_title": { + "name": "seo_title", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "seo_description": { + "name": "seo_description", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "excerp": { + "name": "excerp", + "type": "text", + "primaryKey": false, + "notNull": false + }, "created_at": { "name": "created_at", "type": "timestamp", @@ -84,18 +102,9 @@ } }, "compositePrimaryKeys": {}, - "uniqueConstraints": { - "articles_site_id_seo_slug_unique": { - "name": "articles_site_id_seo_slug_unique", - "nullsNotDistinct": true, - "columns": [ - "site_id", - "seo_slug" - ] - } - } + "uniqueConstraints": {} }, - "sessions": { + "public.sessions": { "name": "sessions", "schema": "", "columns": { @@ -150,7 +159,7 @@ "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "signups": { + "public.signups": { "name": "signups", "schema": "", "columns": { @@ -199,7 +208,7 @@ "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "sites": { + "public.sites": { "name": "sites", "schema": "", "columns": { @@ -242,9 +251,94 @@ "primaryKey": false, "notNull": true, "default": "'ffffff'" + }, + "title": { + "name": "title", + "type": "text", + "primaryKey": false, + "notNull": false, + "default": "'The best blog in the world!'" + }, + "subtitle": { + "name": "subtitle", + "type": "text", + "primaryKey": false, + "notNull": false, + "default": "'Some extra info about the best blog in the world!'" + }, + "domain": { + "name": "domain", + "type": "text", + "primaryKey": false, + "notNull": false, + "default": null + }, + "send_freebie": { + "name": "send_freebie", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "freebie_name": { + "name": "freebie_name", + "type": "text", + "primaryKey": false, + "notNull": false, + "default": "''" + }, + "freebie_url": { + "name": "freebie_url", + "type": "text", + "primaryKey": false, + "notNull": false, + "default": "''" + }, + "freebie_text": { + "name": "freebie_text", + "type": "text", + "primaryKey": false, + "notNull": false, + "default": "''" + }, + "freebie_image_url": { + "name": "freebie_image_url", + "type": "text", + "primaryKey": false, + "notNull": false, + "default": "''" + }, + "subdomain_slug": { + "name": "subdomain_slug", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "social_medias": { + "name": "social_medias", + "type": "jsonb", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "domainUniqueIndex": { + "name": "domainUniqueIndex", + "columns": [ + { + "expression": "(lower(\"domain\"))", + "asc": true, + "isExpression": true, + "nulls": "last" + } + ], + "isUnique": true, + "where": "\"sites\".\"domain\" IS NOT NULL", + "concurrently": false, + "method": "btree", + "with": {} } }, - "indexes": {}, "foreignKeys": { "sites_user_id_users_id_fk": { "name": "sites_user_id_users_id_fk", @@ -263,7 +357,7 @@ "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "users": { + "public.users": { "name": "users", "schema": "", "columns": { @@ -313,6 +407,7 @@ "subscription_tier": { "name": "subscription_tier", "type": "subscription_tier", + "typeSchema": "public", "primaryKey": false, "notNull": true, "default": "'free'" @@ -330,7 +425,7 @@ "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "waitlist": { + "public.waitlist": { "name": "waitlist", "schema": "", "columns": { @@ -348,20 +443,21 @@ } }, "enums": { - "subscription_tier": { + "public.subscription_tier": { "name": "subscription_tier", - "values": { - "free": "free", - "basic": "basic", - "pro": "pro", - "enterprise": "enterprise" - } + "schema": "public", + "values": [ + "free", + "basic", + "pro", + "enterprise" + ] } }, "schemas": {}, "_meta": { + "columns": {}, "schemas": {}, - "tables": {}, - "columns": {} + "tables": {} } } \ No newline at end of file diff --git a/src/db/migrations/meta/0002_snapshot.json b/src/db/migrations/meta/0002_snapshot.json deleted file mode 100644 index 15addb2..0000000 --- a/src/db/migrations/meta/0002_snapshot.json +++ /dev/null @@ -1,358 +0,0 @@ -{ - "id": "7cdb7236-fe99-4924-b4c3-420b248d403f", - "prevId": "c1509dda-926d-4cd4-b876-3ec5dfca0729", - "version": "5", - "dialect": "pg", - "tables": { - "articles": { - "name": "articles", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "gen_random_uuid()" - }, - "site_id": { - "name": "site_id", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "content": { - "name": "content", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "source_video_id": { - "name": "source_video_id", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "title": { - "name": "title", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "seo_slug": { - "name": "seo_slug", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "is_public": { - "name": "is_public", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "default": true - }, - "views": { - "name": "views", - "type": "integer", - "primaryKey": false, - "notNull": false, - "default": 0 - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "articles_site_id_sites_id_fk": { - "name": "articles_site_id_sites_id_fk", - "tableFrom": "articles", - "tableTo": "sites", - "columnsFrom": [ - "site_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "sessions": { - "name": "sessions", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "gen_random_uuid()" - }, - "user_id": { - "name": "user_id", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "google_access_token": { - "name": "google_access_token", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "google_refresh_token": { - "name": "google_refresh_token", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "expires_at": { - "name": "expires_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": { - "sessions_user_id_users_id_fk": { - "name": "sessions_user_id_users_id_fk", - "tableFrom": "sessions", - "tableTo": "users", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "signups": { - "name": "signups", - "schema": "", - "columns": { - "email": { - "name": "email", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "site_id": { - "name": "site_id", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "source": { - "name": "source", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "signups_site_id_sites_id_fk": { - "name": "signups_site_id_sites_id_fk", - "tableFrom": "signups", - "tableTo": "sites", - "columnsFrom": [ - "site_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "sites": { - "name": "sites", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "gen_random_uuid()" - }, - "user_id": { - "name": "user_id", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "primary_color_hex": { - "name": "primary_color_hex", - "type": "varchar(6)", - "primaryKey": false, - "notNull": true, - "default": "'c4ced4'" - }, - "secondary_color_hex": { - "name": "secondary_color_hex", - "type": "varchar(6)", - "primaryKey": false, - "notNull": true, - "default": "'27251f'" - }, - "text_color_hex": { - "name": "text_color_hex", - "type": "varchar(6)", - "primaryKey": false, - "notNull": true, - "default": "'ffffff'" - } - }, - "indexes": {}, - "foreignKeys": { - "sites_user_id_users_id_fk": { - "name": "sites_user_id_users_id_fk", - "tableFrom": "sites", - "tableTo": "users", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "users": { - "name": "users", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "gen_random_uuid()" - }, - "google_id": { - "name": "google_id", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "stripe_id": { - "name": "stripe_id", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "email": { - "name": "email", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "channel_id": { - "name": "channel_id", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "uploads_playlist_id": { - "name": "uploads_playlist_id", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "subscription_tier": { - "name": "subscription_tier", - "type": "subscription_tier", - "primaryKey": false, - "notNull": true, - "default": "'free'" - }, - "tokens": { - "name": "tokens", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "waitlist": { - "name": "waitlist", - "schema": "", - "columns": { - "email": { - "name": "email", - "type": "text", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - } - }, - "enums": { - "subscription_tier": { - "name": "subscription_tier", - "values": { - "free": "free", - "basic": "basic", - "pro": "pro", - "enterprise": "enterprise" - } - } - }, - "schemas": {}, - "_meta": { - "schemas": {}, - "tables": {}, - "columns": {} - } -} \ No newline at end of file diff --git a/src/db/migrations/meta/0003_snapshot.json b/src/db/migrations/meta/0003_snapshot.json deleted file mode 100644 index 91e420f..0000000 --- a/src/db/migrations/meta/0003_snapshot.json +++ /dev/null @@ -1,372 +0,0 @@ -{ - "id": "15eee88d-0bb0-4571-861d-dab8851effac", - "prevId": "7cdb7236-fe99-4924-b4c3-420b248d403f", - "version": "5", - "dialect": "pg", - "tables": { - "articles": { - "name": "articles", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "gen_random_uuid()" - }, - "site_id": { - "name": "site_id", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "content": { - "name": "content", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "source_video_id": { - "name": "source_video_id", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "title": { - "name": "title", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "seo_slug": { - "name": "seo_slug", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "is_public": { - "name": "is_public", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "default": true - }, - "views": { - "name": "views", - "type": "integer", - "primaryKey": false, - "notNull": false, - "default": 0 - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "articles_site_id_sites_id_fk": { - "name": "articles_site_id_sites_id_fk", - "tableFrom": "articles", - "tableTo": "sites", - "columnsFrom": [ - "site_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "sessions": { - "name": "sessions", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "gen_random_uuid()" - }, - "user_id": { - "name": "user_id", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "google_access_token": { - "name": "google_access_token", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "google_refresh_token": { - "name": "google_refresh_token", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "expires_at": { - "name": "expires_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": { - "sessions_user_id_users_id_fk": { - "name": "sessions_user_id_users_id_fk", - "tableFrom": "sessions", - "tableTo": "users", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "signups": { - "name": "signups", - "schema": "", - "columns": { - "email": { - "name": "email", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "site_id": { - "name": "site_id", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "source": { - "name": "source", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "signups_site_id_sites_id_fk": { - "name": "signups_site_id_sites_id_fk", - "tableFrom": "signups", - "tableTo": "sites", - "columnsFrom": [ - "site_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "sites": { - "name": "sites", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "gen_random_uuid()" - }, - "user_id": { - "name": "user_id", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "primary_color_hex": { - "name": "primary_color_hex", - "type": "varchar(6)", - "primaryKey": false, - "notNull": true, - "default": "'c4ced4'" - }, - "secondary_color_hex": { - "name": "secondary_color_hex", - "type": "varchar(6)", - "primaryKey": false, - "notNull": true, - "default": "'27251f'" - }, - "text_color_hex": { - "name": "text_color_hex", - "type": "varchar(6)", - "primaryKey": false, - "notNull": true, - "default": "'ffffff'" - }, - "domain": { - "name": "domain", - "type": "text", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": { - "sites_user_id_users_id_fk": { - "name": "sites_user_id_users_id_fk", - "tableFrom": "sites", - "tableTo": "users", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "sites_domain_unique": { - "name": "sites_domain_unique", - "nullsNotDistinct": false, - "columns": [ - "domain" - ] - } - } - }, - "users": { - "name": "users", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "gen_random_uuid()" - }, - "google_id": { - "name": "google_id", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "stripe_id": { - "name": "stripe_id", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "email": { - "name": "email", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "channel_id": { - "name": "channel_id", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "uploads_playlist_id": { - "name": "uploads_playlist_id", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "subscription_tier": { - "name": "subscription_tier", - "type": "subscription_tier", - "primaryKey": false, - "notNull": true, - "default": "'free'" - }, - "tokens": { - "name": "tokens", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "waitlist": { - "name": "waitlist", - "schema": "", - "columns": { - "email": { - "name": "email", - "type": "text", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - } - }, - "enums": { - "subscription_tier": { - "name": "subscription_tier", - "values": { - "free": "free", - "basic": "basic", - "pro": "pro", - "enterprise": "enterprise" - } - } - }, - "schemas": {}, - "_meta": { - "schemas": {}, - "tables": {}, - "columns": {} - } -} \ No newline at end of file diff --git a/src/db/migrations/meta/0004_snapshot.json b/src/db/migrations/meta/0004_snapshot.json deleted file mode 100644 index 13d49df..0000000 --- a/src/db/migrations/meta/0004_snapshot.json +++ /dev/null @@ -1,396 +0,0 @@ -{ - "id": "0a279256-aa6d-4915-ac29-67b4a99c6a93", - "prevId": "15eee88d-0bb0-4571-861d-dab8851effac", - "version": "5", - "dialect": "pg", - "tables": { - "articles": { - "name": "articles", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "gen_random_uuid()" - }, - "site_id": { - "name": "site_id", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "content": { - "name": "content", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "source_video_id": { - "name": "source_video_id", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "title": { - "name": "title", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "seo_slug": { - "name": "seo_slug", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "is_public": { - "name": "is_public", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "default": true - }, - "views": { - "name": "views", - "type": "integer", - "primaryKey": false, - "notNull": false, - "default": 0 - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "articles_site_id_sites_id_fk": { - "name": "articles_site_id_sites_id_fk", - "tableFrom": "articles", - "tableTo": "sites", - "columnsFrom": [ - "site_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "sessions": { - "name": "sessions", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "gen_random_uuid()" - }, - "user_id": { - "name": "user_id", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "google_access_token": { - "name": "google_access_token", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "google_refresh_token": { - "name": "google_refresh_token", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "expires_at": { - "name": "expires_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": { - "sessions_user_id_users_id_fk": { - "name": "sessions_user_id_users_id_fk", - "tableFrom": "sessions", - "tableTo": "users", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "signups": { - "name": "signups", - "schema": "", - "columns": { - "email": { - "name": "email", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "site_id": { - "name": "site_id", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "source": { - "name": "source", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "signups_site_id_sites_id_fk": { - "name": "signups_site_id_sites_id_fk", - "tableFrom": "signups", - "tableTo": "sites", - "columnsFrom": [ - "site_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "sites": { - "name": "sites", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "gen_random_uuid()" - }, - "user_id": { - "name": "user_id", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "primary_color_hex": { - "name": "primary_color_hex", - "type": "varchar(6)", - "primaryKey": false, - "notNull": true, - "default": "'c4ced4'" - }, - "secondary_color_hex": { - "name": "secondary_color_hex", - "type": "varchar(6)", - "primaryKey": false, - "notNull": true, - "default": "'27251f'" - }, - "text_color_hex": { - "name": "text_color_hex", - "type": "varchar(6)", - "primaryKey": false, - "notNull": true, - "default": "'ffffff'" - }, - "domain": { - "name": "domain", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "send_freebie": { - "name": "send_freebie", - "type": "boolean", - "primaryKey": false, - "notNull": false - }, - "freebie_url": { - "name": "freebie_url", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "freebie_text": { - "name": "freebie_text", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "freebie_image_url": { - "name": "freebie_image_url", - "type": "text", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": { - "sites_user_id_users_id_fk": { - "name": "sites_user_id_users_id_fk", - "tableFrom": "sites", - "tableTo": "users", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "sites_domain_unique": { - "name": "sites_domain_unique", - "nullsNotDistinct": false, - "columns": [ - "domain" - ] - } - } - }, - "users": { - "name": "users", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "gen_random_uuid()" - }, - "google_id": { - "name": "google_id", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "stripe_id": { - "name": "stripe_id", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "email": { - "name": "email", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "channel_id": { - "name": "channel_id", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "uploads_playlist_id": { - "name": "uploads_playlist_id", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "subscription_tier": { - "name": "subscription_tier", - "type": "subscription_tier", - "primaryKey": false, - "notNull": true, - "default": "'free'" - }, - "tokens": { - "name": "tokens", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "waitlist": { - "name": "waitlist", - "schema": "", - "columns": { - "email": { - "name": "email", - "type": "text", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - } - }, - "enums": { - "subscription_tier": { - "name": "subscription_tier", - "values": { - "free": "free", - "basic": "basic", - "pro": "pro", - "enterprise": "enterprise" - } - } - }, - "schemas": {}, - "_meta": { - "schemas": {}, - "tables": {}, - "columns": {} - } -} \ No newline at end of file diff --git a/src/db/migrations/meta/0005_snapshot.json b/src/db/migrations/meta/0005_snapshot.json deleted file mode 100644 index 3f0f19f..0000000 --- a/src/db/migrations/meta/0005_snapshot.json +++ /dev/null @@ -1,402 +0,0 @@ -{ - "id": "61fc5b8c-872d-4cb8-8d43-4f4fdbaeac3c", - "prevId": "0a279256-aa6d-4915-ac29-67b4a99c6a93", - "version": "5", - "dialect": "pg", - "tables": { - "articles": { - "name": "articles", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "gen_random_uuid()" - }, - "site_id": { - "name": "site_id", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "content": { - "name": "content", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "source_video_id": { - "name": "source_video_id", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "title": { - "name": "title", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "seo_slug": { - "name": "seo_slug", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "is_public": { - "name": "is_public", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "default": true - }, - "views": { - "name": "views", - "type": "integer", - "primaryKey": false, - "notNull": false, - "default": 0 - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "articles_site_id_sites_id_fk": { - "name": "articles_site_id_sites_id_fk", - "tableFrom": "articles", - "tableTo": "sites", - "columnsFrom": [ - "site_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "sessions": { - "name": "sessions", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "gen_random_uuid()" - }, - "user_id": { - "name": "user_id", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "google_access_token": { - "name": "google_access_token", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "google_refresh_token": { - "name": "google_refresh_token", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "expires_at": { - "name": "expires_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": { - "sessions_user_id_users_id_fk": { - "name": "sessions_user_id_users_id_fk", - "tableFrom": "sessions", - "tableTo": "users", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "signups": { - "name": "signups", - "schema": "", - "columns": { - "email": { - "name": "email", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "site_id": { - "name": "site_id", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "source": { - "name": "source", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "signups_site_id_sites_id_fk": { - "name": "signups_site_id_sites_id_fk", - "tableFrom": "signups", - "tableTo": "sites", - "columnsFrom": [ - "site_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "sites": { - "name": "sites", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "gen_random_uuid()" - }, - "user_id": { - "name": "user_id", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "primary_color_hex": { - "name": "primary_color_hex", - "type": "varchar(6)", - "primaryKey": false, - "notNull": true, - "default": "'c4ced4'" - }, - "secondary_color_hex": { - "name": "secondary_color_hex", - "type": "varchar(6)", - "primaryKey": false, - "notNull": true, - "default": "'27251f'" - }, - "text_color_hex": { - "name": "text_color_hex", - "type": "varchar(6)", - "primaryKey": false, - "notNull": true, - "default": "'ffffff'" - }, - "domain": { - "name": "domain", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "send_freebie": { - "name": "send_freebie", - "type": "boolean", - "primaryKey": false, - "notNull": false - }, - "freebie_name": { - "name": "freebie_name", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "freebie_url": { - "name": "freebie_url", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "freebie_text": { - "name": "freebie_text", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "freebie_image_url": { - "name": "freebie_image_url", - "type": "text", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": { - "sites_user_id_users_id_fk": { - "name": "sites_user_id_users_id_fk", - "tableFrom": "sites", - "tableTo": "users", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "sites_domain_unique": { - "name": "sites_domain_unique", - "nullsNotDistinct": false, - "columns": [ - "domain" - ] - } - } - }, - "users": { - "name": "users", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "gen_random_uuid()" - }, - "google_id": { - "name": "google_id", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "stripe_id": { - "name": "stripe_id", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "email": { - "name": "email", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "channel_id": { - "name": "channel_id", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "uploads_playlist_id": { - "name": "uploads_playlist_id", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "subscription_tier": { - "name": "subscription_tier", - "type": "subscription_tier", - "primaryKey": false, - "notNull": true, - "default": "'free'" - }, - "tokens": { - "name": "tokens", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "waitlist": { - "name": "waitlist", - "schema": "", - "columns": { - "email": { - "name": "email", - "type": "text", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - } - }, - "enums": { - "subscription_tier": { - "name": "subscription_tier", - "values": { - "free": "free", - "basic": "basic", - "pro": "pro", - "enterprise": "enterprise" - } - } - }, - "schemas": {}, - "_meta": { - "schemas": {}, - "tables": {}, - "columns": {} - } -} \ No newline at end of file diff --git a/src/db/migrations/meta/0006_snapshot.json b/src/db/migrations/meta/0006_snapshot.json deleted file mode 100644 index 6e75983..0000000 --- a/src/db/migrations/meta/0006_snapshot.json +++ /dev/null @@ -1,414 +0,0 @@ -{ - "id": "3a12cc10-eb29-4469-9b41-3a834ca77f35", - "prevId": "61fc5b8c-872d-4cb8-8d43-4f4fdbaeac3c", - "version": "5", - "dialect": "pg", - "tables": { - "articles": { - "name": "articles", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "gen_random_uuid()" - }, - "site_id": { - "name": "site_id", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "content": { - "name": "content", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "source_video_id": { - "name": "source_video_id", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "title": { - "name": "title", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "seo_slug": { - "name": "seo_slug", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "is_public": { - "name": "is_public", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "default": true - }, - "views": { - "name": "views", - "type": "integer", - "primaryKey": false, - "notNull": false, - "default": 0 - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "articles_site_id_sites_id_fk": { - "name": "articles_site_id_sites_id_fk", - "tableFrom": "articles", - "tableTo": "sites", - "columnsFrom": [ - "site_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "sessions": { - "name": "sessions", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "gen_random_uuid()" - }, - "user_id": { - "name": "user_id", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "google_access_token": { - "name": "google_access_token", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "google_refresh_token": { - "name": "google_refresh_token", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "expires_at": { - "name": "expires_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": { - "sessions_user_id_users_id_fk": { - "name": "sessions_user_id_users_id_fk", - "tableFrom": "sessions", - "tableTo": "users", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "signups": { - "name": "signups", - "schema": "", - "columns": { - "email": { - "name": "email", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "site_id": { - "name": "site_id", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "source": { - "name": "source", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "signups_site_id_sites_id_fk": { - "name": "signups_site_id_sites_id_fk", - "tableFrom": "signups", - "tableTo": "sites", - "columnsFrom": [ - "site_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "sites": { - "name": "sites", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "gen_random_uuid()" - }, - "user_id": { - "name": "user_id", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "primary_color_hex": { - "name": "primary_color_hex", - "type": "varchar(6)", - "primaryKey": false, - "notNull": true, - "default": "'c4ced4'" - }, - "secondary_color_hex": { - "name": "secondary_color_hex", - "type": "varchar(6)", - "primaryKey": false, - "notNull": true, - "default": "'27251f'" - }, - "text_color_hex": { - "name": "text_color_hex", - "type": "varchar(6)", - "primaryKey": false, - "notNull": true, - "default": "'ffffff'" - }, - "title": { - "name": "title", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "subtitle": { - "name": "subtitle", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "domain": { - "name": "domain", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "send_freebie": { - "name": "send_freebie", - "type": "boolean", - "primaryKey": false, - "notNull": false - }, - "freebie_name": { - "name": "freebie_name", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "freebie_url": { - "name": "freebie_url", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "freebie_text": { - "name": "freebie_text", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "freebie_image_url": { - "name": "freebie_image_url", - "type": "text", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": { - "sites_user_id_users_id_fk": { - "name": "sites_user_id_users_id_fk", - "tableFrom": "sites", - "tableTo": "users", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "sites_domain_unique": { - "name": "sites_domain_unique", - "nullsNotDistinct": false, - "columns": [ - "domain" - ] - } - } - }, - "users": { - "name": "users", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "gen_random_uuid()" - }, - "google_id": { - "name": "google_id", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "stripe_id": { - "name": "stripe_id", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "email": { - "name": "email", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "channel_id": { - "name": "channel_id", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "uploads_playlist_id": { - "name": "uploads_playlist_id", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "subscription_tier": { - "name": "subscription_tier", - "type": "subscription_tier", - "primaryKey": false, - "notNull": true, - "default": "'free'" - }, - "tokens": { - "name": "tokens", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "waitlist": { - "name": "waitlist", - "schema": "", - "columns": { - "email": { - "name": "email", - "type": "text", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - } - }, - "enums": { - "subscription_tier": { - "name": "subscription_tier", - "values": { - "free": "free", - "basic": "basic", - "pro": "pro", - "enterprise": "enterprise" - } - } - }, - "schemas": {}, - "_meta": { - "schemas": {}, - "tables": {}, - "columns": {} - } -} \ No newline at end of file diff --git a/src/db/migrations/meta/0007_snapshot.json b/src/db/migrations/meta/0007_snapshot.json deleted file mode 100644 index a5cbe77..0000000 --- a/src/db/migrations/meta/0007_snapshot.json +++ /dev/null @@ -1,420 +0,0 @@ -{ - "id": "5dcf0ad1-cb9d-4c85-ad08-bee043c64e97", - "prevId": "3a12cc10-eb29-4469-9b41-3a834ca77f35", - "version": "5", - "dialect": "pg", - "tables": { - "articles": { - "name": "articles", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "gen_random_uuid()" - }, - "site_id": { - "name": "site_id", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "content": { - "name": "content", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "source_video_id": { - "name": "source_video_id", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "title": { - "name": "title", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "seo_slug": { - "name": "seo_slug", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "is_public": { - "name": "is_public", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "default": true - }, - "views": { - "name": "views", - "type": "integer", - "primaryKey": false, - "notNull": false, - "default": 0 - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "articles_site_id_sites_id_fk": { - "name": "articles_site_id_sites_id_fk", - "tableFrom": "articles", - "tableTo": "sites", - "columnsFrom": [ - "site_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "sessions": { - "name": "sessions", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "gen_random_uuid()" - }, - "user_id": { - "name": "user_id", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "google_access_token": { - "name": "google_access_token", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "google_refresh_token": { - "name": "google_refresh_token", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "expires_at": { - "name": "expires_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": { - "sessions_user_id_users_id_fk": { - "name": "sessions_user_id_users_id_fk", - "tableFrom": "sessions", - "tableTo": "users", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "signups": { - "name": "signups", - "schema": "", - "columns": { - "email": { - "name": "email", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "site_id": { - "name": "site_id", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "source": { - "name": "source", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "signups_site_id_sites_id_fk": { - "name": "signups_site_id_sites_id_fk", - "tableFrom": "signups", - "tableTo": "sites", - "columnsFrom": [ - "site_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "sites": { - "name": "sites", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "gen_random_uuid()" - }, - "user_id": { - "name": "user_id", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "primary_color_hex": { - "name": "primary_color_hex", - "type": "varchar(6)", - "primaryKey": false, - "notNull": true, - "default": "'c4ced4'" - }, - "secondary_color_hex": { - "name": "secondary_color_hex", - "type": "varchar(6)", - "primaryKey": false, - "notNull": true, - "default": "'27251f'" - }, - "text_color_hex": { - "name": "text_color_hex", - "type": "varchar(6)", - "primaryKey": false, - "notNull": true, - "default": "'ffffff'" - }, - "title": { - "name": "title", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "subtitle": { - "name": "subtitle", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "domain": { - "name": "domain", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "send_freebie": { - "name": "send_freebie", - "type": "boolean", - "primaryKey": false, - "notNull": false - }, - "freebie_name": { - "name": "freebie_name", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "freebie_url": { - "name": "freebie_url", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "freebie_text": { - "name": "freebie_text", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "freebie_image_url": { - "name": "freebie_image_url", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "subdomain_slug": { - "name": "subdomain_slug", - "type": "text", - "primaryKey": false, - "notNull": true - } - }, - "indexes": {}, - "foreignKeys": { - "sites_user_id_users_id_fk": { - "name": "sites_user_id_users_id_fk", - "tableFrom": "sites", - "tableTo": "users", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "sites_domain_unique": { - "name": "sites_domain_unique", - "nullsNotDistinct": false, - "columns": [ - "domain" - ] - } - } - }, - "users": { - "name": "users", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "gen_random_uuid()" - }, - "google_id": { - "name": "google_id", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "stripe_id": { - "name": "stripe_id", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "email": { - "name": "email", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "channel_id": { - "name": "channel_id", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "uploads_playlist_id": { - "name": "uploads_playlist_id", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "subscription_tier": { - "name": "subscription_tier", - "type": "subscription_tier", - "primaryKey": false, - "notNull": true, - "default": "'free'" - }, - "tokens": { - "name": "tokens", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "waitlist": { - "name": "waitlist", - "schema": "", - "columns": { - "email": { - "name": "email", - "type": "text", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - } - }, - "enums": { - "subscription_tier": { - "name": "subscription_tier", - "values": { - "free": "free", - "basic": "basic", - "pro": "pro", - "enterprise": "enterprise" - } - } - }, - "schemas": {}, - "_meta": { - "schemas": {}, - "tables": {}, - "columns": {} - } -} \ No newline at end of file diff --git a/src/db/migrations/meta/0008_snapshot.json b/src/db/migrations/meta/0008_snapshot.json deleted file mode 100644 index d0995f7..0000000 --- a/src/db/migrations/meta/0008_snapshot.json +++ /dev/null @@ -1,420 +0,0 @@ -{ - "id": "3eac9b0e-ebf2-40df-953a-b80af0377fc4", - "prevId": "5dcf0ad1-cb9d-4c85-ad08-bee043c64e97", - "version": "5", - "dialect": "pg", - "tables": { - "articles": { - "name": "articles", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "gen_random_uuid()" - }, - "site_id": { - "name": "site_id", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "content": { - "name": "content", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "source_video_id": { - "name": "source_video_id", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "title": { - "name": "title", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "seo_slug": { - "name": "seo_slug", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "is_public": { - "name": "is_public", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "default": true - }, - "views": { - "name": "views", - "type": "integer", - "primaryKey": false, - "notNull": false, - "default": 0 - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "articles_site_id_sites_id_fk": { - "name": "articles_site_id_sites_id_fk", - "tableFrom": "articles", - "tableTo": "sites", - "columnsFrom": [ - "site_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "sessions": { - "name": "sessions", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "gen_random_uuid()" - }, - "user_id": { - "name": "user_id", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "google_access_token": { - "name": "google_access_token", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "google_refresh_token": { - "name": "google_refresh_token", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "expires_at": { - "name": "expires_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": { - "sessions_user_id_users_id_fk": { - "name": "sessions_user_id_users_id_fk", - "tableFrom": "sessions", - "tableTo": "users", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "signups": { - "name": "signups", - "schema": "", - "columns": { - "email": { - "name": "email", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "site_id": { - "name": "site_id", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "source": { - "name": "source", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "signups_site_id_sites_id_fk": { - "name": "signups_site_id_sites_id_fk", - "tableFrom": "signups", - "tableTo": "sites", - "columnsFrom": [ - "site_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "sites": { - "name": "sites", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "gen_random_uuid()" - }, - "user_id": { - "name": "user_id", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "primary_color_hex": { - "name": "primary_color_hex", - "type": "varchar(6)", - "primaryKey": false, - "notNull": true, - "default": "'c4ced4'" - }, - "secondary_color_hex": { - "name": "secondary_color_hex", - "type": "varchar(6)", - "primaryKey": false, - "notNull": true, - "default": "'27251f'" - }, - "text_color_hex": { - "name": "text_color_hex", - "type": "varchar(6)", - "primaryKey": false, - "notNull": true, - "default": "'ffffff'" - }, - "title": { - "name": "title", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "subtitle": { - "name": "subtitle", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "domain": { - "name": "domain", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "send_freebie": { - "name": "send_freebie", - "type": "boolean", - "primaryKey": false, - "notNull": false - }, - "freebie_name": { - "name": "freebie_name", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "freebie_url": { - "name": "freebie_url", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "freebie_text": { - "name": "freebie_text", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "freebie_image_url": { - "name": "freebie_image_url", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "subdomain_slug": { - "name": "subdomain_slug", - "type": "text", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": { - "sites_user_id_users_id_fk": { - "name": "sites_user_id_users_id_fk", - "tableFrom": "sites", - "tableTo": "users", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "sites_domain_unique": { - "name": "sites_domain_unique", - "nullsNotDistinct": false, - "columns": [ - "domain" - ] - } - } - }, - "users": { - "name": "users", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "gen_random_uuid()" - }, - "google_id": { - "name": "google_id", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "stripe_id": { - "name": "stripe_id", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "email": { - "name": "email", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "channel_id": { - "name": "channel_id", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "uploads_playlist_id": { - "name": "uploads_playlist_id", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "subscription_tier": { - "name": "subscription_tier", - "type": "subscription_tier", - "primaryKey": false, - "notNull": true, - "default": "'free'" - }, - "tokens": { - "name": "tokens", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "waitlist": { - "name": "waitlist", - "schema": "", - "columns": { - "email": { - "name": "email", - "type": "text", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - } - }, - "enums": { - "subscription_tier": { - "name": "subscription_tier", - "values": { - "free": "free", - "basic": "basic", - "pro": "pro", - "enterprise": "enterprise" - } - } - }, - "schemas": {}, - "_meta": { - "schemas": {}, - "tables": {}, - "columns": {} - } -} \ No newline at end of file diff --git a/src/db/migrations/meta/0009_snapshot.json b/src/db/migrations/meta/0009_snapshot.json deleted file mode 100644 index 9420139..0000000 --- a/src/db/migrations/meta/0009_snapshot.json +++ /dev/null @@ -1,426 +0,0 @@ -{ - "id": "ccdf67ee-d01b-4505-90d0-e53063d080ad", - "prevId": "3eac9b0e-ebf2-40df-953a-b80af0377fc4", - "version": "5", - "dialect": "pg", - "tables": { - "articles": { - "name": "articles", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "gen_random_uuid()" - }, - "site_id": { - "name": "site_id", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "content": { - "name": "content", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "source_video_id": { - "name": "source_video_id", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "title": { - "name": "title", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "seo_slug": { - "name": "seo_slug", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "is_public": { - "name": "is_public", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "default": true - }, - "views": { - "name": "views", - "type": "integer", - "primaryKey": false, - "notNull": false, - "default": 0 - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "articles_site_id_sites_id_fk": { - "name": "articles_site_id_sites_id_fk", - "tableFrom": "articles", - "tableTo": "sites", - "columnsFrom": [ - "site_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "sessions": { - "name": "sessions", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "gen_random_uuid()" - }, - "user_id": { - "name": "user_id", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "google_access_token": { - "name": "google_access_token", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "google_refresh_token": { - "name": "google_refresh_token", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "expires_at": { - "name": "expires_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": { - "sessions_user_id_users_id_fk": { - "name": "sessions_user_id_users_id_fk", - "tableFrom": "sessions", - "tableTo": "users", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "signups": { - "name": "signups", - "schema": "", - "columns": { - "email": { - "name": "email", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "site_id": { - "name": "site_id", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "source": { - "name": "source", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "signups_site_id_sites_id_fk": { - "name": "signups_site_id_sites_id_fk", - "tableFrom": "signups", - "tableTo": "sites", - "columnsFrom": [ - "site_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "sites": { - "name": "sites", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "gen_random_uuid()" - }, - "user_id": { - "name": "user_id", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "primary_color_hex": { - "name": "primary_color_hex", - "type": "varchar(6)", - "primaryKey": false, - "notNull": true, - "default": "'c4ced4'" - }, - "secondary_color_hex": { - "name": "secondary_color_hex", - "type": "varchar(6)", - "primaryKey": false, - "notNull": true, - "default": "'27251f'" - }, - "text_color_hex": { - "name": "text_color_hex", - "type": "varchar(6)", - "primaryKey": false, - "notNull": true, - "default": "'ffffff'" - }, - "title": { - "name": "title", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "subtitle": { - "name": "subtitle", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "domain": { - "name": "domain", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "send_freebie": { - "name": "send_freebie", - "type": "boolean", - "primaryKey": false, - "notNull": false - }, - "freebie_name": { - "name": "freebie_name", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "freebie_url": { - "name": "freebie_url", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "freebie_text": { - "name": "freebie_text", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "freebie_image_url": { - "name": "freebie_image_url", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "subdomain_slug": { - "name": "subdomain_slug", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "social_medias": { - "name": "social_medias", - "type": "jsonb", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": { - "sites_user_id_users_id_fk": { - "name": "sites_user_id_users_id_fk", - "tableFrom": "sites", - "tableTo": "users", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "sites_domain_unique": { - "name": "sites_domain_unique", - "nullsNotDistinct": false, - "columns": [ - "domain" - ] - } - } - }, - "users": { - "name": "users", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "gen_random_uuid()" - }, - "google_id": { - "name": "google_id", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "stripe_id": { - "name": "stripe_id", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "email": { - "name": "email", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "channel_id": { - "name": "channel_id", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "uploads_playlist_id": { - "name": "uploads_playlist_id", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "subscription_tier": { - "name": "subscription_tier", - "type": "subscription_tier", - "primaryKey": false, - "notNull": true, - "default": "'free'" - }, - "tokens": { - "name": "tokens", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "waitlist": { - "name": "waitlist", - "schema": "", - "columns": { - "email": { - "name": "email", - "type": "text", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - } - }, - "enums": { - "subscription_tier": { - "name": "subscription_tier", - "values": { - "free": "free", - "basic": "basic", - "pro": "pro", - "enterprise": "enterprise" - } - } - }, - "schemas": {}, - "_meta": { - "schemas": {}, - "tables": {}, - "columns": {} - } -} \ No newline at end of file diff --git a/src/db/migrations/meta/0015_snapshot.json b/src/db/migrations/meta/0015_snapshot.json deleted file mode 100644 index 024ea96..0000000 --- a/src/db/migrations/meta/0015_snapshot.json +++ /dev/null @@ -1,452 +0,0 @@ -{ - "id": "386d8d34-c617-447e-95ec-73a8c4c270b3", - "prevId": "ccdf67ee-d01b-4505-90d0-e53063d080ad", - "version": "5", - "dialect": "pg", - "tables": { - "articles": { - "name": "articles", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "gen_random_uuid()" - }, - "site_id": { - "name": "site_id", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "content": { - "name": "content", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "source_video_id": { - "name": "source_video_id", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "title": { - "name": "title", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "seo_slug": { - "name": "seo_slug", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "is_public": { - "name": "is_public", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "default": false - }, - "views": { - "name": "views", - "type": "integer", - "primaryKey": false, - "notNull": false, - "default": 0 - }, - "seo_title": { - "name": "seo_title", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "seo_description": { - "name": "seo_description", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "excerp": { - "name": "excerp", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "articles_site_id_sites_id_fk": { - "name": "articles_site_id_sites_id_fk", - "tableFrom": "articles", - "tableTo": "sites", - "columnsFrom": [ - "site_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "sessions": { - "name": "sessions", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "gen_random_uuid()" - }, - "user_id": { - "name": "user_id", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "google_access_token": { - "name": "google_access_token", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "google_refresh_token": { - "name": "google_refresh_token", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "expires_at": { - "name": "expires_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": { - "sessions_user_id_users_id_fk": { - "name": "sessions_user_id_users_id_fk", - "tableFrom": "sessions", - "tableTo": "users", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "signups": { - "name": "signups", - "schema": "", - "columns": { - "email": { - "name": "email", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "site_id": { - "name": "site_id", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "source": { - "name": "source", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "signups_site_id_sites_id_fk": { - "name": "signups_site_id_sites_id_fk", - "tableFrom": "signups", - "tableTo": "sites", - "columnsFrom": [ - "site_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "sites": { - "name": "sites", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "gen_random_uuid()" - }, - "user_id": { - "name": "user_id", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "primary_color_hex": { - "name": "primary_color_hex", - "type": "varchar(6)", - "primaryKey": false, - "notNull": true, - "default": "'c4ced4'" - }, - "secondary_color_hex": { - "name": "secondary_color_hex", - "type": "varchar(6)", - "primaryKey": false, - "notNull": true, - "default": "'27251f'" - }, - "text_color_hex": { - "name": "text_color_hex", - "type": "varchar(6)", - "primaryKey": false, - "notNull": true, - "default": "'ffffff'" - }, - "title": { - "name": "title", - "type": "text", - "primaryKey": false, - "notNull": false, - "default": "'The best blog in the world!'" - }, - "subtitle": { - "name": "subtitle", - "type": "text", - "primaryKey": false, - "notNull": false, - "default": "'Some extra info about the best blog in the world!'" - }, - "domain": { - "name": "domain", - "type": "text", - "primaryKey": false, - "notNull": false, - "default": "''" - }, - "send_freebie": { - "name": "send_freebie", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "default": false - }, - "freebie_name": { - "name": "freebie_name", - "type": "text", - "primaryKey": false, - "notNull": false, - "default": "''" - }, - "freebie_url": { - "name": "freebie_url", - "type": "text", - "primaryKey": false, - "notNull": false, - "default": "''" - }, - "freebie_text": { - "name": "freebie_text", - "type": "text", - "primaryKey": false, - "notNull": false, - "default": "''" - }, - "freebie_image_url": { - "name": "freebie_image_url", - "type": "text", - "primaryKey": false, - "notNull": false, - "default": "''" - }, - "subdomain_slug": { - "name": "subdomain_slug", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "social_medias": { - "name": "social_medias", - "type": "jsonb", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": { - "sites_user_id_users_id_fk": { - "name": "sites_user_id_users_id_fk", - "tableFrom": "sites", - "tableTo": "users", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "sites_domain_unique": { - "name": "sites_domain_unique", - "nullsNotDistinct": false, - "columns": [ - "domain" - ] - } - } - }, - "users": { - "name": "users", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "gen_random_uuid()" - }, - "google_id": { - "name": "google_id", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "stripe_id": { - "name": "stripe_id", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "email": { - "name": "email", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "channel_id": { - "name": "channel_id", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "uploads_playlist_id": { - "name": "uploads_playlist_id", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "subscription_tier": { - "name": "subscription_tier", - "type": "subscription_tier", - "primaryKey": false, - "notNull": true, - "default": "'free'" - }, - "tokens": { - "name": "tokens", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "waitlist": { - "name": "waitlist", - "schema": "", - "columns": { - "email": { - "name": "email", - "type": "text", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - } - }, - "enums": { - "subscription_tier": { - "name": "subscription_tier", - "values": { - "free": "free", - "basic": "basic", - "pro": "pro", - "enterprise": "enterprise" - } - } - }, - "schemas": {}, - "_meta": { - "schemas": {}, - "tables": {}, - "columns": {} - } -} \ No newline at end of file diff --git a/src/db/migrations/meta/_journal.json b/src/db/migrations/meta/_journal.json index dd2d276..028f611 100644 --- a/src/db/migrations/meta/_journal.json +++ b/src/db/migrations/meta/_journal.json @@ -4,114 +4,16 @@ "entries": [ { "idx": 0, - "version": "5", - "when": 1716305931541, - "tag": "0000_rapid_moira_mactaggert", + "version": "7", + "when": 1717763053901, + "tag": "0000_gorgeous_amazoness", "breakpoints": true }, { "idx": 1, - "version": "5", - "when": 1716305965347, - "tag": "0001_dizzy_preak", - "breakpoints": true - }, - { - "idx": 2, - "version": "5", - "when": 1716306011573, - "tag": "0002_bent_warpath", - "breakpoints": true - }, - { - "idx": 3, - "version": "5", - "when": 1716401149580, - "tag": "0003_past_mikhail_rasputin", - "breakpoints": true - }, - { - "idx": 4, - "version": "5", - "when": 1716562329579, - "tag": "0004_worthless_meltdown", - "breakpoints": true - }, - { - "idx": 5, - "version": "5", - "when": 1716627095303, - "tag": "0005_purple_firebird", - "breakpoints": true - }, - { - "idx": 6, - "version": "5", - "when": 1716668597716, - "tag": "0006_same_bulldozer", - "breakpoints": true - }, - { - "idx": 7, - "version": "5", - "when": 1716723156673, - "tag": "0007_shiny_colossus", - "breakpoints": true - }, - { - "idx": 8, - "version": "5", - "when": 1716723180254, - "tag": "0008_long_chameleon", - "breakpoints": true - }, - { - "idx": 9, - "version": "5", - "when": 1716744598232, - "tag": "0009_aromatic_rachel_grey", - "breakpoints": true - }, - { - "idx": 10, - "version": "5", - "when": 1717070592875, - "tag": "0010_sweet_mojo", - "breakpoints": true - }, - { - "idx": 11, - "version": "5", - "when": 1717070668543, - "tag": "0011_lumpy_thunderbolts", - "breakpoints": true - }, - { - "idx": 12, - "version": "5", - "when": 1717070681184, - "tag": "0012_powerful_secret_warriors", - "breakpoints": true - }, - { - "idx": 13, - "version": "5", - "when": 1717070772293, - "tag": "0013_swift_donald_blake", - "breakpoints": true - }, - { - "idx": 14, - "version": "5", - "when": 1717070794879, - "tag": "0014_wonderful_bedlam", - "breakpoints": true - }, - { - "idx": 15, - "version": "5", - "when": 1717070837846, - "tag": "0015_special_weapon_omega", + "version": "7", + "when": 1717763195953, + "tag": "0001_big_sugar_man", "breakpoints": true } ] diff --git a/src/db/migrations/relations.ts b/src/db/migrations/relations.ts new file mode 100644 index 0000000..5849b96 --- /dev/null +++ b/src/db/migrations/relations.ts @@ -0,0 +1,37 @@ +import { relations } from "drizzle-orm/relations"; +import { sites, signups, users, sessions, articles } from "./schema"; + +export const signupsRelations = relations(signups, ({one}) => ({ + site: one(sites, { + fields: [signups.site_id], + references: [sites.id] + }), +})); + +export const sitesRelations = relations(sites, ({one, many}) => ({ + signups: many(signups), + user: one(users, { + fields: [sites.user_id], + references: [users.id] + }), + articles: many(articles), +})); + +export const usersRelations = relations(users, ({many}) => ({ + sites: many(sites), + sessions: many(sessions), +})); + +export const sessionsRelations = relations(sessions, ({one}) => ({ + user: one(users, { + fields: [sessions.user_id], + references: [users.id] + }), +})); + +export const articlesRelations = relations(articles, ({one}) => ({ + site: one(sites, { + fields: [articles.site_id], + references: [sites.id] + }), +})); \ No newline at end of file diff --git a/src/db/migrations/schema.ts b/src/db/migrations/schema.ts new file mode 100644 index 0000000..9bfa17d --- /dev/null +++ b/src/db/migrations/schema.ts @@ -0,0 +1,70 @@ +import { pgTable, foreignKey, pgEnum, text, uuid, timestamp, integer, varchar, boolean, jsonb } from "drizzle-orm/pg-core" + import { sql } from "drizzle-orm" + +export const subscription_tier = pgEnum("subscription_tier", ['free', 'basic', 'pro', 'enterprise']) + + +export const signups = pgTable("signups", { + email: text("email").notNull(), + site_id: uuid("site_id").notNull().references(() => sites.id), + created_at: timestamp("created_at", { mode: 'string' }).defaultNow().notNull(), + source: text("source"), +}); + +export const users = pgTable("users", { + id: uuid("id").defaultRandom().primaryKey().notNull(), + name: text("name"), + email: text("email"), + channel_id: text("channel_id"), + google_id: text("google_id"), + uploads_playlist_id: text("uploads_playlist_id"), + subscription_tier: subscription_tier("subscription_tier").default('free').notNull(), + tokens: integer("tokens").default(0).notNull(), + stripe_id: text("stripe_id"), +}); + +export const sites = pgTable("sites", { + id: uuid("id").defaultRandom().primaryKey().notNull(), + user_id: uuid("user_id").references(() => users.id), + name: text("name"), + primary_color_hex: varchar("primary_color_hex", { length: 6 }).default('c4ced4'::character varying).notNull(), + secondary_color_hex: varchar("secondary_color_hex", { length: 6 }).default('27251f'::character varying).notNull(), + text_color_hex: varchar("text_color_hex", { length: 6 }).default('ffffff'::character varying).notNull(), + title: text("title").default('The best blog in the world!'), + subtitle: text("subtitle").default('Some extra info about the best blog in the world!'), + domain: text("domain"), + send_freebie: boolean("send_freebie").default(false), + freebie_name: text("freebie_name").default(''), + freebie_url: text("freebie_url").default(''), + freebie_text: text("freebie_text").default(''), + freebie_image_url: text("freebie_image_url").default(''), + subdomain_slug: text("subdomain_slug"), + social_medias: jsonb("social_medias"), +}); + +export const sessions = pgTable("sessions", { + id: uuid("id").defaultRandom().primaryKey().notNull(), + user_id: uuid("user_id").references(() => users.id), + google_access_token: text("google_access_token"), + google_refresh_token: text("google_refresh_token"), + expires_at: timestamp("expires_at", { mode: 'string' }), +}); + +export const articles = pgTable("articles", { + id: uuid("id").defaultRandom().primaryKey().notNull(), + site_id: uuid("site_id").references(() => sites.id), + content: text("content"), + source_video_id: text("source_video_id"), + title: text("title"), + seo_slug: text("seo_slug"), + created_at: timestamp("created_at", { mode: 'string' }).defaultNow(), + is_public: boolean("is_public").default(false), + views: integer("views").default(0), + seo_title: text("seo_title"), + seo_description: text("seo_description"), + excerp: text("excerp"), +}); + +export const waitlist = pgTable("waitlist", { + email: text("email"), +}); \ No newline at end of file diff --git a/src/db/schemas.js b/src/db/schemas.js index fbd6181..5af4791 100644 --- a/src/db/schemas.js +++ b/src/db/schemas.js @@ -1,4 +1,5 @@ -import { boolean, integer, jsonb, pgEnum, pgTable, text, timestamp, unique, uuid, varchar } from "drizzle-orm/pg-core"; +import { sql } from "drizzle-orm"; +import { boolean, integer, jsonb, pgEnum, pgTable, text, timestamp, unique, uniqueIndex, uuid, varchar } from "drizzle-orm/pg-core"; export const subscription_enum = pgEnum("subscription_tier", ["free", "basic", "pro", "enterprise"]) @@ -43,7 +44,7 @@ export const sites = pgTable("sites", { text_color_hex: varchar("text_color_hex", { length: 6 }).default('ffffff').notNull(), title: text("title").default("The best blog in the world!"), subtitle: text("subtitle").default("Some extra info about the best blog in the world!"), - domain: text("domain").default(null).unique(), + domain: text("domain").default(null), use_freebie: boolean("send_freebie").default(false), freebie_name: text("freebie_name").default(""), freebie_url: text("freebie_url").default(""), @@ -53,7 +54,9 @@ export const sites = pgTable("sites", { return makeid(10); }), social_medias: jsonb("social_medias") -}); +}, (table) => ({ + domainUniqueIndex: uniqueIndex("domainUniqueIndex").on(sql`(lower(${table.domain}))`).where(sql`${table.domain} IS NOT NULL`) +})); export const articles = pgTable("articles", { id: uuid("id").defaultRandom().primaryKey(), diff --git a/yarn.lock b/yarn.lock index fae8989..aef26d3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -29,30 +29,6 @@ chalk "^2.4.2" js-tokens "^4.0.0" -"@cloudflare/kv-asset-handler@0.3.2": - version "0.3.2" - resolved "https://registry.npmjs.org/@cloudflare/kv-asset-handler/-/kv-asset-handler-0.3.2.tgz" - integrity sha512-EeEjMobfuJrwoctj7FA1y1KEbM0+Q1xSjobIEyie9k4haVEBB7vkDvsasw1pM3rO39mL2akxIAzLMUAtrMHZhA== - dependencies: - mime "^3.0.0" - -"@cloudflare/workerd-windows-64@1.20240512.0": - version "1.20240512.0" - resolved "https://registry.npmjs.org/@cloudflare/workerd-windows-64/-/workerd-windows-64-1.20240512.0.tgz" - integrity sha512-SxKapDrIYSscMR7lGIp/av0l6vokjH4xQ9ACxHgXh+OdOus9azppSmjaPyw4/ePvg7yqpkaNjf9o258IxWtvKQ== - -"@cspotcode/source-map-support@0.8.1": - version "0.8.1" - resolved "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz" - integrity sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw== - dependencies: - "@jridgewell/trace-mapping" "0.3.9" - -"@drizzle-team/studio@^0.0.27": - version "0.0.27" - resolved "https://registry.npmjs.org/@drizzle-team/studio/-/studio-0.0.27.tgz" - integrity sha512-vkgflb8g/7WCdVCuxWE6tCzjZB0q4lLIK6mwH1aleNRqIGOhEWq/E2I8HmKquz1v0GRDHLFd19ZzrVSITt2Uqg== - "@esbuild-kit/cjs-loader@^2.4.2": version "2.4.2" resolved "https://registry.npmjs.org/@esbuild-kit/cjs-loader/-/cjs-loader-2.4.2.tgz" @@ -77,28 +53,15 @@ "@esbuild-kit/core-utils" "^3.0.0" get-tsconfig "^4.4.0" -"@esbuild-plugins/node-globals-polyfill@^0.2.3": - version "0.2.3" - resolved "https://registry.npmjs.org/@esbuild-plugins/node-globals-polyfill/-/node-globals-polyfill-0.2.3.tgz" - integrity sha512-r3MIryXDeXDOZh7ih1l/yE9ZLORCd5e8vWg02azWRGj5SPTuoh69A2AIyn0Z31V/kHBfZ4HgWJ+OK3GTTwLmnw== - -"@esbuild-plugins/node-modules-polyfill@^0.2.2": - version "0.2.2" - resolved "https://registry.npmjs.org/@esbuild-plugins/node-modules-polyfill/-/node-modules-polyfill-0.2.2.tgz" - integrity sha512-LXV7QsWJxRuMYvKbiznh+U1ilIop3g2TeKRzUxOG5X3YITc8JyyTa90BmLwqqv0YnX4v32CSlG+vsziZp9dMvA== - dependencies: - escape-string-regexp "^4.0.0" - rollup-plugin-node-polyfills "^0.2.1" - "@esbuild/win32-x64@0.17.19": version "0.17.19" resolved "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.17.19.tgz" integrity sha512-lAhycmKnVOuRYNtRtatQR1LPQf2oYCkRGkSFnseDAKPl8lu5SOsK/e1sXe5a0Pc5kHIHe6P2I/ilntNv2xf3cA== -"@esbuild/win32-x64@0.18.20": - version "0.18.20" - resolved "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.18.20.tgz" - integrity sha512-kTdfRcSiDfQca/y9QIkng02avJ+NCaQvrMejlsB3RRv5sE9rRoeBPISaZpKxHELzRxZyLvNts1P27W3wV+8geQ== +"@esbuild/win32-x64@0.19.12": + version "0.19.12" + resolved "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.19.12.tgz" + integrity sha512-T1QyPSDCyMXaO3pzBkF96E8xMkiRYbUEZADd29SyPGabqxMViNoii+NcK7eWJAEoU6RZyEm5lVSIjTmcdoB9HA== "@eslint-community/eslint-utils@^4.1.2", "@eslint-community/eslint-utils@^4.2.0", "@eslint-community/eslint-utils@^4.4.0": version "4.4.0" @@ -141,7 +104,7 @@ ajv-formats "^2.1.1" fast-uri "^2.0.0" -"@fastify/busboy@^2.0.0", "@fastify/busboy@^2.1.0": +"@fastify/busboy@^2.1.0": version "2.1.0" resolved "https://registry.npmjs.org/@fastify/busboy/-/busboy-2.1.0.tgz" integrity sha512-+KpH+QxZU7O4675t3mnkQKcZZg56u+K/Ct2K+N2AZYNVK8kyeo/bI18tI8aPm3tvNNRyTWfj6s5tnGNlcbQRsA== @@ -271,7 +234,7 @@ "@jridgewell/sourcemap-codec" "^1.4.10" "@jridgewell/trace-mapping" "^0.3.24" -"@jridgewell/resolve-uri@^3.0.3", "@jridgewell/resolve-uri@^3.1.0": +"@jridgewell/resolve-uri@^3.1.0": version "3.1.2" resolved "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz" integrity sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw== @@ -302,14 +265,6 @@ "@jridgewell/resolve-uri" "^3.1.0" "@jridgewell/sourcemap-codec" "^1.4.14" -"@jridgewell/trace-mapping@0.3.9": - version "0.3.9" - resolved "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz" - integrity sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ== - dependencies: - "@jridgewell/resolve-uri" "^3.0.3" - "@jridgewell/sourcemap-codec" "^1.4.10" - "@nodelib/fs.scandir@2.1.5": version "2.1.5" resolved "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz" @@ -438,13 +393,6 @@ "@types/node" "*" form-data "^4.0.0" -"@types/node-forge@^1.3.0": - version "1.3.11" - resolved "https://registry.npmjs.org/@types/node-forge/-/node-forge-1.3.11.tgz" - integrity sha512-FQx220y22OKNTqaByeBGqHWYz4cl94tpcxeFdvBo3wjG6XPBuZ0BNgNZRV5J5TFmmcsJ4IzsLkmGRiQbnYsBEQ== - dependencies: - "@types/node" "*" - "@types/node@*", "@types/node@^20.10.4", "@types/node@>=8.1.0": version "20.10.4" resolved "https://registry.npmjs.org/@types/node/-/node-20.10.4.tgz" @@ -726,12 +674,7 @@ acorn-jsx@^5.3.2: resolved "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz" integrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ== -acorn-walk@^8.2.0: - version "8.3.2" - resolved "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.2.tgz" - integrity sha512-cjkyv4OtNCIeqhHrfS81QWXoCBPExR/J62oyEqepVw8WaQeSqpW2uhuLPh1m9eWhDuOo/jUXVTlifvesOWp/4A== - -"acorn@^6.0.0 || ^7.0.0 || ^8.0.0", acorn@^8, acorn@^8.7.1, acorn@^8.8.0, acorn@^8.8.2, acorn@^8.9.0: +"acorn@^6.0.0 || ^7.0.0 || ^8.0.0", acorn@^8, acorn@^8.7.1, acorn@^8.8.2, acorn@^8.9.0: version "8.11.2" resolved "https://registry.npmjs.org/acorn/-/acorn-8.11.2.tgz" integrity sha512-nc0Axzp/0FILLEVsm4fNwLCwMttvhEI263QtVPQcbpfZZ3ts0hLsZGOpE6czNlid7CJ9MlyH8reXkpsf3YUY4w== @@ -908,13 +851,6 @@ arrify@^3.0.0: resolved "https://registry.npmjs.org/arrify/-/arrify-3.0.0.tgz" integrity sha512-tLkvA81vQG/XqE2mjDkGQHoOINtMHtysSnemrmoGe6PydDPMRbVugqyk4A6V/WDWEfm3l+0d8anA9r8cv/5Jaw== -as-table@^1.0.36: - version "1.0.55" - resolved "https://registry.npmjs.org/as-table/-/as-table-1.0.55.tgz" - integrity sha512-xvsWESUJn0JN421Xb9MQw6AsMHRCUknCe0Wjlxvjud80mU4E6hQf1A6NzQKcYNmYw62MfzEtXc+badstZP3JpQ== - dependencies: - printable-characters "^1.0.42" - asynckit@^0.4.0: version "0.4.0" resolved "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz" @@ -973,11 +909,6 @@ binary-extensions@^2.0.0: resolved "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz" integrity sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA== -blake3-wasm@^2.1.5: - version "2.1.5" - resolved "https://registry.npmjs.org/blake3-wasm/-/blake3-wasm-2.1.5.tgz" - integrity sha512-F1+K8EbfOZE49dtoPtmxUQrpXaBIl3ICvasLh+nJta0xkz+9kF/7uet9fLnwKqhDrmj6g+6K3Tw9yQPUg2ka5g== - bplist-parser@^0.2.0: version "0.2.0" resolved "https://registry.npmjs.org/bplist-parser/-/bplist-parser-0.2.0.tgz" @@ -993,13 +924,6 @@ brace-expansion@^1.1.7: balanced-match "^1.0.0" concat-map "0.0.1" -brace-expansion@^2.0.1: - version "2.0.1" - resolved "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz" - integrity sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA== - dependencies: - balanced-match "^1.0.0" - braces@^3.0.2, braces@~3.0.2: version "3.0.2" resolved "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz" @@ -1084,24 +1008,11 @@ callsites@^3.0.0: resolved "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz" integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ== -camelcase@^7.0.1: - version "7.0.1" - resolved "https://registry.npmjs.org/camelcase/-/camelcase-7.0.1.tgz" - integrity sha512-xlx1yCK2Oc1APsPXDL2LdlNP6+uu8OCDdhOBSVT279M/S+y75O30C2VuD8T2ogdePBBl7PfPF4504tnLgX3zfw== - caniuse-lite@^1.0.30001587: version "1.0.30001612" resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001612.tgz" integrity sha512-lFgnZ07UhaCcsSZgWW0K5j4e69dK1u/ltrL9lTUiFOwNHs12S3UMIEYgBV0Z6C6hRDev7iRnMzzYmKabYdXF9g== -capnp-ts@^0.7.0: - version "0.7.0" - resolved "https://registry.npmjs.org/capnp-ts/-/capnp-ts-0.7.0.tgz" - integrity sha512-XKxXAC3HVPv7r674zP0VC3RTXz+/JKhfyw94ljvF80yynK6VkTnqE3jMuN8b3dUVmmc43TjyxjW4KTsmB3c86g== - dependencies: - debug "^4.3.1" - tslib "^2.2.0" - chalk@^2.4.2: version "2.4.2" resolved "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz" @@ -1119,11 +1030,6 @@ chalk@^4.0.0, chalk@^4.1.0: ansi-styles "^4.1.0" supports-color "^7.1.0" -chalk@^5.2.0: - version "5.3.0" - resolved "https://registry.npmjs.org/chalk/-/chalk-5.3.0.tgz" - integrity sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w== - chokidar@^3.5.3: version "3.5.3" resolved "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz" @@ -1156,7 +1062,7 @@ clean-regexp@^1.0.0: dependencies: escape-string-regexp "^1.0.5" -cli-color@^2.0.0, cli-color@^2.0.3: +cli-color@^2.0.3: version "2.0.3" resolved "https://registry.npmjs.org/cli-color/-/cli-color-2.0.3.tgz" integrity sha512-OkoZnxyC4ERN3zLzZaY9Emb7f/MhBOIpePv0Ycok0fJYT+Ouo00UBEIwsVsr0yoow++n5YWlSUgST9GKhNHiRQ== @@ -1208,7 +1114,7 @@ commander@^2.20.0: resolved "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz" integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== -commander@^9.0.0, commander@^9.4.1: +commander@^9.0.0: version "9.5.0" resolved "https://registry.npmjs.org/commander/-/commander-9.5.0.tgz" integrity sha512-KRs7WVDKg86PWiuAqhDrAQnTXZKraVcCc6vFdL14qrZ/DcWwuRo7VoiYXalXO7S5GKpqYiVEwCbgFDfxNHKJBQ== @@ -1265,11 +1171,6 @@ d@^1.0.1, d@1: es5-ext "^0.10.50" type "^1.0.1" -data-uri-to-buffer@^2.0.0: - version "2.0.2" - resolved "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-2.0.2.tgz" - integrity sha512-ND9qDTLc6diwj+Xe5cdAgVTbLVdXbtxTJRXRhli8Mowuaan+0EJOtdqJ0QCHNSSPyoXGx9HX2/VMnKeC34AChA== - debug@^3.2.7: version "3.2.7" resolved "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz" @@ -1277,7 +1178,7 @@ debug@^3.2.7: dependencies: ms "^2.1.1" -debug@^4.0.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2, debug@^4.3.4, debug@4: +debug@^4.0.0, debug@^4.1.1, debug@^4.3.2, debug@^4.3.4, debug@4: version "4.3.4" resolved "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz" integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== @@ -1356,13 +1257,6 @@ delayed-stream@~1.0.0: resolved "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz" integrity sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ== -difflib@~0.2.1: - version "0.2.4" - resolved "https://registry.npmjs.org/difflib/-/difflib-0.2.4.tgz" - integrity sha512-9YVwmMb0wQHQNr5J9m6BSj6fk4pfGITGQOOs+D9Fl+INODWFOfvhIU1hNv6GgR1RBoC/9NJcwu77zShxV0kT7w== - dependencies: - heap ">= 0.2.0" - dir-glob@^3.0.1: version "3.0.1" resolved "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz" @@ -1389,36 +1283,19 @@ dotenv@^16.3.1: resolved "https://registry.npmjs.org/dotenv/-/dotenv-16.3.1.tgz" integrity sha512-IPzF4w4/Rd94bA9imS68tZBaYyBWSCE47V1RGuMrB94iyTOIEwRmVL2x/4An+6mETpLrKJ5hQkB8W4kFAadeIQ== -dreamopt@~0.8.0: - version "0.8.0" - resolved "https://registry.npmjs.org/dreamopt/-/dreamopt-0.8.0.tgz" - integrity sha512-vyJTp8+mC+G+5dfgsY+r3ckxlz+QMX40VjPQsZc5gxVAxLmi64TBoVkP54A/pRAXMXsbu2GMMBrZPxNv23waMg== +drizzle-kit@^0.22.4: + version "0.22.4" + resolved "https://registry.npmjs.org/drizzle-kit/-/drizzle-kit-0.22.4.tgz" + integrity sha512-jsiYGqHsbsP/GtM26y/bGK7je1ja+1H/RniCt1ovg2E7tMNraw6XdqKcjxHhb8FonCfDDjvwFgouRsZS46vrmA== dependencies: - wordwrap ">=0.0.2" - -drizzle-kit@^0.20.0: - version "0.20.0" - resolved "https://registry.npmjs.org/drizzle-kit/-/drizzle-kit-0.20.0.tgz" - integrity sha512-5z9wDIPMHXICe44JnM3OcGVjftu2k676IWYkvplJ4AOKhye4Hkf+uM73Dj+NWqmBtqbZ3A34Qt2QvhrLXvWMLw== - dependencies: - "@drizzle-team/studio" "^0.0.27" "@esbuild-kit/esm-loader" "^2.5.5" - camelcase "^7.0.1" - chalk "^5.2.0" - commander "^9.4.1" - esbuild "^0.18.6" - esbuild-register "^3.4.2" - glob "^8.1.0" - hanji "^0.0.5" - json-diff "0.9.0" - minimatch "^7.4.3" - wrangler "^3.7.0" - zod "^3.20.2" + esbuild "^0.19.7" + esbuild-register "^3.5.0" -drizzle-orm@^0.29.5: - version "0.29.5" - resolved "https://registry.npmjs.org/drizzle-orm/-/drizzle-orm-0.29.5.tgz" - integrity sha512-jS3+uyzTz4P0Y2CICx8FmRQ1eplURPaIMWDn/yq6k4ShRFj9V7vlJk67lSf2kyYPzQ60GkkNGXcJcwrxZ6QCRw== +drizzle-orm@^0.31.1: + version "0.31.1" + resolved "https://registry.npmjs.org/drizzle-orm/-/drizzle-orm-0.31.1.tgz" + integrity sha512-hTbYne2XX3y6sV7WSxcPH6/vNSiQSUG9VZsFI27jBMCN0OT3Ok7ao3pIT5OMAqWkzJCRFgGjAaUeTAZWPgOKag== ecdsa-sig-formatter@^1.0.11, ecdsa-sig-formatter@1.0.11: version "1.0.11" @@ -1596,14 +1473,43 @@ es6-weak-map@^2.0.3: es6-iterator "^2.0.3" es6-symbol "^3.1.1" -esbuild-register@^3.4.2: +esbuild-register@^3.5.0: version "3.5.0" resolved "https://registry.npmjs.org/esbuild-register/-/esbuild-register-3.5.0.tgz" integrity sha512-+4G/XmakeBAsvJuDugJvtyF1x+XJT4FMocynNpxrvEBViirpfUn2PgNpCHedfWhF4WokNsO/OvMKrmJOIJsI5A== dependencies: debug "^4.3.4" -esbuild@*, esbuild@~0.17.6, esbuild@0.17.19: +esbuild@^0.19.7, "esbuild@>=0.12 <1": + version "0.19.12" + resolved "https://registry.npmjs.org/esbuild/-/esbuild-0.19.12.tgz" + integrity sha512-aARqgq8roFBj054KvQr5f1sFu0D65G+miZRCuJyJ0G13Zwx7vRar5Zhn2tkQNzIXcBrNVsv/8stehpj+GAjgbg== + optionalDependencies: + "@esbuild/aix-ppc64" "0.19.12" + "@esbuild/android-arm" "0.19.12" + "@esbuild/android-arm64" "0.19.12" + "@esbuild/android-x64" "0.19.12" + "@esbuild/darwin-arm64" "0.19.12" + "@esbuild/darwin-x64" "0.19.12" + "@esbuild/freebsd-arm64" "0.19.12" + "@esbuild/freebsd-x64" "0.19.12" + "@esbuild/linux-arm" "0.19.12" + "@esbuild/linux-arm64" "0.19.12" + "@esbuild/linux-ia32" "0.19.12" + "@esbuild/linux-loong64" "0.19.12" + "@esbuild/linux-mips64el" "0.19.12" + "@esbuild/linux-ppc64" "0.19.12" + "@esbuild/linux-riscv64" "0.19.12" + "@esbuild/linux-s390x" "0.19.12" + "@esbuild/linux-x64" "0.19.12" + "@esbuild/netbsd-x64" "0.19.12" + "@esbuild/openbsd-x64" "0.19.12" + "@esbuild/sunos-x64" "0.19.12" + "@esbuild/win32-arm64" "0.19.12" + "@esbuild/win32-ia32" "0.19.12" + "@esbuild/win32-x64" "0.19.12" + +esbuild@~0.17.6: version "0.17.19" resolved "https://registry.npmjs.org/esbuild/-/esbuild-0.17.19.tgz" integrity sha512-XQ0jAPFkK/u3LcVRcvVHQcTIqD6E2H1fvZMA5dQPSOWb3suUbWbfbRf94pjc0bNzRYLfIrDRQXr7X+LHIm5oHw== @@ -1631,34 +1537,6 @@ esbuild@*, esbuild@~0.17.6, esbuild@0.17.19: "@esbuild/win32-ia32" "0.17.19" "@esbuild/win32-x64" "0.17.19" -esbuild@^0.18.6, "esbuild@>=0.12 <1": - version "0.18.20" - resolved "https://registry.npmjs.org/esbuild/-/esbuild-0.18.20.tgz" - integrity sha512-ceqxoedUrcayh7Y7ZX6NdbbDzGROiyVBgC4PriJThBKSVPWnnFHZAkfI1lJT8QFkOwH4qOS2SJkS4wvpGl8BpA== - optionalDependencies: - "@esbuild/android-arm" "0.18.20" - "@esbuild/android-arm64" "0.18.20" - "@esbuild/android-x64" "0.18.20" - "@esbuild/darwin-arm64" "0.18.20" - "@esbuild/darwin-x64" "0.18.20" - "@esbuild/freebsd-arm64" "0.18.20" - "@esbuild/freebsd-x64" "0.18.20" - "@esbuild/linux-arm" "0.18.20" - "@esbuild/linux-arm64" "0.18.20" - "@esbuild/linux-ia32" "0.18.20" - "@esbuild/linux-loong64" "0.18.20" - "@esbuild/linux-mips64el" "0.18.20" - "@esbuild/linux-ppc64" "0.18.20" - "@esbuild/linux-riscv64" "0.18.20" - "@esbuild/linux-s390x" "0.18.20" - "@esbuild/linux-x64" "0.18.20" - "@esbuild/netbsd-x64" "0.18.20" - "@esbuild/openbsd-x64" "0.18.20" - "@esbuild/sunos-x64" "0.18.20" - "@esbuild/win32-arm64" "0.18.20" - "@esbuild/win32-ia32" "0.18.20" - "@esbuild/win32-x64" "0.18.20" - escalade@^3.1.1: version "3.1.2" resolved "https://registry.npmjs.org/escalade/-/escalade-3.1.2.tgz" @@ -1978,11 +1856,6 @@ estraverse@^5.1.0, estraverse@^5.2.0: resolved "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz" integrity sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA== -estree-walker@^0.6.1: - version "0.6.1" - resolved "https://registry.npmjs.org/estree-walker/-/estree-walker-0.6.1.tgz" - integrity sha512-SqmZANLWS0mnatqbSfRP5g8OXZC12Fgg1IwNtLsyHDzJizORW4khDfjPqJZsemPWBB2uqykUah5YpQ6epsqC/w== - esutils@^2.0.2: version "2.0.3" resolved "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz" @@ -2036,11 +1909,6 @@ execa@^7.1.1: signal-exit "^3.0.7" strip-final-newline "^3.0.0" -exit-hook@^2.2.1: - version "2.2.1" - resolved "https://registry.npmjs.org/exit-hook/-/exit-hook-2.2.1.tgz" - integrity sha512-eNTPlAD67BmP31LDINZ3U7HSF8l57TxOY2PmBJ1shpCvpnxBF93mWCE8YHBnXs8qiUZJc9WDcWIeC3a2HIAMfw== - ext@^1.1.2: version "1.7.0" resolved "https://registry.npmjs.org/ext/-/ext-1.7.0.tgz" @@ -2369,14 +2237,6 @@ get-set-props@^0.1.0: resolved "https://registry.npmjs.org/get-set-props/-/get-set-props-0.1.0.tgz" integrity sha512-7oKuKzAGKj0ag+eWZwcGw2fjiZ78tXnXQoBgY0aU7ZOxTu4bB7hSuQSDgtKy978EDH062P5FmD2EWiDpQS9K9Q== -get-source@^2.0.12: - version "2.0.12" - resolved "https://registry.npmjs.org/get-source/-/get-source-2.0.12.tgz" - integrity sha512-X5+4+iD+HoSeEED+uwrQ07BOQr0kEDFMVqqpBuI+RaZBpBpHCuXxo70bjar6f0b0u/DQJsJ7ssurpP0V60Az+w== - dependencies: - data-uri-to-buffer "^2.0.0" - source-map "^0.6.1" - get-stdin@^9.0.0: version "9.0.0" resolved "https://registry.npmjs.org/get-stdin/-/get-stdin-9.0.0.tgz" @@ -2447,17 +2307,6 @@ glob@^7.1.3: once "^1.3.0" path-is-absolute "^1.0.0" -glob@^8.1.0: - version "8.1.0" - resolved "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz" - integrity sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ== - dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^5.0.1" - once "^1.3.0" - globals@^13.19.0: version "13.24.0" resolved "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz" @@ -2552,14 +2401,6 @@ gtoken@^7.0.0: gaxios "^6.0.0" jws "^4.0.0" -hanji@^0.0.5: - version "0.0.5" - resolved "https://registry.npmjs.org/hanji/-/hanji-0.0.5.tgz" - integrity sha512-Abxw1Lq+TnYiL4BueXqMau222fPSPMFtya8HdpWsz/xVAhifXou71mPh/kY2+08RgFcVccjG3uZHs6K5HAe3zw== - dependencies: - lodash.throttle "^4.1.1" - sisteransi "^1.0.5" - has-bigints@^1.0.1, has-bigints@^1.0.2: version "1.0.2" resolved "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz" @@ -2618,11 +2459,6 @@ hasown@^2.0.0: dependencies: function-bind "^1.1.2" -"heap@>= 0.2.0": - version "0.2.7" - resolved "https://registry.npmjs.org/heap/-/heap-0.2.7.tgz" - integrity sha512-2bsegYkkHO+h/9MGbn6KWcE45cHZgPANo5LXF7EvWdT0yT2EguSVO1nDgU5c8+ZOPwp2vMNa7YFsJhVcDR9Sdg== - hosted-git-info@^2.1.4: version "2.8.9" resolved "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz" @@ -3053,15 +2889,6 @@ json-buffer@3.0.1: resolved "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz" integrity sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ== -json-diff@0.9.0: - version "0.9.0" - resolved "https://registry.npmjs.org/json-diff/-/json-diff-0.9.0.tgz" - integrity sha512-cVnggDrVkAAA3OvFfHpFEhOnmcsUpleEKq4d4O8sQWWSH40MBrWstKigVB1kGrgLWzuom+7rRdaCsnBD6VyObQ== - dependencies: - cli-color "^2.0.0" - difflib "~0.2.1" - dreamopt "~0.8.0" - json-parse-even-better-errors@^2.3.0, json-parse-even-better-errors@^2.3.1: version "2.3.1" resolved "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz" @@ -3185,11 +3012,6 @@ lodash.merge@^4.6.2: resolved "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz" integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ== -lodash.throttle@^4.1.1: - version "4.1.1" - resolved "https://registry.npmjs.org/lodash.throttle/-/lodash.throttle-4.1.1.tgz" - integrity sha512-wIkUCfVKpVsWo3JSZlc+8MB5it+2AN5W8J7YVMST30UrvcQNZ1Okbj+rbVniijTWE6FGYy4XJq/rHkas8qJMLQ== - lodash@^4.13.1, lodash@^4.17.21: version "4.17.21" resolved "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz" @@ -3222,13 +3044,6 @@ lru-queue@^0.1.0: dependencies: es5-ext "~0.10.2" -magic-string@^0.25.3: - version "0.25.9" - resolved "https://registry.npmjs.org/magic-string/-/magic-string-0.25.9.tgz" - integrity sha512-RmF0AsMzgt25qzqqLc1+MbHmhdx0ojF2Fvs4XnOqz2ZOBXzzkEwc/dJQZCYHAn7v1jbVOjAZfK8msRn4BxO4VQ== - dependencies: - sourcemap-codec "^1.4.8" - mailtrap@^3.3.0: version "3.3.0" resolved "https://registry.npmjs.org/mailtrap/-/mailtrap-3.3.0.tgz" @@ -3295,11 +3110,6 @@ mime-types@^2.1.12, mime-types@^2.1.27: dependencies: mime-db "1.52.0" -mime@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/mime/-/mime-3.0.0.tgz" - integrity sha512-jSCU7/VB1loIWBZe14aEYHU/+1UMEHoaO7qxCOVJOw9GgH72VAWppxNcjU+x9a2k3GSIBXNKxXQFqRvvZ7vr3A== - mimic-fn@^2.1.0: version "2.1.0" resolved "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz" @@ -3320,24 +3130,6 @@ min-indent@^1.0.0: resolved "https://registry.npmjs.org/min-indent/-/min-indent-1.0.1.tgz" integrity sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg== -miniflare@3.20240512.0: - version "3.20240512.0" - resolved "https://registry.npmjs.org/miniflare/-/miniflare-3.20240512.0.tgz" - integrity sha512-X0PlKR0AROKpxFoJNmRtCMIuJxj+ngEcyTOlEokj2rAQ0TBwUhB4/1uiPvdI6ofW5NugPOD1uomAv+gLjwsLDQ== - dependencies: - "@cspotcode/source-map-support" "0.8.1" - acorn "^8.8.0" - acorn-walk "^8.2.0" - capnp-ts "^0.7.0" - exit-hook "^2.2.1" - glob-to-regexp "^0.4.1" - stoppable "^1.1.0" - undici "^5.28.2" - workerd "1.20240512.0" - ws "^8.11.0" - youch "^3.2.2" - zod "^3.20.6" - minimatch@^3.0.5, minimatch@^3.1.1, minimatch@^3.1.2: version "3.1.2" resolved "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz" @@ -3345,20 +3137,6 @@ minimatch@^3.0.5, minimatch@^3.1.1, minimatch@^3.1.2: dependencies: brace-expansion "^1.1.7" -minimatch@^5.0.1: - version "5.1.6" - resolved "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz" - integrity sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g== - dependencies: - brace-expansion "^2.0.1" - -minimatch@^7.4.3: - version "7.4.6" - resolved "https://registry.npmjs.org/minimatch/-/minimatch-7.4.6.tgz" - integrity sha512-sBz8G/YjVniEz6lKPNpKxXwazJe4c19fEfV2GDMX6AjFz+MX9uDWIZW8XreVhkFW3fkIdTv/gxWr/Kks5FFAVw== - dependencies: - brace-expansion "^2.0.1" - minimist@^1.2.0, minimist@^1.2.6: version "1.2.8" resolved "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz" @@ -3381,21 +3159,11 @@ ms@^2.1.1: resolved "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz" integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== -mustache@^4.2.0: - version "4.2.0" - resolved "https://registry.npmjs.org/mustache/-/mustache-4.2.0.tgz" - integrity sha512-71ippSywq5Yb7/tVYyGbkBggbU8H3u5Rz56fH60jGFgr8uHwxs+aSKeqmluIVzM0m0kB7xQjKS6qPfd0b2ZoqQ== - mylas@^2.1.9: version "2.1.13" resolved "https://registry.npmjs.org/mylas/-/mylas-2.1.13.tgz" integrity sha512-+MrqnJRtxdF+xngFfUUkIMQrUUL0KsxbADUkn23Z/4ibGg192Q+z+CQyiYwvWTsYjJygmMR8+w3ZDa98Zh6ESg== -nanoid@^3.3.3: - version "3.3.7" - resolved "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz" - integrity sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g== - natural-compare@^1.4.0: version "1.4.0" resolved "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz" @@ -3423,11 +3191,6 @@ node-fetch@^2.6.7, node-fetch@^2.6.9: dependencies: whatwg-url "^5.0.0" -node-forge@^1: - version "1.3.1" - resolved "https://registry.npmjs.org/node-forge/-/node-forge-1.3.1.tgz" - integrity sha512-dPEtOeMvF9VMcYV/1Wb8CPoVAXtp6MKMlcbAt4ddqmGqUJ6fQZFXkNZNkNlfevtNkGtaSoXf/vNNNSvgrdXwtA== - node-releases@^2.0.14: version "2.0.14" resolved "https://registry.npmjs.org/node-releases/-/node-releases-2.0.14.tgz" @@ -3686,11 +3449,6 @@ path-parse@^1.0.7: resolved "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz" integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== -path-to-regexp@^6.2.0: - version "6.2.2" - resolved "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-6.2.2.tgz" - integrity sha512-GQX3SSMokngb36+whdpRXE+3f9V8UzyAorlYvOGx87ufGHehNTn5lCxrKtLyZ4Yl/wEKnNnr98ZzOwwDZV5ogw== - path-type@^4.0.0: version "4.0.0" resolved "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz" @@ -3911,11 +3669,6 @@ prettier@^3.0.0, prettier@^3.1.1, prettier@>=3.0.0: resolved "https://registry.npmjs.org/prettier/-/prettier-3.1.1.tgz" integrity sha512-22UbSzg8luF4UuZtzgiUOfcGM8s4tjBv6dJRT7j275NXsy2jb4aJa4NNveul5x4eqlF1wuhuR2RElK71RvmVaw== -printable-characters@^1.0.42: - version "1.0.42" - resolved "https://registry.npmjs.org/printable-characters/-/printable-characters-1.0.42.tgz" - integrity sha512-dKp+C4iXWK4vVYZmYSd0KBH5F/h1HoZRsbJ82AVKRO3PEo8L4lBS/vLwhVtpwwuYcoIsVY+1JYKR268yn480uQ== - process-warning@^2.0.0: version "2.2.0" resolved "https://registry.npmjs.org/process-warning/-/process-warning-2.2.0.tgz" @@ -4077,12 +3830,7 @@ resolve-pkg-maps@^1.0.0: resolved "https://registry.npmjs.org/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz" integrity sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw== -resolve.exports@^2.0.2: - version "2.0.2" - resolved "https://registry.npmjs.org/resolve.exports/-/resolve.exports-2.0.2.tgz" - integrity sha512-X2UW6Nw3n/aMgDVy+0rSqgHlv39WZAlZrXCdnbyEiKm17DSqHX4MmQMaST3FbeWR5FTuRcUwYAziZajji0Y7mg== - -resolve@^1.10.0, resolve@^1.22.1, resolve@^1.22.2, resolve@^1.22.4, resolve@^1.22.8: +resolve@^1.10.0, resolve@^1.22.1, resolve@^1.22.2, resolve@^1.22.4: version "1.22.8" resolved "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz" integrity sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw== @@ -4122,29 +3870,6 @@ rimraf@^3.0.2: dependencies: glob "^7.1.3" -rollup-plugin-inject@^3.0.0: - version "3.0.2" - resolved "https://registry.npmjs.org/rollup-plugin-inject/-/rollup-plugin-inject-3.0.2.tgz" - integrity sha512-ptg9PQwzs3orn4jkgXJ74bfs5vYz1NCZlSQMBUA0wKcGp5i5pA1AO3fOUEte8enhGUC+iapTCzEWw2jEFFUO/w== - dependencies: - estree-walker "^0.6.1" - magic-string "^0.25.3" - rollup-pluginutils "^2.8.1" - -rollup-plugin-node-polyfills@^0.2.1: - version "0.2.1" - resolved "https://registry.npmjs.org/rollup-plugin-node-polyfills/-/rollup-plugin-node-polyfills-0.2.1.tgz" - integrity sha512-4kCrKPTJ6sK4/gLL/U5QzVT8cxJcofO0OU74tnB19F40cmuAKSzH5/siithxlofFEjwvw1YAhPmbvGNA6jEroA== - dependencies: - rollup-plugin-inject "^3.0.0" - -rollup-pluginutils@^2.8.1: - version "2.8.2" - resolved "https://registry.npmjs.org/rollup-pluginutils/-/rollup-pluginutils-2.8.2.tgz" - integrity sha512-EEp9NhnUkwY8aif6bxgovPHMoMoNr2FulJziTndpt5H9RdwC47GSGuII9XxpSdzVGM0GWrNPHV6ie1LTNJPaLQ== - dependencies: - estree-walker "^0.6.1" - run-applescript@^5.0.0: version "5.0.0" resolved "https://registry.npmjs.org/run-applescript/-/run-applescript-5.0.0.tgz" @@ -4209,14 +3934,6 @@ secure-json-parse@^2.4.0, secure-json-parse@^2.7.0: resolved "https://registry.npmjs.org/secure-json-parse/-/secure-json-parse-2.7.0.tgz" integrity sha512-6aU+Rwsezw7VR8/nyvKTx8QpWH9FrcYiXXlqC4z5d5XQBDRqtbfsRjnwGyqbi3gddNtWHuEk9OANUotL26qKUw== -selfsigned@^2.0.1: - version "2.4.1" - resolved "https://registry.npmjs.org/selfsigned/-/selfsigned-2.4.1.tgz" - integrity sha512-th5B4L2U+eGLq1TVh7zNRGBapioSORUeymIydxgFpwww9d2qyKvtuPU2jJuHvYAwwqi2Y596QBL3eEqcPEYL8Q== - dependencies: - "@types/node-forge" "^1.3.0" - node-forge "^1" - semver@^5.7.2: version "5.7.2" resolved "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz" @@ -4342,11 +4059,6 @@ simple-oauth2@^5.0.0: debug "^4.3.4" joi "^17.6.4" -sisteransi@^1.0.5: - version "1.0.5" - resolved "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz" - integrity sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg== - slash@^3.0.0: version "3.0.0" resolved "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz" @@ -4377,16 +4089,11 @@ source-map-support@^0.5.21, source-map-support@~0.5.20: buffer-from "^1.0.0" source-map "^0.6.0" -source-map@^0.6.0, source-map@^0.6.1, source-map@0.6.1: +source-map@^0.6.0: version "0.6.1" resolved "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz" integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== -sourcemap-codec@^1.4.8: - version "1.4.8" - resolved "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz" - integrity sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA== - spdx-correct@^3.0.0: version "3.2.0" resolved "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.2.0.tgz" @@ -4418,19 +4125,6 @@ split2@^4.0.0, split2@^4.1.0: resolved "https://registry.npmjs.org/split2/-/split2-4.2.0.tgz" integrity sha512-UcjcJOWknrNkF6PLX83qcHM6KHgVKNkV62Y8a5uYDVv9ydGQVwAHMKqHdJje1VTWpljG0WYpCDhrCdAOYH4TWg== -stacktracey@^2.1.8: - version "2.1.8" - resolved "https://registry.npmjs.org/stacktracey/-/stacktracey-2.1.8.tgz" - integrity sha512-Kpij9riA+UNg7TnphqjH7/CzctQ/owJGNbFkfEeve4Z4uxT5+JapVLFXcsurIfN34gnTWZNJ/f7NMG0E8JDzTw== - dependencies: - as-table "^1.0.36" - get-source "^2.0.12" - -stoppable@^1.1.0: - version "1.1.0" - resolved "https://registry.npmjs.org/stoppable/-/stoppable-1.1.0.tgz" - integrity sha512-KXDYZ9dszj6bzvnEMRYvxgeTHU74QBFL54XKtP3nyMuJ81CFYtABZ3bAzL2EdFUaEwJOBOgENyFj3R7oTzDyyw== - stream-wormhole@^1.1.0: version "1.1.0" resolved "https://registry.npmjs.org/stream-wormhole/-/stream-wormhole-1.1.0.tgz" @@ -4669,7 +4363,7 @@ tsconfig-paths@^3.14.1: minimist "^1.2.6" strip-bom "^3.0.0" -tslib@^2.2.0, tslib@^2.6.0, tslib@^2.6.2: +tslib@^2.6.0, tslib@^2.6.2: version "2.6.2" resolved "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz" integrity sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q== @@ -4791,13 +4485,6 @@ undici-types@~5.26.4: resolved "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz" integrity sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA== -undici@^5.28.2: - version "5.28.4" - resolved "https://registry.npmjs.org/undici/-/undici-5.28.4.tgz" - integrity sha512-72RFADWFqKmUb2hmmvNODKL3p9hcB6Gt2DOQMis1SEBaV6a4MH8soBvzg+95CYhCKPFedut2JY9bMfrDl9D23g== - dependencies: - "@fastify/busboy" "^2.0.0" - untildify@^4.0.0: version "4.0.0" resolved "https://registry.npmjs.org/untildify/-/untildify-4.0.0.tgz" @@ -4936,54 +4623,11 @@ which@^2.0.1: dependencies: isexe "^2.0.0" -wordwrap@>=0.0.2: - version "1.0.0" - resolved "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz" - integrity sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q== - -workerd@1.20240512.0: - version "1.20240512.0" - resolved "https://registry.npmjs.org/workerd/-/workerd-1.20240512.0.tgz" - integrity sha512-VUBmR1PscAPHEE0OF/G2K7/H1gnr9aDWWZzdkIgWfNKkv8dKFCT75H+GJtUHjfwqz3rYCzaNZmatSXOpLGpF8A== - optionalDependencies: - "@cloudflare/workerd-darwin-64" "1.20240512.0" - "@cloudflare/workerd-darwin-arm64" "1.20240512.0" - "@cloudflare/workerd-linux-64" "1.20240512.0" - "@cloudflare/workerd-linux-arm64" "1.20240512.0" - "@cloudflare/workerd-windows-64" "1.20240512.0" - -wrangler@^3.7.0: - version "3.57.1" - resolved "https://registry.npmjs.org/wrangler/-/wrangler-3.57.1.tgz" - integrity sha512-M8YnWUwdrb8AFiRePtVnzlDn02OX4osWvdl8oVh6eyZqqkqXYg7lwlYBr14Qj92pMN4JvMBmDZoukkYHvwpJRg== - dependencies: - "@cloudflare/kv-asset-handler" "0.3.2" - "@esbuild-plugins/node-globals-polyfill" "^0.2.3" - "@esbuild-plugins/node-modules-polyfill" "^0.2.2" - blake3-wasm "^2.1.5" - chokidar "^3.5.3" - esbuild "0.17.19" - miniflare "3.20240512.0" - nanoid "^3.3.3" - path-to-regexp "^6.2.0" - resolve "^1.22.8" - resolve.exports "^2.0.2" - selfsigned "^2.0.1" - source-map "0.6.1" - xxhash-wasm "^1.0.1" - optionalDependencies: - fsevents "~2.3.2" - wrappy@1: version "1.0.2" resolved "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz" integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ== -ws@^8.11.0: - version "8.17.0" - resolved "https://registry.npmjs.org/ws/-/ws-8.17.0.tgz" - integrity sha512-uJq6108EgZMAl20KagGkzCKfMEjxmKvZHG7Tlq0Z6nOky7YF7aq4mOx6xK8TJ/i1LeK4Qus7INktacctDgY8Ow== - xo@^0.56.0: version "0.56.0" resolved "https://registry.npmjs.org/xo/-/xo-0.56.0.tgz" @@ -5031,11 +4675,6 @@ xtend@^4.0.0: resolved "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz" integrity sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ== -xxhash-wasm@^1.0.1: - version "1.0.2" - resolved "https://registry.npmjs.org/xxhash-wasm/-/xxhash-wasm-1.0.2.tgz" - integrity sha512-ibF0Or+FivM9lNrg+HGJfVX8WJqgo+kCLDc4vx6xMeTce7Aj+DLttKbxxRR/gNLSAelRc1omAPlJ77N/Jem07A== - yallist@^4.0.0, yallist@4.0.0: version "4.0.0" resolved "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz" @@ -5051,16 +4690,7 @@ yocto-queue@^1.0.0: resolved "https://registry.npmjs.org/yocto-queue/-/yocto-queue-1.0.0.tgz" integrity sha512-9bnSc/HEW2uRy67wc+T8UwauLuPJVn28jb+GtJY16iiKWyvmYJRXVT4UamsAEGQfPohgr2q4Tq0sQbQlxTfi1g== -youch@^3.2.2: - version "3.3.3" - resolved "https://registry.npmjs.org/youch/-/youch-3.3.3.tgz" - integrity sha512-qSFXUk3UZBLfggAW3dJKg0BMblG5biqSF8M34E06o5CSsZtH92u9Hqmj2RzGiHDi64fhe83+4tENFP2DB6t6ZA== - dependencies: - cookie "^0.5.0" - mustache "^4.2.0" - stacktracey "^2.1.8" - -zod@^3.20.2, zod@^3.20.6, zod@^3.22.4: +zod@^3.22.4: version "3.22.4" resolved "https://registry.npmjs.org/zod/-/zod-3.22.4.tgz" integrity sha512-iC+8Io04lddc+mVqQ9AZ7OQ2MrUKGN+oIQyq1vemgt46jwCwLfhq7/pwnBnNXXXZb8VTVLKwp9EDkx+ryxIWmg==