Report hasn't been filed before.
What version of drizzle-orm are you using?
0.39.2
What version of drizzle-kit are you using?
0.30.4
Other packages
No response
Describe the Bug
Defining a pgView as follows:
export const test = pgTable('test', {
testId: serial().primaryKey(),
testName: text().notNull(),
});
export const testView = pgView('test_view').as((qb) => {
return qb
.select({
testId: test.testId,
testName: test.testName,
})
.from(test);
});
Results in the following migration file:
CREATE TABLE "test" (
"test_id" serial PRIMARY KEY NOT NULL,
"test_name" text NOT NULL
);
--> statement-breakpoint
CREATE VIEW "public"."test_view" AS (select "testId", "testName" from "test");
Notice how the in test table names have been correctly converted to snake_case while the CREATE VIEW statement refers in camelCase.
This results in a broken migration.
I would expect testId and testName to be referenced as test_id and test_name in the view as well.
Report hasn't been filed before.
What version of
drizzle-ormare you using?0.39.2
What version of
drizzle-kitare you using?0.30.4
Other packages
No response
Describe the Bug
Defining a pgView as follows:
Results in the following migration file:
Notice how the in
testtable names have been correctly converted tosnake_casewhile theCREATE VIEWstatement refers incamelCase.This results in a broken migration.
I would expect testId and testName to be referenced as
test_idandtest_namein the view as well.