mysql-schema-ts icon indicating copy to clipboard operation
mysql-schema-ts copied to clipboard

✨convert mysql schemas into TypeScript interfaces

Results 9 mysql-schema-ts issues
Sort by recently updated
recently updated
newest added

The library is great as compared to others. Please make `TableWithDefaults` interface optional as it not needed for every use-case.

https://github.com/nettofarah/mysql-schema-ts/issues/19

Besides generating `T` & `TWithDefault`, generate schema type/interface like this: ```ts export type Schema = { // this name could contain database name mby? user: { normal: User; withDefaults: UserWithDefaults...

``` SyntaxError: Numeric separators are not allowed here. (18:6) 16 | */ 17 | export interface SQLAlgorithm1 { > 18 | 1_activations?: string| null | ^ 19 | ,1_conditions?: string|...

This PR adds support for respecting the column position when converting to TypeScript :~) (cc @nettofarah, since I'm a collaborator now I'm not sure if I should push to master...

trying to generate schema for our database tables and received the following error in regards to a column named `3dsecure`. Error Log ``` SyntaxError: An identifier or keyword cannot immediately...

...which in turn causes an off-by-one error in the version reported by the generated types: From the top of a file created by the latest version v1.6.2: ```ts /** Schema...

Got: ``` npx mysql-schema-ts TypeError: Cannot read property 'substr' of null at Function.ConnectionConfig.parseUrl (/Users/carlos.villela/dev/src/github.com/segmentio/sprout/node_modules/mysql/lib/ConnectionConfig.js:177:29) at new ConnectionConfig (/Users/carlos.villela/dev/src/github.com/segmentio/sprout/node_modules/mysql/lib/ConnectionConfig.js:9:32) at Object.createConnection (/Users/carlos.villela/dev/src/github.com/segmentio/sprout/node_modules/mysql/index.js:13:34) at new MySQL (/Users/carlos.villela/dev/src/github.com/segmentio/sprout/node_modules/mysql-schema-ts/dist/src/mysql-client.js:27:35) at Object.inferSchema (/Users/carlos.villela/dev/src/github.com/segmentio/sprout/node_modules/mysql-schema-ts/dist/src/index.js:40:16) at main...

bug

A nice option to this tool would be the ability to have types or interfaces generated that reflect relationships between tables. For example, if I have a table of School,...