Michael Schaufelberger
Michael Schaufelberger
Explore posts from servers
XXata
Created by Michael Schaufelberger on 12/3/2024 in #help
Cannot install Xata CLI in Linux using the script or homebrew
No description
5 replies
XXata
Created by Michael Schaufelberger on 11/22/2024 in #help
Xata Dashboard error when trying to delete a file
To share a little context, we had a lot of difficulty integrating Files with the Native SQL Table, which is why we introduced the toggle so you can flip between the "old" and "new" table.
This makes sense. Although, currently, the Native SQL Table is unusable if you have a single file field in the table you want to edit. Editing is basically blocked until you switch the setting. May I make a suggestion to skip/block updating the file fields when having the setting enabled? So we can at least edit the other fields.
17 replies
TtRPC
Created by Rule on 11/27/2024 in #❓-help
tRPC 404 in Next.js API Routes
That's fine. Glad I could help!
10 replies
TtRPC
Created by Rule on 11/27/2024 in #❓-help
tRPC 404 in Next.js API Routes
and remove the createContext from mine. i think that's optional
10 replies
TtRPC
Created by Rule on 11/27/2024 in #❓-help
tRPC 404 in Next.js API Routes
import { fetchRequestHandler } from '@trpc/server/adapters/fetch';

import { createContext } from '../server/context';
import { appRouter } from '../server/router';

export const maxDuration = 60; // seconds
export const dynamic = 'force-dynamic';

const handler = (req: Request) =>
fetchRequestHandler({
endpoint: '/api/trpc',
req,
router: appRouter,
createContext,
});

export { handler as GET, handler as POST };
import { fetchRequestHandler } from '@trpc/server/adapters/fetch';

import { createContext } from '../server/context';
import { appRouter } from '../server/router';

export const maxDuration = 60; // seconds
export const dynamic = 'force-dynamic';

const handler = (req: Request) =>
fetchRequestHandler({
endpoint: '/api/trpc',
req,
router: appRouter,
createContext,
});

export { handler as GET, handler as POST };
that's my working file. Could you try to alter it to use your imports/naming but keep the exports and other function definitions? Maybe something strange regarding the handler refs, etc. is happening? I feel like I'm missing something obvious... 😅
10 replies
TtRPC
Created by Rule on 11/27/2024 in #❓-help
tRPC 404 in Next.js API Routes
If you console.log at the line above awaiting the fetchRequestHandler, does it log anything? Also, I have a createContext for the fetchRequestHandler - maybe that's needed?
10 replies
XXata
Created by Michael Schaufelberger on 11/22/2024 in #help
Xata Dashboard error when trying to delete a file
That would be great, thanks! We would like to eventually move away from having to have all the Xata fields, though it's not much of an issue. I know you are working on that. Are there any updates when we can drop those, or has something changed regarding this? In any case, we would like to be able to edit those special fields in the dashboard. It's a great way to not have to have an up-and-running Xata SDK implementation that enables file field updates. So: Is will this issue be fixed, even for the native sql table editor setting?
17 replies
XXata
Created by Michael Schaufelberger on 11/22/2024 in #help
Xata Dashboard error when trying to delete a file
Btw, this solved the issue. Could you briefly explain the downsides of keeping this disabled?
17 replies
XXata
Created by Michael Schaufelberger on 11/22/2024 in #help
Xata Dashboard error when trying to delete a file
Nvm, I found it. I'll check if it works now
17 replies
XXata
Created by Michael Schaufelberger on 11/22/2024 in #help
Xata Dashboard error when trying to delete a file
Where can I find this setting?
17 replies
XXata
Created by Michael Schaufelberger on 11/22/2024 in #help
Xata Dashboard error when trying to delete a file
Same error when trying to create a fresh record: 4043c709-d726-94f1-a1a3-eb535eb899ff
17 replies
XXata
Created by Michael Schaufelberger on 11/22/2024 in #help
Xata Dashboard error when trying to delete a file
c8ebc55b-c219-97b0-b4d9-ecc25b28a05e
17 replies
XXata
Created by Michael Schaufelberger on 11/22/2024 in #help
Xata Dashboard error when trying to delete a file
Sure, it turns out, that I can't even save the record even if I don't make any changes.
17 replies
XXata
Created by Michael Schaufelberger on 11/22/2024 in #help
Xata Dashboard error when trying to delete a file
Hi cmck Directly via the UI. I clicked the pencil icon in the record, clicked on the image, clicked the trash icon, confirmed the deletion and tried to save the record, which failed.
17 replies
XXata
Created by Michael Schaufelberger on 11/19/2024 in #help
How can I get data from a different table when adding a column? - Multi Schema Migrations
Ah, okay, so the unprefixed fields in such an expression are always resolved to the table we are doing the migration operation on? And you can do whatever expression you like, as long as it's returning a single value, also select with joins, for example?
8 replies
XXata
Created by Michael Schaufelberger on 11/19/2024 in #help
How can I get data from a different table when adding a column? - Multi Schema Migrations
Yeah, that would be great. Initially, I assumed the error occurrs because it wasn't supported to get data from a different table. This is something you should definitely add in an example, imo - it's so awesome! Because the up field in most of the example migrations suggest, that you can only use data from the current table. (I think only #21 and #24 have a from clause and I assumed it's only working for constraints and the like) https://github.com/search?q=repo%3Axataio%2Fpgroll+path%3A%2F%5Eexamples%5C%2F%2F+from&type=code Our case btw: We are changing the relation of a table from a single FK to two FKs, because we need to more directly need to link the two tables to the one in question. Some last question: What are the scopes where the SQL statements run in? Is this anywhere documented?
8 replies
XXata
Created by Michael Schaufelberger on 11/19/2024 in #help
How can I get data from a different table when adding a column? - Multi Schema Migrations
Oh, nice! It seems to work. Awesome 😀
8 replies
TtRPC
Created by Michael Schaufelberger on 6/21/2024 in #❓-help
How do I use the rsc-rq-prefetch example with a protected procedure?
Okay, this is not true. It only works if there's a prefetch going on. Probably related to https://github.com/vercel/next.js/discussions/60640
24 replies
TtRPC
Created by Michael Schaufelberger on 6/21/2024 in #❓-help
How do I use the rsc-rq-prefetch example with a protected procedure?
Note: This has fixed itself after upgrading to a new @tanstack/react-query version. Only updating the rc version of tRPC was somehow insufficient 🤷‍♂️
"@tanstack/react-query": "^5.60.6",
"@tanstack/react-query-devtools": "^5.60.6",
"@trpc/client": "11.0.0-rc.638",
"@trpc/react-query": "11.0.0-rc.638",
"@trpc/server": "11.0.0-rc.638",
"@tanstack/react-query": "^5.60.6",
"@tanstack/react-query-devtools": "^5.60.6",
"@trpc/client": "11.0.0-rc.638",
"@trpc/react-query": "11.0.0-rc.638",
"@trpc/server": "11.0.0-rc.638",
24 replies
XXata
Created by Michael Schaufelberger on 11/4/2024 in #help
FetcherError: Internal Error
This should alreadybe the case
20 replies