Aliy Akhbar
Aliy Akhbar
DTDrizzle Team
Created by Aliy Akhbar on 5/23/2024 in #help
drizzle-kit push not updating table schem
Running npx drizzle-kit push --verbose i can see this error:
npx drizzle-kit push --verbose

drizzle-kit: v0.21.4
drizzle-orm: v0.30.10

website/node_modules/.pnpm/[email protected]/node_modules/drizzle-kit/bin.cjs:2143
const error2 = new ZodError(ctx.common.issues);
^

_ZodError: [
{
"expected": "'postgresql' | 'mysql' | 'sqlite'",
"received": "undefined",
"code": "invalid_type",
"path": [
"dialect"
],
"message": "Required"
}
]
at get error [as error]
npx drizzle-kit push --verbose

drizzle-kit: v0.21.4
drizzle-orm: v0.30.10

website/node_modules/.pnpm/[email protected]/node_modules/drizzle-kit/bin.cjs:2143
const error2 = new ZodError(ctx.common.issues);
^

_ZodError: [
{
"expected": "'postgresql' | 'mysql' | 'sqlite'",
"received": "undefined",
"code": "invalid_type",
"path": [
"dialect"
],
"message": "Required"
}
]
at get error [as error]
5 replies
DTDrizzle Team
Created by Aliy Akhbar on 5/23/2024 in #help
drizzle-kit push not updating table schem
seems like creating new columns isnt working for me.. 😦
5 replies
DTDrizzle Team
Created by Aliy Akhbar on 5/23/2024 in #help
drizzle-kit push not updating table schem
INSERT INTO "inquiry" SELECT * FROM "__old_push_inquiry";
DROP TABLE `__old_push_inquiry`;
ALTER TABLE `pages` RENAME TO `__old_push_pages`;
CREATE TABLE `pages` (
`id` integer PRIMARY KEY NOT NULL,
`key` text NOT NULL,
`content` text,
`created_at` text DEFAULT (CURRENT_TIMESTAMP),
`updated_at` text DEFAULT (CURRENT_TIMESTAMP)
);

INSERT INTO "pages" SELECT * FROM "__old_push_pages";
DROP TABLE `__old_push_pages`;
CREATE UNIQUE INDEX `pages_key_unique` ON `pages` (`key`);
ALTER TABLE `posts` RENAME TO `__old_push_posts`;
CREATE TABLE `posts` (
`id` integer PRIMARY KEY NOT NULL,
`title` text NOT NULL,
`content` text NOT NULL,
`description` text,
`published` text DEFAULT 'unpublished' NOT NULL,
`creator_id` text NOT NULL,
`image_url` text,
`created_at` text DEFAULT (CURRENT_TIMESTAMP),
`updated_at` text DEFAULT (CURRENT_TIMESTAMP)
);

INSERT INTO "posts" SELECT * FROM "__old_push_posts";
DROP TABLE `__old_push_posts`;
ALTER TABLE `translations` RENAME TO `__old_push_translations`;
CREATE TABLE `translations` (
`id` integer PRIMARY KEY NOT NULL,
`key` text NOT NULL,
`locale` text NOT NULL,
`translation` text NOT NULL,
`created_at` text DEFAULT (CURRENT_TIMESTAMP),
`updated_at` text DEFAULT (CURRENT_TIMESTAMP)
);

INSERT INTO "translations" SELECT * FROM "__old_push_translations";
DROP TABLE `__old_push_translations`;

[✓] Changes applied
INSERT INTO "inquiry" SELECT * FROM "__old_push_inquiry";
DROP TABLE `__old_push_inquiry`;
ALTER TABLE `pages` RENAME TO `__old_push_pages`;
CREATE TABLE `pages` (
`id` integer PRIMARY KEY NOT NULL,
`key` text NOT NULL,
`content` text,
`created_at` text DEFAULT (CURRENT_TIMESTAMP),
`updated_at` text DEFAULT (CURRENT_TIMESTAMP)
);

