rfrancociavaldini
rfrancociavaldini
DTDrizzle Team
Created by rfrancociavaldini on 9/16/2023 in #help
Relations include query
Ok got it. I generated the schema file using drizzle-kit from an existing MySQL database, maybe there's something to check there, should I open an issue?
7 replies
DTDrizzle Team
Created by rfrancociavaldini on 9/13/2023 in #help
MySQL Table Schemas
Not re-deploy everytime, only would need to create a new set of tables. We currently use this method using Sequelize ORM and it has support for it out of the box, would love to be able to recreate this with Drizzle
12 replies
DTDrizzle Team
Created by rfrancociavaldini on 9/13/2023 in #help
MySQL Table Schemas
Something similar, to have one database with multiple tables for multiple tenants (1. Users, 2.Users, etc) where 1,2...N are identifiers for these tenants.
12 replies
DTDrizzle Team
Created by rfrancociavaldini on 9/13/2023 in #help
MySQL Table Schemas
Is it possible to use that approach to generate tables using drizzle-kit generate command? import { int, text, mysqlTableCreator } from 'drizzle-orm/mysql-core'; const mysqlTable = mysqlTableCreator((name) => 1.${name}); const secondTable = mysqlTableCreator((name) => 2.${name}); export const users = mysqlTable('users', { id: int('id').primaryKey(), name: text('name').notNull(), }); export const secondUsers = secondTable('users', { id: int('id').primaryKey(), name: text('name').notNull(), }); I'm able to create tables 1.users and 2.users but I need drizzle-kit to read them dynamically, like looping through an array or something. Is that possible?
12 replies
DTDrizzle Team
Created by rfrancociavaldini on 9/13/2023 in #help
MySQL Table Schemas
How about only the prefix in the table name? Is that possible in drizzle?
12 replies