Closed Moka-admin0 closed 2 weeks ago
NVM you must do this:
import * as sql from "drizzle-orm/mysql-core";
export const ItemStack = sql.mysqlTable("ItemStack", {
id: sql.varchar('id', {length: 255}).notNull(),
itemId: sql.varchar('itemId', {length: 255}).notNull(),
variant: sql.varchar('variant', {length: 255}),
inventoryId: sql.varchar('inventoryId', {length: 255}),
slot: sql.int('slot'),
quantity: sql.int('quantity'),
decayStartedAt: sql.date('decayStartedAt'),
publicMetadata: sql.json('publicMetadata').default("{}"),
createdAt: sql.date('createdAt'),
updatedAt: sql.date('updatedAt'),
hash: sql.varchar('hash', {length: 255}),
quality: sql.int('quality'),
weight: sql.float('weight')
});
What version of
drizzle-orm
are you using?0.31.2
What version of
drizzle-kit
are you using?0.22.7
Describe the Bug
after making a build for production it builds successfully, but when you run the porject it faileds,
**ERROR** ReferenceError: int is not defined
inside the build file
Expected behavior
load the script as needed
Environment & setup
tsconfig:
build.js: == "build:dev": "cd build && node build.js",