typesql-cli 0.8.0-alpha.1 → 0.8.0-alpha.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "typesql-cli",
3
- "version": "0.8.0-alpha.1",
3
+ "version": "0.8.0-alpha.2",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "bin": {
@@ -42,4 +42,4 @@
42
42
  "mysql2": "^3.9.3",
43
43
  "yargs": "^17.7.2"
44
44
  }
45
- }
45
+ }
@@ -17,7 +17,7 @@ function loadDbSchema(databaseUri) {
17
17
  t.name as 'table',
18
18
  ti.name as 'column',
19
19
  ti.type as column_type,
20
- ti.'notnull' as 'notnull',
20
+ ti.'notnull' or ti.pk = 1 as 'notNull',
21
21
  IIF(ti.pk = 1, 'PRI', '') as columnKey
22
22
  FROM all_tables t INNER JOIN pragma_table_info(t.name) ti
23
23
  `;