INSERT INTO "pages" SELECT * FROM "__old_push_pages";
DROP TABLE `__old_push_pages`;
CREATE UNIQUE INDEX `pages_key_unique` ON `pages` (`key`);
ALTER TABLE `posts` RENAME TO `__old_push_posts`;
CREATE TABLE `posts` (
`id` integer PRIMARY KEY NOT NULL,
`title` text NOT NULL,
`content` text NOT NULL,
`description` text,
`published` text DEFAULT 'unpublished' NOT NULL,
`creator_id` text NOT NULL,
`image_url` text,
`created_at` text DEFAULT (CURRENT_TIMESTAMP),
`updated_at` text DEFAULT (CURRENT_TIMESTAMP)
);

INSERT INTO "posts" SELECT * FROM "__old_push_posts";
DROP TABLE `__old_push_posts`;
ALTER TABLE `translations` RENAME TO `__old_push_translations`;
CREATE TABLE `translations` (
`id` integer PRIMARY KEY NOT NULL,
`key` text NOT NULL,
`locale` text NOT NULL,
`translation` text NOT NULL,
`created_at` text DEFAULT (CURRENT_TIMESTAMP),
`updated_at` text DEFAULT (CURRENT_TIMESTAMP)
);

INSERT INTO "translations" SELECT * FROM "__old_push_translations";
DROP TABLE `__old_push_translations`;

[✓] Changes applied
5 replies
DTDrizzle Team
Created by Aliy Akhbar on 5/23/2024 in #help
drizzle-kit push not updating table schem
when i try to run push again i can see this
[✓] Pulling schema from database...
Warning You are about to execute current statements:

ALTER TABLE `news` RENAME TO `__old_push_news`;
CREATE TABLE `news` (
`id` integer PRIMARY KEY NOT NULL,
`title` text NOT NULL,
`content` text NOT NULL,
`description` text,
`published` text DEFAULT 'unpublished' NOT NULL,
`image_url` text,
`testing` text,
`created_at` text DEFAULT (CURRENT_TIMESTAMP),
`updated_at` text DEFAULT (CURRENT_TIMESTAMP)
);

INSERT INTO "news" SELECT * FROM "__old_push_news";
DROP TABLE `__old_push_news`;
ALTER TABLE `inquiry` RENAME TO `__old_push_inquiry`;
CREATE TABLE `inquiry` (
`id` integer PRIMARY KEY NOT NULL,
`content` text,
`created_at` text DEFAULT (CURRENT_TIMESTAMP),
`updated_at` text DEFAULT (CURRENT_TIMESTAMP)
);
[✓] Pulling schema from database...
Warning You are about to execute current statements:

ALTER TABLE `news` RENAME TO `__old_push_news`;
CREATE TABLE `news` (
`id` integer PRIMARY KEY NOT NULL,
`title` text NOT NULL,
`content` text NOT NULL,
`description` text,
`published` text DEFAULT 'unpublished' NOT NULL,
`image_url` text,
`testing` text,
`created_at` text DEFAULT (CURRENT_TIMESTAMP),
`updated_at` text DEFAULT (CURRENT_TIMESTAMP)
);

