DHDistant Horizons
Created by Amm0 on 3/18/2024 in #help-me
This Pack Doesn't Have DH support
Apologies if this has been answered, but I can't seem to find it after searching for 20 minutes. I downloaded the fork of Complementary Shaders by EminGT (the one that says it has DH compatibility config), but every time I try to apply it in game I get a large red text box that says it won't work with DH. Is there an option somewhere that I can't find where I can turn that on? Any tips would be appreciated, thanks!
16 replies
DTDrizzle Team
Created by kinsyu on 12/1/2023 in #help
There's not enough information to infer relation
I am trying to use drizzle studio but I'm running into the following issue, There is not enough information to infer relation "__public__.collectionsTable.tokens". Here's a simplified version of the schema.
export const tokensTable = mysqlTable(
'tokens',
{
tokenId: varchar('token_id', { length: 255 }).notNull(),

metadataName: varchar('metadata_name', { length: 255 }),
metadataDescription: text('metadata_description'),
collectionId: varbinary('collection_id', {
length: 42,
}).notNull(),

createdAt: timestamp('created_at', {
mode: 'string',
}).defaultNow(),
updatedAt: timestamp('updated_at', {
mode: 'string',
}).defaultNow(),
}
)

export type Token = InferSelectModel<typeof tokensTable>
export type TokenInsert = InferInsertModel<typeof tokensTable>

export const tokensRelations = relations(tokensTable, ({ one }) => ({
collection: one(collectionsTable, {
fields: [tokensTable.collectionId],
references: [collectionsTable.id],
}),
}))

export const collectionsTable = mysqlTable(
'collections',
{
id: varbinary('id', {
length: 42,
}).primaryKey(),

name: varchar('name', {
length: 255,
}).notNull(),
description: text('description'),
createdAt: timestamp('created_at', {
mode: 'string',
}).defaultNow(),
updatedAt: timestamp('updated_at', {
mode: 'string',
}).defaultNow(),
}
)

export type Collection = InferSelectModel<typeof collectionsTable>
export type CollectionInsert = InferInsertModel<typeof collectionsTable>

export const collectionsRelations = relations(collectionsTable, ({ one, many }) => ({
tokens: many(tokensTable, {
relationName: 'collectionTokens',
}),
}))
export const tokensTable = mysqlTable(
'tokens',
{
tokenId: varchar('token_id', { length: 255 }).notNull(),

metadataName: varchar('metadata_name', { length: 255 }),
metadataDescription: text('metadata_description'),
collectionId: varbinary('collection_id', {
length: 42,
}).notNull(),

createdAt: timestamp('created_at', {
mode: 'string',
}).defaultNow(),
updatedAt: timestamp('updated_at', {
mode: 'string',
}).defaultNow(),
}
)

export type Token = InferSelectModel<typeof tokensTable>
export type TokenInsert = InferInsertModel<typeof tokensTable>

export const tokensRelations = relations(tokensTable, ({ one }) => ({
collection: one(collectionsTable, {
fields: [tokensTable.collectionId],
references: [collectionsTable.id],
}),
}))

export const collectionsTable = mysqlTable(
'collections',
{
id: varbinary('id', {
length: 42,
}).primaryKey(),

name: varchar('name', {
length: 255,
}).notNull(),
description: text('description'),
createdAt: timestamp('created_at', {
mode: 'string',
}).defaultNow(),
updatedAt: timestamp('updated_at', {
mode: 'string',
}).defaultNow(),
}
)

export type Collection = InferSelectModel<typeof collectionsTable>
export type CollectionInsert = InferInsertModel<typeof collectionsTable>

export const collectionsRelations = relations(collectionsTable, ({ one, many }) => ({
tokens: many(tokensTable, {
relationName: 'collectionTokens',
}),
}))
In short, each collection can have multiple tokens, but each token can belong to only one collection. I haven't had any issues with this schema for around the 6 months that we've been using it, but we wanted to try out drizzle studio and ran into that issue. The database is running on Planetscale, not sure if that's relevant.
3 replies
DTDrizzle Team
Created by McLean 25 on 4/5/2023 in #help
Can't find meta/_journal.json file when running migrate
3 replies
VVALORANT
Created by derek on 12/16/2023 in #community-help
how do you check what you got banned for?
Help
15 replies
DTDrizzle Team
Created by iqrow on 5/24/2023 in #help
How to delete with cascade?
I'm using postgres with the following schema (reduced to the important parts):
export const worlds = pgTable('worlds', {
id: uuid('id').defaultRandom().primaryKey()
})
export const users_to_worlds = pgTable(
'users_to_worlds',
{
userId: varchar('user_id', { length: 32 })
.references(() => users.id)
.notNull(),
worldId: uuid('world_id')
.references(() => worlds.id)
.notNull(),
},
(table) => {
return {
pk: primaryKey(table.userId, table.worldId),
}
}
)
export const worlds = pgTable('worlds', {
id: uuid('id').defaultRandom().primaryKey()
})
export const users_to_worlds = pgTable(
'users_to_worlds',
{
userId: varchar('user_id', { length: 32 })
.references(() => users.id)
.notNull(),
worldId: uuid('world_id')
.references(() => worlds.id)
.notNull(),
},
(table) => {
return {
pk: primaryKey(table.userId, table.worldId),
}
}
)
And I'm trying to implement an api call to delete a world. Due to the reference to the world in the users_to_worlds I get the error: Error: update or delete on table "worlds" violates foreign key constraint "users_to_worlds_world_id_worlds_id_fk" on table "users_to_worlds" I believe what I want to use is a CASCADE delete where everything referencing a world is deleted when I delete a world. Is this possible through Drizzle? I can't seem to find anything on this.
7 replies
DTDrizzle Team
Created by Louistiti on 7/18/2023 in #help
Clear the whole database?
For my test environment I'd like to clear the whole db.. is there a way to achieve this using drizzle ?
59 replies
VVALORANT
Created by jdxdsupreme on 2/7/2024 in #community-help
MY game crashes when it gets to the agent select screen or who attacking and who's defending screen
How do I fix it kicks me to lobby and gives no error message
25 replies
VVALORANT
Created by FlyawayNutria69 on 2/8/2024 in #community-help
van -79 error code?
What does this mean please
9 replies
DHDistant Horizons
Created by TANOFACA on 3/26/2024 in #help-me
DH in prominence 2
any idea how can i make DH work in prominence 2 modpack? https://www.curseforge.com/minecraft/modpacks/prominence-2-rpg
39 replies
DTDrizzle Team
Created by fermentfan on 7/30/2023 in #help
Mocking Drizzle instance
Hey there, I am currently trying to find a good way to mock our drizzle instance for our unit test suite, but the nature of the usage of it makes it kinda hard. Is there somebody who is running a code base with a mocked drizzle?
22 replies
DTDrizzle Team
Created by eatmoose on 6/2/2023 in #help
Auto update timestamp fields
How to auto update fields like updated_at?
17 replies
FFilament
Created by GeRaged | Niklas on 8/29/2023 in #❓┊help
Filament\FilamentManager::getUserName(): Return value must be of type string, null returned
Is it possible to edit the user at Filament? I want instead of the name column, the columns firstname and lastname, but then comes the following error. How can I use my own columns without destroying the logic of filament Filament\FilamentManager::getUserName(): Return value must be of type string, null returned
2 replies
Mmfad
Created by DVNO on 8/28/2023 in #brands
Does anyone have any experience with Universal Surplus?
No description
20 replies
VVALORANT
Created by Spacer on 3/26/2023 in #community-help
banned from lfg server
I left the lfg server because the channels were bugging for me and when i tried to rejoin it says I'm banned please help.
3 replies
VVALORANT
Created by Econ on 2/6/2024 in #community-help
Why can't I import crosshairs :(
No description
21 replies
DTDrizzle Team
Created by pablo on 9/21/2023 in #help
Does Drizzle support Microsoft SQL Server?
Does Drizzle support Microsoft SQL Server ?
3 replies
DTDrizzle Team
Created by johnnydt on 7/12/2023 in #help
testing best practices
Can anyone share how they're writing tests that involve drizzle? Looking for something similar to these docs for Prisma: https://www.prisma.io/docs/guides/testing/unit-testing
9 replies
DTDrizzle Team
Created by gambitboy on 6/6/2023 in #help
Postgres-js Migrate - Error: Can't find meta/_journal.json file [SOLVED]
I've gotten drizzle setup and running but I'm unable to run any migrations. I'm using postgres-js and created a migrate.ts file that i'm executing. Here is my code: /lib/migrate.ts
import { drizzle } from 'drizzle-orm/postgres-js';
import { migrate } from 'drizzle-orm/postgres-js/migrator';
import postgres from 'postgres';

const migrationClient = postgres("...", { max: 1 });
migrate(drizzle(migrationClient), { migrationsFolder: '../migrations-folder' });
import { drizzle } from 'drizzle-orm/postgres-js';
import { migrate } from 'drizzle-orm/postgres-js/migrator';
import postgres from 'postgres';

const migrationClient = postgres("...", { max: 1 });
migrate(drizzle(migrationClient), { migrationsFolder: '../migrations-folder' });
I setup my config file: ./crizzle.config.json
{
"out": "./migrations-folder",
"schema": "./lib/drizzle.ts",
"breakpoints": false
}
{
"out": "./migrations-folder",
"schema": "./lib/drizzle.ts",
"breakpoints": false
}
so I've managed to generate some migrations in the migrations-folder but the migrate function is failing. I've tried different databases, locations, tried to trigger the migration through a trpc api call.
10 replies
DTDrizzle Team
Created by paaradiso on 11/8/2023 in #help
Cannot read properties of undefined (reading 'referencedTable')
i'm just playing around with queries and i can't get this to work:
const liked = await db.query.collectionsTable.findMany({
with: {
likedCollectionsTable: true
}
});
const liked = await db.query.collectionsTable.findMany({
with: {
likedCollectionsTable: true
}
});
without the with it works. i'm passing the schemas to the db object:
export const db = drizzle(queryClient, { schema });
export const db = drizzle(queryClient, { schema });
and here are the two schemas:
export const likedCollectionsTable = pgTable('liked_collections', {
userId: text('user_id').references(() => usersTable.id),
collection_id: integer('collection_id').references(() => collectionsTable.id)
});

export const collectionsTable = pgTable('collections', {
id: integer('id').primaryKey(),
name: text('name'),
type: collectionTypeEnum('type'),
cover: text('cover'),
artist: text('artist'),
tags: text('tags')
.references(() => tagsTable.name)
.array(),
releaseDate: date('release_date'),
addedBy: text('added_by')
});
export const likedCollectionsTable = pgTable('liked_collections', {
userId: text('user_id').references(() => usersTable.id),
collection_id: integer('collection_id').references(() => collectionsTable.id)
});

export const collectionsTable = pgTable('collections', {
id: integer('id').primaryKey(),
name: text('name'),
type: collectionTypeEnum('type'),
cover: text('cover'),
artist: text('artist'),
tags: text('tags')
.references(() => tagsTable.name)
.array(),
releaseDate: date('release_date'),
addedBy: text('added_by')
});
12 replies
VVALORANT
Created by ᲼᲼J on 2/24/2024 in #community-help
geforce nto detecting
No description
7 replies
DTDrizzle Team
Created by ippo on 9/15/2023 in #help
TRIGGERS in Drizzle
Is there a way to define/implement TRIGGERs in Drizzle? An example would be great!
13 replies
IInfOE
Created by correct-apricot on 12/4/2023 in #🚀|alt-reddit
How do I handle multiple conflicting meetings?
title
4 replies
DTDrizzle Team
Created by laubonghaudoi on 7/11/2023 in #help
Error: self signed certificate in certificate chain
Hello, I am a new user of drizzle and trying to run the command for the first time:
drizzle-kit introspect:pg
drizzle-kit introspect:pg
But I got this error
[⣟] 0 tables fetching
[⣟] 0 columns fetching
[⣟] 0 enums fetching
[⣟] 0 indexes fetching
[⣟] 0 foreign keys fetching
Error: self signed certificate in certificate chain
at TLSSocket.onConnectSecure (node:_tls_wrap:1530:34)
at TLSSocket.emit (node:events:390:28)
at TLSSocket._finishInit (node:_tls_wrap:944:8)
at TLSWrap.ssl.onhandshakedone (node:_tls_wrap:725:12) {
code: 'SELF_SIGNED_CERT_IN_CHAIN'
}
[⣟] 0 tables fetching
[⣟] 0 columns fetching
[⣟] 0 enums fetching
[⣟] 0 indexes fetching
[⣟] 0 foreign keys fetching
Error: self signed certificate in certificate chain
at TLSSocket.onConnectSecure (node:_tls_wrap:1530:34)
at TLSSocket.emit (node:events:390:28)
at TLSSocket._finishInit (node:_tls_wrap:944:8)
at TLSWrap.ssl.onhandshakedone (node:_tls_wrap:725:12) {
code: 'SELF_SIGNED_CERT_IN_CHAIN'
}
I am connecting drizzle to my Supabase instance, and my config file is like this
import type { Config } from "drizzle-kit";

export default {
schema: "./src/schema.ts",
driver: "pg",
out: "./drizzle",
dbCredentials: {
host: process.env.host,
port: 5432,
user: "postgres",
password: process.env.password,
database: "postgres",
ssl: true,
},
} satisfies Config;
import type { Config } from "drizzle-kit";

export default {
schema: "./src/schema.ts",
driver: "pg",
out: "./drizzle",
dbCredentials: {
host: process.env.host,
port: 5432,
user: "postgres",
password: process.env.password,
database: "postgres",
ssl: true,
},
} satisfies Config;
I have already enabled ssl, why does this happen and how to resolve this?
24 replies
DTDrizzle Team
Created by SteveS on 8/11/2023 in #help
unknown command: drizzle-kit
Can't seem to get the command to work. Followed the instructions of the quick start guide. Any ideas?
24 replies
DTDrizzle Team
Created by rushil1o1 on 8/17/2023 in #help
updatedAt timestamp update on DB row update
Whats the best way to update Postgres values for updatedAt --- I'm assuming there's a drizzle helper ? Can't find anything
2 replies