Gaz
Gaz
Explore posts from servers
DTDrizzle Team
Created by Gaz on 4/20/2024 in #help
Issues when running Drizzle studio on Vercel Postgres
looks resolved, thanks!
49 replies
DTDrizzle Team
Created by Gaz on 4/20/2024 in #help
Issues when running Drizzle studio on Vercel Postgres
good "night"
49 replies
DTDrizzle Team
Created by Gaz on 4/20/2024 in #help
Issues when running Drizzle studio on Vercel Postgres
yep, will check here when I get up 🙂
49 replies
DTDrizzle Team
Created by Gaz on 4/20/2024 in #help
Issues when running Drizzle studio on Vercel Postgres
ok
49 replies
DTDrizzle Team
Created by Gaz on 4/20/2024 in #help
Issues when running Drizzle studio on Vercel Postgres
it's almost 4:30 am but I can try to create a test repo later to help, should be easy enough
49 replies
DTDrizzle Team
Created by Gaz on 4/20/2024 in #help
Issues when running Drizzle studio on Vercel Postgres
no sir, I actually installed latest via pnpm add drizzle-kit@latest -D after posting this question to see if it helped but it did not
49 replies
DTDrizzle Team
Created by Gaz on 4/20/2024 in #help
Issues when running Drizzle studio on Vercel Postgres
if it helps, my vercel db also has a hyphen
49 replies
DTDrizzle Team
Created by Gaz on 4/20/2024 in #help
Issues when running Drizzle studio on Vercel Postgres
t3app should likely convert hypens to underscores or something
49 replies
DTDrizzle Team
Created by Gaz on 4/20/2024 in #help
Issues when running Drizzle studio on Vercel Postgres
if I had to guess, I know pgsql doesn't like hyphens in db/tablenames ideally, and may require some escaping there
49 replies
DTDrizzle Team
Created by Gaz on 4/20/2024 in #help
Issues when running Drizzle studio on Vercel Postgres
and db studio started working
49 replies
DTDrizzle Team
Created by Gaz on 4/20/2024 in #help
Issues when running Drizzle studio on Vercel Postgres
yes sir
49 replies
DTDrizzle Team
Created by Gaz on 4/20/2024 in #help
Issues when running Drizzle studio on Vercel Postgres
just messing around with the create t3 scaffold
49 replies
DTDrizzle Team
Created by Gaz on 4/20/2024 in #help
Issues when running Drizzle studio on Vercel Postgres
full was this:
// Example model schema from the Drizzle docs
// https://orm.drizzle.team/docs/sql-schema-declaration

import { sql } from "drizzle-orm";
import {
index,
pgTableCreator,
serial,
timestamp,
varchar,
} from "drizzle-orm/pg-core";

/**
* This is an example of how to use the multi-project schema feature of Drizzle ORM. Use the same
* database instance for multiple projects.
*
* @see https://orm.drizzle.team/docs/goodies#multi-project-schema
*/
export const createTable = pgTableCreator((name) => `my-test-project_${name}`);

export const posts = createTable(
"post",
{
id: serial("id").primaryKey(),
name: varchar("name", { length: 256 }),
createdAt: timestamp("created_at")
.default(sql`CURRENT_TIMESTAMP`)
.notNull(),
updatedAt: timestamp("updatedAt"),
},
(example) => ({
nameIndex: index("name_idx").on(example.name),
})
);
// Example model schema from the Drizzle docs
// https://orm.drizzle.team/docs/sql-schema-declaration

import { sql } from "drizzle-orm";
import {
index,
pgTableCreator,
serial,
timestamp,
varchar,
} from "drizzle-orm/pg-core";

/**
* This is an example of how to use the multi-project schema feature of Drizzle ORM. Use the same
* database instance for multiple projects.
*
* @see https://orm.drizzle.team/docs/goodies#multi-project-schema
*/
export const createTable = pgTableCreator((name) => `my-test-project_${name}`);

