You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I run pnpm drizzle-kit push, it outputs following although it is already applied (i.e., running pnpm drizzle-kit push again without schema changes still attemps to make the following change). It should run a migration only if there are schema changes.
$ pnpm drizzle-kit push
No config path provided, using default 'drizzle.config.ts'
Reading config file '.../src/drizzle.config.ts'
[✓] Pulling schema from database...
Warning You are about to execute current statements:
CREATE TABLE `__new_organisationUser` (
`organisationId` integer NOT NULL,
`userId` integer NOT NULL,
`roles` text DEFAULT '[]',
PRIMARY KEY(`userId`, `organisationId`),
FOREIGN KEY (`organisationId`) REFERENCES `organisation`(`id`) ON UPDATE no action ON DELETE no action,
FOREIGN KEY (`userId`) REFERENCES `user`(`id`) ON UPDATE no action ON DELETE no action
);
INSERT INTO `__new_organisationUser`("organisationId", "userId", "roles") SELECT "organisationId", "userId", "roles" FROM `organisationUser`;
DROP TABLE `organisationUser`;
ALTER TABLE `__new_organisationUser` RENAME TO `organisationUser`;
[✓] Changes applied
The text was updated successfully, but these errors were encountered:
Report hasn't been filed before.
What version of
drizzle-orm
are you using?0.36.4
What version of
drizzle-kit
are you using?0.27.2
Other packages
No response
Describe the Bug
drizzle-kit push
is executing migrations even without schema changesPlease see the following example.
schema.ts
drizzle.config.ts
When I run
pnpm drizzle-kit push
, it outputs following although it is already applied (i.e., runningpnpm drizzle-kit push
again without schema changes still attemps to make the following change). It should run a migration only if there are schema changes.The text was updated successfully, but these errors were encountered: