Rep.
Rep.
Explore posts from servers
DTDrizzle Team
Created by Rep. on 4/22/2024 in #help
Supabase branching w/ Drizzle?
Does anyone know if it is possible to get Supabase branching working with Drizzle migrations? (https://supabase.com/docs/guides/platform/branching)
1 replies
DTDrizzle Team
Created by Rep. on 12/18/2023 in #help
push:pg not creating table schema (pgSchema)
Running a local Supabase instance, regular tables and all that work as expected. Just now trying to move things around into table schemas. I've got the following schema.ts
import {
pgSchema,
pgTable,
serial,
text,
timestamp,
uniqueIndex,
} from "drizzle-orm/pg-core";

export const exampleSchema = pgSchema("exampleSchema");

export const exampleWaitlist = exampleSchema.table(
"exampleWaitlist",
{
id: serial("id").primaryKey(), // auto-incrementing primary key, so we know who signed up first
email: text("email").notNull(), // email address (uniqueness enforced via index)
signupDate: timestamp("signup_date").notNull(), // exact date/time of signup (UTC)
},
(table) => ({
emailIndex: uniqueIndex("email_index").on(table.email), // index on email column to allow quick lookups and prevent duplicates
}),
);
import {
pgSchema,
pgTable,
serial,
text,
timestamp,
uniqueIndex,
} from "drizzle-orm/pg-core";

export const exampleSchema = pgSchema("exampleSchema");

export const exampleWaitlist = exampleSchema.table(
"exampleWaitlist",
{
id: serial("id").primaryKey(), // auto-incrementing primary key, so we know who signed up first
email: text("email").notNull(), // email address (uniqueness enforced via index)
signupDate: timestamp("signup_date").notNull(), // exact date/time of signup (UTC)
},
(table) => ({
emailIndex: uniqueIndex("email_index").on(table.email), // index on email column to allow quick lookups and prevent duplicates
}),
);
Running db:generate does generate the schema in the migration file - but for whatever reason db:push doesn't want to do it.
1 replies
KKinde
Created by Rep. on 12/2/2023 in #💻┃support
Are you required to be authenticated to be able to check feature flags?
Trying out the feature flag functionality. While I'm not logged in/authenticated - the flags always return the defaultValue set. I recall mentioning that the flag values are bundled into the JWT or token? So is feature flagging only applicable to authenticated users & not more generally for flagging public pages?
4 replies
KKinde
Created by Rep. on 12/1/2023 in #💻┃support
Clicking login takes me to API route and not login page (Next 14)
Trying to get up and running with Next14 and App Router. I've got env setup and the following in src/app/api/auth/[kindeauth]/route.ts
import { handleAuth } from "@kinde-oss/kinde-auth-nextjs/server";
import { type NextApiRequest } from "next";

export async function GET(
request: NextApiRequest,
{ params }: { params: { kindeAuth: string } },
) {
const endpoint = params.kindeAuth;
return handleAuth(request, endpoint);
}
import { handleAuth } from "@kinde-oss/kinde-auth-nextjs/server";
import { type NextApiRequest } from "next";

export async function GET(
request: NextApiRequest,
{ params }: { params: { kindeAuth: string } },
) {
const endpoint = params.kindeAuth;
return handleAuth(request, endpoint);
}
When I click my login component it navigates to http://localhost:3000/api/auth/login any ideas?
21 replies