push won't work

I just got started using Drizzle & Drizzle-kit, but I've been running into some strange issues. I created a table, pushed that table, tried to rename a column in that table and now I get the following result: 1. Rename the column in the jobs table 2. rename the jobs table to __old_push_jobs 3. create a new jobs table with the old, incorrect configuration 4. insert the old jobs into the new jobs Why would it make the change in the back-up schema? Is there anything I can do to solve this? I had more issues before that were only fixed by removing columns, pushing and then adding them again. I've tried downgrading to drizzle-kit 0.21.3 but I get the error message that I have to upgrade drizzle-kit. here's my drizzle.config.ts:
export default defineConfig({
schema: "./src/db/schema/*",
driver: "turso",
dialect: "sqlite",
dbCredentials: {
url: env.TURSO_DATABASE_URL,
authToken: env.TURSO_AUTH_TOKEN,
},
verbose: true,
strict: true,
});
export default defineConfig({
schema: "./src/db/schema/*",
driver: "turso",
dialect: "sqlite",
dbCredentials: {
url: env.TURSO_DATABASE_URL,
authToken: env.TURSO_AUTH_TOKEN,
},
verbose: true,
strict: true,
});
and my schema:
import { sql } from "drizzle-orm";
import { integer, sqliteTable, text } from "drizzle-orm/sqlite-core";

export const jobs = sqliteTable("jobs", {
id: integer("id").notNull().primaryKey({ autoIncrement: true }),
blendFileName: text("blend_file_name").notNull(),
createdAt: text("created_at")
.default(sql`CURRENT_TIMESTAMP`)
.notNull(),
});
import { sql } from "drizzle-orm";
import { integer, sqliteTable, text } from "drizzle-orm/sqlite-core";

export const jobs = sqliteTable("jobs", {
id: integer("id").notNull().primaryKey({ autoIncrement: true }),
blendFileName: text("blend_file_name").notNull(),
createdAt: text("created_at")
.default(sql`CURRENT_TIMESTAMP`)
.notNull(),
});
No description
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server