Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@directus/schema

Package Overview
Dependencies
Maintainers
3
Versions
169
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@directus/schema - npm Package Compare versions

Comparing version 9.0.0-rc.100 to 9.0.0-rc.101

2

dist/dialects/mssql.js

@@ -98,3 +98,3 @@ "use strict";

switch (_b.label) {
case 0: return [4 /*yield*/, this.knex.raw("\n\t\t\tSELECT\n\t\t\t\tc.TABLE_NAME as table_name,\n\t\t\t\tc.COLUMN_NAME as column_name,\n\t\t\t\tc.COLUMN_DEFAULT as default_value,\n\t\t\t\tc.IS_NULLABLE as is_nullable,\n\t\t\t\tc.DATA_TYPE as data_type,\n\t\t\t\tc.CHARACTER_MAXIMUM_LENGTH as max_length,\n \t\t\tcc.is_computed as is_generated,\n\t\t\t\tpk.PK_SET as column_key,\n\t\t\t\tCOLUMNPROPERTY(OBJECT_ID(c.TABLE_SCHEMA + '.' + c.TABLE_NAME), c.COLUMN_NAME, 'IsIdentity') as is_identity,\n\t\t\t\tCOLUMNPROPERTY(OBJECT_ID(c.TABLE_SCHEMA + '.' + c.TABLE_NAME), c.COLUMN_NAME, 'IsComputed') as is_generated\n\t\t\tFROM\n\t\t\t\t[" + this.knex.client.database() + "].INFORMATION_SCHEMA.COLUMNS as c\n\t\t\tLEFT JOIN (\n\t\t\t\tSELECT\n\t\t\t\t\tPK_SET = CASE WHEN CONSTRAINT_NAME LIKE '%pk%' THEN 'PRIMARY' ELSE NULL END,\n\t\t\t\t\tTABLE_NAME,\n\t\t\t\t\tCONSTRAINT_CATALOG,\n\t\t\t\t\tCOLUMN_NAME\n\t\t\t\tFROM [" + this.knex.client.database() + "].INFORMATION_SCHEMA.KEY_COLUMN_USAGE\n\t\t\t) as pk\n\t\t\tON [c].[TABLE_NAME] = [pk].[TABLE_NAME]\n\t\t\tAND [c].[TABLE_CATALOG] = [pk].[CONSTRAINT_CATALOG]\n\t\t\tAND [c].[COLUMN_NAME] = [pk].[COLUMN_NAME]\n\t\t\tINNER JOIN\n\t\t\t\t[" + this.knex.client.database() + "].INFORMATION_SCHEMA.TABLES as t\n\t\t\tON [c].[TABLE_NAME] = [t].[TABLE_NAME]\n\t\t\tAND [c].[TABLE_CATALOG] = [t].[TABLE_CATALOG]\n\t\t\tAND [t].TABLE_TYPE = 'BASE TABLE'\n\t\t\t")];
case 0: return [4 /*yield*/, this.knex.raw("\n\t\t\tSELECT\n\t\t\t\tc.TABLE_NAME as table_name,\n\t\t\t\tc.COLUMN_NAME as column_name,\n\t\t\t\tc.COLUMN_DEFAULT as default_value,\n\t\t\t\tc.IS_NULLABLE as is_nullable,\n\t\t\t\tc.DATA_TYPE as data_type,\n\t\t\t\tc.CHARACTER_MAXIMUM_LENGTH as max_length,\n\t\t\t\tpk.PK_SET as column_key,\n\t\t\t\tCOLUMNPROPERTY(OBJECT_ID(c.TABLE_SCHEMA + '.' + c.TABLE_NAME), c.COLUMN_NAME, 'IsIdentity') as is_identity,\n\t\t\t\tCOLUMNPROPERTY(OBJECT_ID(c.TABLE_SCHEMA + '.' + c.TABLE_NAME), c.COLUMN_NAME, 'IsComputed') as is_generated\n\t\t\tFROM\n\t\t\t\t[" + this.knex.client.database() + "].INFORMATION_SCHEMA.COLUMNS as c\n\t\t\tLEFT JOIN (\n\t\t\t\tSELECT\n\t\t\t\t\tPK_SET = CASE WHEN CONSTRAINT_NAME LIKE '%pk%' THEN 'PRIMARY' ELSE NULL END,\n\t\t\t\t\tTABLE_NAME,\n\t\t\t\t\tCONSTRAINT_CATALOG,\n\t\t\t\t\tCOLUMN_NAME\n\t\t\t\tFROM [" + this.knex.client.database() + "].INFORMATION_SCHEMA.KEY_COLUMN_USAGE\n\t\t\t) as pk\n\t\t\tON [c].[TABLE_NAME] = [pk].[TABLE_NAME]\n\t\t\tAND [c].[TABLE_CATALOG] = [pk].[CONSTRAINT_CATALOG]\n\t\t\tAND [c].[COLUMN_NAME] = [pk].[COLUMN_NAME]\n\t\t\tINNER JOIN\n\t\t\t\t[" + this.knex.client.database() + "].INFORMATION_SCHEMA.TABLES as t\n\t\t\tON [c].[TABLE_NAME] = [t].[TABLE_NAME]\n\t\t\tAND [c].[TABLE_CATALOG] = [t].[TABLE_CATALOG]\n\t\t\tAND [t].TABLE_TYPE = 'BASE TABLE'\n\t\t\t")];
case 1:

@@ -101,0 +101,0 @@ columns = _b.sent();

@@ -107,3 +107,3 @@ "use strict";

case 0:
return [4 /*yield*/, this.knex.raw("\n\t\t\tWITH \"uc\" AS (\n\t\t\t\tSELECT /*+ materialize */\n\t\t\t\t\t\"uc\".\"TABLE_NAME\",\n\t\t\t\t\t\"ucc\".\"COLUMN_NAME\",\n\t\t\t\t\t\"uc\".\"CONSTRAINT_TYPE\"\n\t\t\t\tFROM \"USER_CONSTRAINTS\" \"uc\"\n\t\t\t\tINNER JOIN \"USER_CONS_COLUMNS\" \"ucc\" ON \"uc\".\"CONSTRAINT_NAME\" = \"ucc\".\"CONSTRAINT_NAME\"\n\t\t\t\tWHERE \"uc\".\"CONSTRAINT_TYPE\" = 'P'\n\t\t\t)\n\t\t\tSELECT\n\t\t\t\t\"c\".\"TABLE_NAME\" \"table_name\",\n\t\t\t\t\"c\".\"COLUMN_NAME\" \"column_name\",\n\t\t\t\t\"c\".\"DATA_DEFAULT\" \"default_value\",\n\t\t\t\t\"c\".\"NULLABLE\" \"is_nullable\",\n\t\t\t\t\"c\".\"DATA_TYPE\" \"data_type\",\n\t\t\t\t\"c\".\"DATA_PRECISION\" \"numeric_precision\",\n\t\t\t\t\"c\".\"DATA_SCALE\" \"numeric_scale\",\n\t\t\t\t\"ct\".\"CONSTRAINT_TYPE\" \"column_key\",\n\t\t\t\t\"c\".\"CHAR_LENGTH\" \"max_length\",\n\t\t\t\t\"c\".\"VIRTUAL_COLUMN\" \"is_generated\"\n\t\t\tFROM \"USER_TAB_COLUMNS\" \"c\"\n\t\t\tLEFT JOIN \"uc\" \"ct\" ON \"c\".\"TABLE_NAME\" = \"ct\".\"TABLE_NAME\"\n\t\t\t\tAND \"c\".\"COLUMN_NAME\" = \"ct\".\"COLUMN_NAME\"\n\t\t")];
return [4 /*yield*/, this.knex.raw("\n\t\t\tWITH \"uc\" AS (\n\t\t\t\tSELECT /*+ materialize */\n\t\t\t\t\t\"uc\".\"TABLE_NAME\",\n\t\t\t\t\t\"ucc\".\"COLUMN_NAME\",\n\t\t\t\t\t\"uc\".\"CONSTRAINT_TYPE\"\n\t\t\t\tFROM \"USER_CONSTRAINTS\" \"uc\"\n\t\t\t\tINNER JOIN \"USER_CONS_COLUMNS\" \"ucc\" ON \"uc\".\"CONSTRAINT_NAME\" = \"ucc\".\"CONSTRAINT_NAME\"\n\t\t\t\tWHERE \"uc\".\"CONSTRAINT_TYPE\" = 'P'\n\t\t\t)\n\t\t\tSELECT\n\t\t\t\t\"c\".\"TABLE_NAME\" \"table_name\",\n\t\t\t\t\"c\".\"COLUMN_NAME\" \"column_name\",\n\t\t\t\t\"c\".\"DATA_DEFAULT\" \"default_value\",\n\t\t\t\t\"c\".\"NULLABLE\" \"is_nullable\",\n\t\t\t\t\"c\".\"DATA_TYPE\" \"data_type\",\n\t\t\t\t\"c\".\"DATA_PRECISION\" \"numeric_precision\",\n\t\t\t\t\"c\".\"DATA_SCALE\" \"numeric_scale\",\n\t\t\t\t\"ct\".\"CONSTRAINT_TYPE\" \"column_key\",\n\t\t\t\t\"c\".\"CHAR_LENGTH\" \"max_length\",\n\t\t\t\t\"c\".\"VIRTUAL_COLUMN\" \"is_generated\"\n\t\t\tFROM \"USER_TAB_COLS\" \"c\"\n\t\t\tLEFT JOIN \"uc\" \"ct\" ON \"c\".\"TABLE_NAME\" = \"ct\".\"TABLE_NAME\"\n\t\t\t\tAND \"c\".\"COLUMN_NAME\" = \"ct\".\"COLUMN_NAME\"\n\t\t")];
case 1:

@@ -110,0 +110,0 @@ columns = _b.sent();

{
"name": "@directus/schema",
"version": "9.0.0-rc.100",
"version": "9.0.0-rc.101",
"description": "Utility for extracting information about existing DB schema",
"main": "dist/index.js",
"exports": {
".": "./dist/index.js",
"./package.json": "./package.json"
},
"types": "dist/index.d.ts",

@@ -48,3 +52,3 @@ "scripts": {

},
"gitHead": "41abc239221c0973ca1f83457be14f21155dc52d"
"gitHead": "37cf80e0fe1320610ffc0b4da9411ef51bd46afb"
}

@@ -18,3 +18,2 @@ import KnexMSSQL, { parseDefaultValue } from 'knex-schema-inspector/dist/dialects/mssql';

c.CHARACTER_MAXIMUM_LENGTH as max_length,
cc.is_computed as is_generated,
pk.PK_SET as column_key,

@@ -21,0 +20,0 @@ COLUMNPROPERTY(OBJECT_ID(c.TABLE_SCHEMA + '.' + c.TABLE_NAME), c.COLUMN_NAME, 'IsIdentity') as is_identity,

@@ -68,3 +68,3 @@ import KnexOracle from 'knex-schema-inspector/dist/dialects/oracledb';

"c"."VIRTUAL_COLUMN" "is_generated"
FROM "USER_TAB_COLUMNS" "c"
FROM "USER_TAB_COLS" "c"
LEFT JOIN "uc" "ct" ON "c"."TABLE_NAME" = "ct"."TABLE_NAME"

@@ -71,0 +71,0 @@ AND "c"."COLUMN_NAME" = "ct"."COLUMN_NAME"

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc