sik
sik
DTDrizzle Team
Created by sik on 8/26/2023 in #help
import { PostgresError } from "postgres" - build error?
yeah figured it out later
3 replies
DTDrizzle Team
Created by Jaxwn on 8/27/2023 in #help
Reference to auth.users?
7 replies
DTDrizzle Team
Created by Jaxwn on 8/27/2023 in #help
Reference to auth.users?
might check this issue on github
7 replies
DTDrizzle Team
Created by Jaxwn on 8/27/2023 in #help
Reference to auth.users?
yea currently there is no official support from supabase to get auth.users
7 replies
DTDrizzle Team
Created by thomasmol on 8/27/2023 in #help
Running migrate() in Sveltekit project
import { drizzle } from 'drizzle-orm/postgres-js';
import { migrate } from 'drizzle-orm/postgres-js/migrator';
import postgres from 'postgres';

import 'dotenv/config';

const connectionString = process.env.DATABASE_URL ?? '';
const client = postgres(connectionString, { max: 1 });

const db = drizzle(client);

export async function main() {
try {
console.log('Migrating database...');
await migrate(db, { migrationsFolder: 'drizzle' });
console.log('Database migrated.');
} catch (err) {
console.error(err);
}
process.exit(0);
}
main();
import { drizzle } from 'drizzle-orm/postgres-js';
import { migrate } from 'drizzle-orm/postgres-js/migrator';
import postgres from 'postgres';

import 'dotenv/config';

const connectionString = process.env.DATABASE_URL ?? '';
const client = postgres(connectionString, { max: 1 });

const db = drizzle(client);

export async function main() {
try {
console.log('Migrating database...');
await migrate(db, { migrationsFolder: 'drizzle' });
console.log('Database migrated.');
} catch (err) {
console.error(err);
}
process.exit(0);
}
main();
8 replies
DTDrizzle Team
Created by thomasmol on 8/27/2023 in #help
Running migrate() in Sveltekit project
if you are using sveltekit $env variables in migrate.ts mind you that will not work
8 replies
DTDrizzle Team
Created by thomasmol on 8/27/2023 in #help
Running migrate() in Sveltekit project
i have a script something like this tsx ./src/lib/server/db/migrate.ts
8 replies
DTDrizzle Team
Created by thomasmol on 8/27/2023 in #help
Running migrate() in Sveltekit project
i use tsx dont know if this is a ts-node issue
8 replies
DTDrizzle Team
Created by Zamiel on 8/14/2023 in #help
What is the Drizzle convention for storing the `db` object?
how are you loading envs then if not importing
57 replies
DTDrizzle Team
Created by Paul on 8/3/2023 in #help
When pushing migrations to Supabase, it skips saying the schema "drizzle" already exists.
does it work locally? like do the migrations apply on the local database instance
6 replies
DTDrizzle Team
Created by jakeleventhal on 8/13/2023 in #help
Default values not working for insert
id: uuid('id').defaultRandom().primaryKey(),
id: uuid('id').defaultRandom().primaryKey(),
15 replies
DTDrizzle Team
Created by jakeleventhal on 8/13/2023 in #help
Default values not working for insert
something like this
15 replies
DTDrizzle Team
Created by jakeleventhal on 8/13/2023 in #help
Default values not working for insert
if you want to generate unique id for your id column. You can use uuid() instead of text()
15 replies
DTDrizzle Team
Created by sik on 8/10/2023 in #help
how to convert serial to uuid type
currently i'm working on local database instance so I can delete previous migrations and start from scratch but i'm just curious to find the solution
8 replies
DTDrizzle Team
Created by sik on 8/10/2023 in #help
how to convert serial to uuid type
currently no but I think @pandareaper solution worth a try
8 replies
DTDrizzle Team
Created by sik on 8/10/2023 in #help
how to convert serial to uuid type
surprising thing is I can change the id type to text() but no uuid()
8 replies
DTDrizzle Team
Created by sik on 8/10/2023 in #help
how to convert serial to uuid type
yes as I said I updated the id column type to uuid. I deleted all the previous data in table
8 replies