export const posts = createTable(
"post",
{
id: serial("id").primaryKey(),
name: varchar("name", { length: 256 }),
createdAt: timestamp("created_at")
.default(sql`CURRENT_TIMESTAMP`)
.notNull(),
updatedAt: timestamp("updatedAt"),
},
(example) => ({
nameIndex: index("name_idx").on(example.name),
})
);
49 replies
DTDrizzle Team
Created by Gaz on 4/20/2024 in #help
Issues when running Drizzle studio on Vercel Postgres
removing the hyphens solved it
49 replies
DTDrizzle Team
Created by Gaz on 4/20/2024 in #help
Issues when running Drizzle studio on Vercel Postgres
export const createTable = pgTableCreator((name) => `my-test-project_${name}`);
export const createTable = pgTableCreator((name) => `my-test-project_${name}`);
49 replies
DTDrizzle Team
Created by Gaz on 4/20/2024 in #help
Issues when running Drizzle studio on Vercel Postgres
that was it
49 replies
DTDrizzle Team
Created by Gaz on 4/20/2024 in #help
Issues when running Drizzle studio on Vercel Postgres
looks like similar to someone else's question posted 4 hours ago as well
49 replies
DTDrizzle Team
Created by Gaz on 4/20/2024 in #help
Issues when running Drizzle studio on Vercel Postgres
No description
49 replies
DTDrizzle Team
Created by Gaz on 4/20/2024 in #help
Issues when running Drizzle studio on Vercel Postgres
ubuntu 22 lts, node 20.12.2, pnpm 9.0.4
49 replies
DTDrizzle Team
Created by Gaz on 4/20/2024 in #help
Issues when running Drizzle studio on Vercel Postgres
additional info:
"dependencies": {
"@t3-oss/env-nextjs": "^0.9.2",
"@vercel/postgres": "^0.8.0",
"drizzle-orm": "^0.29.4",
"next": "^14.2.1",
"postgres": "^3.4.3",
"react": "18.2.0",
"react-dom": "18.2.0",
"zod": "^3.22.4"
},
"devDependencies": {
"@types/eslint": "^8.56.2",
"@types/node": "^20.11.20",
"@types/react": "^18.2.57",
"@types/react-dom": "^18.2.19",
"@typescript-eslint/eslint-plugin": "^7.1.1",
"@typescript-eslint/parser": "^7.1.1",
"drizzle-kit": "^0.20.14",
"eslint": "^8.57.0",
"eslint-config-next": "^14.1.3",
"eslint-plugin-drizzle": "^0.2.3",
"pg": "^8.11.3",
"postcss": "^8.4.34",
"prettier": "^3.2.5",
"prettier-plugin-tailwindcss": "^0.5.11",
"tailwindcss": "^3.4.1",
"typescript": "^5.4.2"
},
"ct3aMetadata": {
"initVersion": "7.30.2"
},
"packageManager": "[email protected]"
"dependencies": {
"@t3-oss/env-nextjs": "^0.9.2",
"@vercel/postgres": "^0.8.0",
"drizzle-orm": "^0.29.4",
"next": "^14.2.1",
"postgres": "^3.4.3",
"react": "18.2.0",
"react-dom": "18.2.0",
"zod": "^3.22.4"
},
"devDependencies": {
"@types/eslint": "^8.56.2",
"@types/node": "^20.11.20",
"@types/react": "^18.2.57",
"@types/react-dom": "^18.2.19",
"@typescript-eslint/eslint-plugin": "^7.1.1",
"@typescript-eslint/parser": "^7.1.1",
"drizzle-kit": "^0.20.14",
"eslint": "^8.57.0",
"eslint-config-next": "^14.1.3",
"eslint-plugin-drizzle": "^0.2.3",
"pg": "^8.11.3",
"postcss": "^8.4.34",
"prettier": "^3.2.5",
"prettier-plugin-tailwindcss": "^0.5.11",
"tailwindcss": "^3.4.1",
"typescript": "^5.4.2"
},
"ct3aMetadata": {
"initVersion": "7.30.2"
},
"packageManager": "[email protected]"
49 replies