Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: drizzle-kit push not working when changing the schema #395

Closed
davidaragundy opened this issue May 11, 2024 · 1 comment
Closed

[Bug]: drizzle-kit push not working when changing the schema #395

davidaragundy opened this issue May 11, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@davidaragundy
Copy link

This error occurred in drizzle-kit@0.20.1.

I have this table

export const users = sqliteTable("users", {
  id: text("id").notNull().primaryKey(),
  firstName: text("first_name").notNull(),
  lastName: text("last_name").notNull(),
  username: text("username").notNull().unique(),
  email: text("email").notNull().unique(),
  password: text("password").notNull(),
  avatarUrl: text("avatar_url").notNull(),
  postsCount: integer("posts_count").notNull().default(0),
  followersCount: integer("followers_count").notNull().default(0),
  followingsCount: integer("followings_count").notNull().default(0),
  createdAt: integer("created_at").notNull(),
});

and everything was working but when I change it to this one (deleting the postsCount field)

export const users = sqliteTable("users", {
  id: text("id").notNull().primaryKey(),
  firstName: text("first_name").notNull(),
  lastName: text("last_name").notNull(),
  username: text("username").notNull().unique(),
  email: text("email").notNull().unique(),
  password: text("password").notNull(),
  avatarUrl: text("avatar_url").notNull(),
  followersCount: integer("followers_count").notNull().default(0),
  followingsCount: integer("followings_count").notNull().default(0),
  createdAt: integer("created_at").notNull(),
});

throws this error:

Captura de pantalla 2024-05-10 220538

the table is empty tho

@AlexBlokh AlexBlokh self-assigned this May 21, 2024
@AlexBlokh AlexBlokh added the bug Something isn't working label May 21, 2024
@AndriiSherman
Copy link
Member

This should be fixed in drizzle-kit@0.21.3. If the issue persists, feel free to reopen it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants