I'm getting a Type error when trying to sync a model with @sequelize/snowflake ( "@sequelize/core": "^7.0.0-alpha.42", "@sequelize/snowflake": "^7.0.0-alpha.45"). I'm aware that the Snowflake dialect is community maintained. I am using Fastify.
Model:
@Table({
tableName: "EXAMPLE",
timestamps: false,
underscored: true,
})
export class Example extends Model<
InferAttributes<Example>,
InferCreationAttributes<Example>
> {
@Attribute(DataTypes.STRING)
@PrimaryKey
@ColumnName("TEST")
declare test: string;
...
TypeError: Expected type to be a string, a DataType class, or a DataType instance, but got STRING {
usageContext: undefined,
options: { length: undefined, binary: false }
}.
at normalizeDataType (/app/node_modules/@sequelize/core/src/abstract-dialect/data-types-utils.ts:47:11)
at Sequelize.normalizeDataType (/app/node_modules/@sequelize/core/src/sequelize-typescript.ts:1212:12)
at Sequelize.validateValue (/app/node_modules/@sequelize/core/src/sequelize-typescript.ts:1200:17)
at SnowflakeQueryGenerator.escape (/app/node_modules/@sequelize/snowflake/node_modules/@sequelize/core/src/abstract-dialect/query-generator-typescript.ts:867:20)
at SnowflakeQueryGenerator.tableExistsQuery (/app/node_modules/@sequelize/snowflake/node_modules/@sequelize/core/src/abstract-dialect/query-generator-typescript.ts:918:118)
at SnowflakeQueryInterface.tableExists (/app/node_modules/@sequelize/snowflake/node_modules/@sequelize/core/src/abstract-dialect/query-interface-typescript.ts:332:37)
at Function.sync (/app/node_modules/@sequelize/core/src/model.js:873:47)
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
at async <anonymous> (/app/src/plugins/sequelize.ts:20:3)