fix: enable pgcrypto extension for gen_random_bytes in monitor IDs

This commit is contained in:
nate 2026-03-18 21:08:19 +04:00
parent 2075de164d
commit 56114a3852
2 changed files with 2 additions and 0 deletions

View File

@ -9,6 +9,7 @@ const sql = postgres(process.env.DATABASE_URL ?? "postgres://pingql:pingql@local
export default sql; export default sql;
export async function migrate() { export async function migrate() {
await sql`CREATE EXTENSION IF NOT EXISTS pgcrypto`;
await sql` await sql`
CREATE TABLE IF NOT EXISTS accounts ( CREATE TABLE IF NOT EXISTS accounts (
id UUID PRIMARY KEY DEFAULT gen_random_uuid(), id UUID PRIMARY KEY DEFAULT gen_random_uuid(),

View File

@ -9,6 +9,7 @@ const sql = postgres(process.env.DATABASE_URL ?? "postgres://pingql:pingql@local
export default sql; export default sql;
export async function migrate() { export async function migrate() {
await sql`CREATE EXTENSION IF NOT EXISTS pgcrypto`;
await sql` await sql`
CREATE TABLE IF NOT EXISTS accounts ( CREATE TABLE IF NOT EXISTS accounts (
id UUID PRIMARY KEY DEFAULT gen_random_uuid(), id UUID PRIMARY KEY DEFAULT gen_random_uuid(),