Jona Anders
DTDrizzle Team
•Created by Alex.dev on 8/8/2023 in #help
Identifier is too long (should not exceed 63 characters)
For now, you can just go into a migration file and replace or remove the parts. I know, this isn't pretty, but it does work. Just note that for every migration drizzle kit will try to rename it, so you have to delete the ALTER queries. Maybe just create a file or a note that includes the names of the keys so you can search and replace quickly. Or, if you have to much time to automate a task that you could do in a few seconds manually, write a short script that does it automatically
12 replies
DTDrizzle Team
•Created by Jona Anders on 7/29/2023 in #help
Typescript build fails, pointing to internal types.
node_modules/drizzle-orm/select.types.d-b947a018.d.ts:572:15 - error TS18052: Non-abstract class 'MySqlSelect<TTableName, TSelection, TSelectMode, TPreparedQueryHKT, TNullabilityMap>' does not implement all abstract members of 'MySqlSelectQueryBuilder<MySqlSelectHKT, TTableName, TSelection, TSelectMode, TNullabilityMap>'
572 declare class MySqlSelect<TTableName extends string | undefined, TSelection, TSelectMode extends SelectMode, TPreparedQueryHKT extends PreparedQueryHKTBase, TNullabilityMap extends Record<string, JoinNullability> = TTableName extends string ? Record<TTableName, 'not-null'> : {}> extends MySqlSelectQueryBuilder<MySqlSelectHKT, TTableName, TSelection, TSelectMode, TNullabilityMap> {
~~~~~~~~~~~
node_modules/drizzle-orm/select.types.d-eff54486.d.ts:9:14
9 abstract getSQL(): SQL;
~~~~~~
Non-abstract class 'MySqlSelect<TTableName, TSelection, TSelectMode, TPreparedQueryHKT, TNullabilityMap>' does not implement inherited abstract member 'getSQL' from class 'MySqlSelectQueryBuilder<MySqlSelectHKT, TTableName, TSelection, TSelectMode, TNullabilityMap>'.
Found 4 errors in 2 files.
Errors Files
2 node_modules/drizzle-orm/mysql-core/index.d.ts:735
2 node_modules/drizzle-orm/select.types.d-b947a018.d.ts:491
node_modules/drizzle-orm/select.types.d-b947a018.d.ts:572:15 - error TS18052: Non-abstract class 'MySqlSelect<TTableName, TSelection, TSelectMode, TPreparedQueryHKT, TNullabilityMap>' does not implement all abstract members of 'MySqlSelectQueryBuilder<MySqlSelectHKT, TTableName, TSelection, TSelectMode, TNullabilityMap>'
572 declare class MySqlSelect<TTableName extends string | undefined, TSelection, TSelectMode extends SelectMode, TPreparedQueryHKT extends PreparedQueryHKTBase, TNullabilityMap extends Record<string, JoinNullability> = TTableName extends string ? Record<TTableName, 'not-null'> : {}> extends MySqlSelectQueryBuilder<MySqlSelectHKT, TTableName, TSelection, TSelectMode, TNullabilityMap> {
~~~~~~~~~~~
node_modules/drizzle-orm/select.types.d-eff54486.d.ts:9:14
9 abstract getSQL(): SQL;
~~~~~~
Non-abstract class 'MySqlSelect<TTableName, TSelection, TSelectMode, TPreparedQueryHKT, TNullabilityMap>' does not implement inherited abstract member 'getSQL' from class 'MySqlSelectQueryBuilder<MySqlSelectHKT, TTableName, TSelection, TSelectMode, TNullabilityMap>'.
Found 4 errors in 2 files.
Errors Files
2 node_modules/drizzle-orm/mysql-core/index.d.ts:735
2 node_modules/drizzle-orm/select.types.d-b947a018.d.ts:491
3 replies
DTDrizzle Team
•Created by Jona Anders on 7/29/2023 in #help
Typescript build fails, pointing to internal types.
The error (split in half because of message length limit)
node_modules/drizzle-orm/mysql-core/index.d.ts:735:43 - error TS2344: Type 'Omit<T, "hasDefault"> & { hasDefault: true; } extends infer T_1 ? { [K in keyof T_1]: (Omit<T, "hasDefault"> & { hasDefault: true; })[K]; } : never' does not satisfy the constraint 'ColumnBuilderBaseConfig'.
Type '{}' is missing the following properties from type 'ColumnBuilderBaseConfig': name, data, driverParam, notNull, hasDefault
735 defaultNow(): ColumnBuilderKind<THKT, Omit<T, "hasDefault"> & {
~~~~~~~~~~~~~~~~~~~~~~~~~
736 hasDefault: true;
~~~~~~~~~~~~~~~~~~~~~~~~~
...
738 hasDefault: true;
~~~~~~~~~~~~~~~~~~~~~~~~~
739 })[K]; } : never>;
~~~~~~~~~~~~~~~~~~~~
node_modules/drizzle-orm/mysql-core/index.d.ts:737:47 - error TS2536: Type 'K' cannot be used to index type 'Omit<T, "hasDefault"> & { hasDefault: true; }'.
737 } extends infer T_1 ? { [K in keyof T_1]: (Omit<T, "hasDefault"> & {
~~~~~~~~~~~~~~~~~~~~~~~~~~
738 hasDefault: true;
~~~~~~~~~~~~~~~~~~~~~~~~~
739 })[K]; } : never>;
~~~~~~~~~
node_modules/drizzle-orm/select.types.d-b947a018.d.ts:491:15 - error TS2420: Class 'MySqlDelete<TTable, TQueryResult, TPreparedQueryHKT>' incorrectly implements interface 'SQLWrapper'.
Property 'getSQL' is missing in type 'MySqlDelete<TTable, TQueryResult, TPreparedQueryHKT>' but required in type 'SQLWrapper'.
491 declare class MySqlDelete<TTable extends AnyMySqlTable, TQueryResult extends QueryResultHKT, TPreparedQueryHKT extends PreparedQueryHKTBase> extends QueryPromise<QueryResultKind<TQueryResult, never>> implements SQLWrapper {
~~~~~~~~~~~
node_modules/drizzle-orm/column.d-aa4e525d.d.ts:275:5
275 getSQL(): SQL;
~~~~~~~~~~~~~~
'getSQL' is declared here.
node_modules/drizzle-orm/mysql-core/index.d.ts:735:43 - error TS2344: Type 'Omit<T, "hasDefault"> & { hasDefault: true; } extends infer T_1 ? { [K in keyof T_1]: (Omit<T, "hasDefault"> & { hasDefault: true; })[K]; } : never' does not satisfy the constraint 'ColumnBuilderBaseConfig'.
Type '{}' is missing the following properties from type 'ColumnBuilderBaseConfig': name, data, driverParam, notNull, hasDefault
735 defaultNow(): ColumnBuilderKind<THKT, Omit<T, "hasDefault"> & {
~~~~~~~~~~~~~~~~~~~~~~~~~
736 hasDefault: true;
~~~~~~~~~~~~~~~~~~~~~~~~~
...
738 hasDefault: true;
~~~~~~~~~~~~~~~~~~~~~~~~~
739 })[K]; } : never>;
~~~~~~~~~~~~~~~~~~~~
node_modules/drizzle-orm/mysql-core/index.d.ts:737:47 - error TS2536: Type 'K' cannot be used to index type 'Omit<T, "hasDefault"> & { hasDefault: true; }'.
737 } extends infer T_1 ? { [K in keyof T_1]: (Omit<T, "hasDefault"> & {
~~~~~~~~~~~~~~~~~~~~~~~~~~
738 hasDefault: true;
~~~~~~~~~~~~~~~~~~~~~~~~~
739 })[K]; } : never>;
~~~~~~~~~
node_modules/drizzle-orm/select.types.d-b947a018.d.ts:491:15 - error TS2420: Class 'MySqlDelete<TTable, TQueryResult, TPreparedQueryHKT>' incorrectly implements interface 'SQLWrapper'.
Property 'getSQL' is missing in type 'MySqlDelete<TTable, TQueryResult, TPreparedQueryHKT>' but required in type 'SQLWrapper'.
491 declare class MySqlDelete<TTable extends AnyMySqlTable, TQueryResult extends QueryResultHKT, TPreparedQueryHKT extends PreparedQueryHKTBase> extends QueryPromise<QueryResultKind<TQueryResult, never>> implements SQLWrapper {
~~~~~~~~~~~
node_modules/drizzle-orm/column.d-aa4e525d.d.ts:275:5
275 getSQL(): SQL;
~~~~~~~~~~~~~~
'getSQL' is declared here.
3 replies