diff --git a/changelogs/drizzle-kit/0.26.1.md b/changelogs/drizzle-kit/0.26.1.md new file mode 100644 index 000000000..da488ede8 --- /dev/null +++ b/changelogs/drizzle-kit/0.26.1.md @@ -0,0 +1 @@ +- Fix `data is malformed` for views \ No newline at end of file diff --git a/drizzle-kit/package.json b/drizzle-kit/package.json index ce2de1468..ab45203ba 100644 --- a/drizzle-kit/package.json +++ b/drizzle-kit/package.json @@ -1,6 +1,6 @@ { "name": "drizzle-kit", - "version": "0.26.0", + "version": "0.26.1", "homepage": "https://orm.drizzle.team", "keywords": [ "drizzle", diff --git a/drizzle-kit/src/serializer/mysqlSchema.ts b/drizzle-kit/src/serializer/mysqlSchema.ts index 0255afc10..3a6fb9179 100644 --- a/drizzle-kit/src/serializer/mysqlSchema.ts +++ b/drizzle-kit/src/serializer/mysqlSchema.ts @@ -148,7 +148,7 @@ export const schemaInternal = object({ version: literal('5'), dialect: dialect, tables: record(string(), table), - views: record(string(), view), + views: record(string(), view).default({}), _meta: object({ tables: record(string(), string()), columns: record(string(), string()), diff --git a/drizzle-kit/src/serializer/sqliteSchema.ts b/drizzle-kit/src/serializer/sqliteSchema.ts index 54587c3e0..8fd98d99d 100644 --- a/drizzle-kit/src/serializer/sqliteSchema.ts +++ b/drizzle-kit/src/serializer/sqliteSchema.ts @@ -90,7 +90,7 @@ export const schemaInternalV4 = object({ version: literal('4'), dialect: dialect, tables: record(string(), table), - views: record(string(), view), + views: record(string(), view).default({}), enums: object({}), }).strict(); @@ -122,7 +122,7 @@ export const schemaInternal = object({ version: latestVersion, dialect: dialect, tables: record(string(), table), - views: record(string(), view), + views: record(string(), view).default({}), enums: object({}), _meta: object({ tables: record(string(), string()),