knex-schema-inspector
Advanced tools
Comparing version 1.5.2 to 1.5.3
@@ -9,3 +9,3 @@ import { Knex } from 'knex'; | ||
COLUMN_DEFAULT: any | null; | ||
DATA_TYPE: string; | ||
COLUMN_TYPE: string; | ||
CHARACTER_MAXIMUM_LENGTH: number | null; | ||
@@ -12,0 +12,0 @@ NUMERIC_PRECISION: number | null; |
@@ -56,3 +56,3 @@ "use strict"; | ||
table: rawColumn.TABLE_NAME, | ||
data_type: rawColumn.DATA_TYPE, | ||
data_type: rawColumn.COLUMN_TYPE.split('(')[0], | ||
default_value: (_a = parseDefaultValue(rawColumn.COLUMN_DEFAULT)) !== null && _a !== void 0 ? _a : parseDefaultValue(rawColumn.GENERATION_EXPRESSION || null), | ||
@@ -215,3 +215,3 @@ max_length: rawColumn.CHARACTER_MAXIMUM_LENGTH, | ||
query = this.knex | ||
.select('c.TABLE_NAME', 'c.COLUMN_NAME', 'c.COLUMN_DEFAULT', 'c.DATA_TYPE', 'c.CHARACTER_MAXIMUM_LENGTH', 'c.IS_NULLABLE', 'c.COLUMN_KEY', 'c.EXTRA', 'c.COLLATION_NAME', 'c.COLUMN_COMMENT', 'c.NUMERIC_PRECISION', 'c.NUMERIC_SCALE', 'c.GENERATION_EXPRESSION', 'fk.REFERENCED_TABLE_NAME', 'fk.REFERENCED_COLUMN_NAME', 'fk.CONSTRAINT_NAME', 'rc.UPDATE_RULE', 'rc.DELETE_RULE', 'rc.MATCH_OPTION') | ||
.select('c.TABLE_NAME', 'c.COLUMN_NAME', 'c.COLUMN_DEFAULT', 'c.COLUMN_TYPE', 'c.CHARACTER_MAXIMUM_LENGTH', 'c.IS_NULLABLE', 'c.COLUMN_KEY', 'c.EXTRA', 'c.COLLATION_NAME', 'c.COLUMN_COMMENT', 'c.NUMERIC_PRECISION', 'c.NUMERIC_SCALE', 'c.GENERATION_EXPRESSION', 'fk.REFERENCED_TABLE_NAME', 'fk.REFERENCED_COLUMN_NAME', 'fk.CONSTRAINT_NAME', 'rc.UPDATE_RULE', 'rc.DELETE_RULE', 'rc.MATCH_OPTION') | ||
.from('INFORMATION_SCHEMA.COLUMNS as c') | ||
@@ -218,0 +218,0 @@ .leftJoin('INFORMATION_SCHEMA.KEY_COLUMN_USAGE as fk', function () { |
@@ -19,3 +19,3 @@ import { Knex } from 'knex'; | ||
COLUMN_DEFAULT: any | null; | ||
DATA_TYPE: string; | ||
COLUMN_TYPE: string; | ||
CHARACTER_MAXIMUM_LENGTH: number | null; | ||
@@ -41,3 +41,3 @@ NUMERIC_PRECISION: number | null; | ||
table: rawColumn.TABLE_NAME, | ||
data_type: rawColumn.DATA_TYPE, | ||
data_type: rawColumn.COLUMN_TYPE.split('(')[0], | ||
default_value: | ||
@@ -196,3 +196,3 @@ parseDefaultValue(rawColumn.COLUMN_DEFAULT) ?? | ||
'c.COLUMN_DEFAULT', | ||
'c.DATA_TYPE', | ||
'c.COLUMN_TYPE', | ||
'c.CHARACTER_MAXIMUM_LENGTH', | ||
@@ -199,0 +199,0 @@ 'c.IS_NULLABLE', |
{ | ||
"name": "knex-schema-inspector", | ||
"version": "1.5.2", | ||
"version": "1.5.3", | ||
"description": "Utility for extracting information about existing DB schema", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
288749