INSERT INTO "news" SELECT * FROM "__old_push_news";
DROP TABLE `__old_push_news`;
ALTER TABLE `inquiry` RENAME TO `__old_push_inquiry`;
CREATE TABLE `inquiry` (
`id` integer PRIMARY KEY NOT NULL,
`content` text,
`created_at` text DEFAULT (CURRENT_TIMESTAMP),
`updated_at` text DEFAULT (CURRENT_TIMESTAMP)
);
5 replies
DTDrizzle Team
Created by joshborseth on 9/14/2023 in #help
TypeError: Cannot read properties of undefined (reading 'compositePrimaryKeys')
are they fixing this issue? TypeError: Cannot read properties of undefined (reading 'primaryKey')
44 replies
TTCTheo's Typesafe Cult
Created by embersee on 10/22/2023 in #questions
Error on adding t3 app router to existing NextJS project
Yeah will try out few more times before seeking for help 👍🏻
39 replies
TTCTheo's Typesafe Cult
Created by embersee on 10/22/2023 in #questions
Error on adding t3 app router to existing NextJS project
I mean if the fresh one can’t even work properly after deploying to sst, then I wouldn’t even use it 🤣
39 replies
TTCTheo's Typesafe Cult
Created by embersee on 10/22/2023 in #questions
Error on adding t3 app router to existing NextJS project
Fresh one
39 replies
TTCTheo's Typesafe Cult
Created by embersee on 10/22/2023 in #questions
Error on adding t3 app router to existing NextJS project
No worries! Trying to dig around to test more 🫠
39 replies
TTCTheo's Typesafe Cult
Created by embersee on 10/22/2023 in #questions
Error on adding t3 app router to existing NextJS project
Funny thing today I tried with vercel to deploy it’s also not working 🤣
39 replies
TTCTheo's Typesafe Cult
Created by embersee on 10/22/2023 in #questions
Error on adding t3 app router to existing NextJS project
doesnt seem to make any diff 😦
39 replies
TTCTheo's Typesafe Cult
Created by embersee on 10/22/2023 in #questions
Error on adding t3 app router to existing NextJS project
yup, got it. lemme try that
39 replies
TTCTheo's Typesafe Cult
Created by embersee on 10/22/2023 in #questions
Error on adding t3 app router to existing NextJS project
hmm let me try that
39 replies
TTCTheo's Typesafe Cult
Created by embersee on 10/22/2023 in #questions
Error on adding t3 app router to existing NextJS project
did you change yours too?
39 replies
TTCTheo's Typesafe Cult
Created by embersee on 10/22/2023 in #questions
Error on adding t3 app router to existing NextJS project
39 replies
TTCTheo's Typesafe Cult
Created by embersee on 10/22/2023 in #questions
Error on adding t3 app router to existing NextJS project
working locally
39 replies
TTCTheo's Typesafe Cult
Created by embersee on 10/22/2023 in #questions
Error on adding t3 app router to existing NextJS project
prod
39 replies
TTCTheo's Typesafe Cult
Created by embersee on 10/22/2023 in #questions
Error on adding t3 app router to existing NextJS project
i can see this
2023-10-23T15:59:08.786Z e01192b4-091e-4965-af58-043e3abcfe6d ERROR TRPCClientError: fetch failed
at TRPCClientError.from (/var/task/.next/server/chunks/886.js:1:22649)
at /var/task/.next/server/chunks/886.js:1:27723
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
meta: undefined,
shape: undefined,
data: undefined,
[cause]: TypeError: fetch failed
at Object.fetch (node:internal/deps/undici/undici:11576:11)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
cause: Error: connect ECONNREFUSED 127.0.0.1:3000
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1555:16)
at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
errno: -111,
code: 'ECONNREFUSED',
syscall: 'connect',
address: '127.0.0.1',
port: 3000
}
}
}
2023-10-23T15:59:08.786Z e01192b4-091e-4965-af58-043e3abcfe6d ERROR TRPCClientError: fetch failed
at TRPCClientError.from (/var/task/.next/server/chunks/886.js:1:22649)
at /var/task/.next/server/chunks/886.js:1:27723
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
meta: undefined,
shape: undefined,
data: undefined,
[cause]: TypeError: fetch failed
at Object.fetch (node:internal/deps/undici/undici:11576:11)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
cause: Error: connect ECONNREFUSED 127.0.0.1:3000
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1555:16)
at TCPConnectWrap.callbackTrampoline (node:internal/async_hooks:130:17) {
errno: -111,
code: 'ECONNREFUSED',
syscall: 'connect',
address: '127.0.0.1',
port: 3000
}
}
}
39 replies
TTCTheo's Typesafe Cult
Created by embersee on 10/22/2023 in #questions
Error on adding t3 app router to existing NextJS project
39 replies
TTCTheo's Typesafe Cult
Created by embersee on 10/22/2023 in #questions
Error on adding t3 app router to existing NextJS project
1 min!
39 replies