Ali
Ali
Explore posts from servers
DTDrizzle Team
Created by Ali on 11/3/2024 in #help
Depreciated table
import { integer, text, unique, pgTable } from "drizzle-orm/pg-core";
export const user = pgTable('user', {
id: integer('id').unique(),
});
export const table = pgTable('table', {
id: integer('id').unique('custom_name'),
});
export const composite = pgTable('composite_example', {
id: integer('id'),
name: text('name'),
}, (t) => ({
unq: unique().on(t.id, t.name),
unq2: unique('custom_name').on(t.id, t.name)
}));
// In Postgres 15.0+ NULLS NOT DISTINCT is available
// This example demonstrates both available usages
export const userNulls = pgTable('user_nulls_example', {
id: integer('id').unique("custom_name", { nulls: 'not distinct' }),
}, (t) => ({
unq: unique().on(t.id).nullsNotDistinct()
}));
import { integer, text, unique, pgTable } from "drizzle-orm/pg-core";
export const user = pgTable('user', {
id: integer('id').unique(),
});
export const table = pgTable('table', {
id: integer('id').unique('custom_name'),
});
export const composite = pgTable('composite_example', {
id: integer('id'),
name: text('name'),
}, (t) => ({
unq: unique().on(t.id, t.name),
unq2: unique('custom_name').on(t.id, t.name)
}));
// In Postgres 15.0+ NULLS NOT DISTINCT is available
// This example demonstrates both available usages
export const userNulls = pgTable('user_nulls_example', {
id: integer('id').unique("custom_name", { nulls: 'not distinct' }),
}, (t) => ({
unq: unique().on(t.id).nullsNotDistinct()
}));
10 replies
DTDrizzle Team
Created by Ali on 11/3/2024 in #help
Depreciated table
for example
10 replies
DTDrizzle Team
Created by Ali on 11/3/2024 in #help
Depreciated table
it doesn't not use arrays here
10 replies
DTDrizzle Team
Created by Ali on 11/3/2024 in #help
Depreciated table
10 replies
DTDrizzle Team
Created by Ali on 11/3/2024 in #help
Depreciated table
const createTable: PgTableFn <"clinicsSessions", { id: IsPrimaryKey<NotNull<PgUUIDBuilderInitial<"">>>; year: NotNull<PgIntegerBuilderInitial<"">>; month: NotNull<...>; }>(name: "clinicsSessions", columns: { ...; }, extraConfig: (self: { ...; }) => PgTableExtraConfig) => PgTableWithColumns<...> (+3 overloads) @deprecated — This overload is deprecated. Use the other method overload instead.
10 replies
DTDrizzle Team
Created by Ali on 11/3/2024 in #help
Depreciated table
the issue seems to be probably related to
(t) => ({
unq: unique().on(t.year, t.month),
})
(t) => ({
unq: unique().on(t.year, t.month),
})
because deleting it removes the depreciation warning
10 replies
TTCTheo's Typesafe Cult
Created by cyremur on 6/5/2023 in #questions
Vercel Storage as CDN
That's permitted , but to use the public folder as content library to serve assets is not. I may be wrong !
13 replies
TTCTheo's Typesafe Cult
Created by cyremur on 6/5/2023 in #questions
Vercel Storage as CDN
If he is using vercel that's against their policies I think
13 replies
TTCTheo's Typesafe Cult
Created by cyremur on 6/5/2023 in #questions
Vercel Storage as CDN
1. Vercel blob is super expensive but has the best Dx. 2. Uploadthing would supposedly be less expensive and has the second best Dx. 3. S3 is even cheaper but has meh Dx. 4. R2 is the cheapest but has poor Dx. I personally would go with 2 or 3.
13 replies