From 68b20da89e9daca336b634acb49fcf3430742fcf Mon Sep 17 00:00:00 2001 From: Justin Lettau Date: Wed, 4 Apr 2018 14:59:37 -0400 Subject: [PATCH] fix: script indent inconsistencies --- src/sql/script.ts | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/sql/script.ts b/src/sql/script.ts index 127c022..c95dbd2 100644 --- a/src/sql/script.ts +++ b/src/sql/script.ts @@ -53,9 +53,9 @@ export function idempotency(item: AbstractRecordSet, type: IdempotencyOption): s if (item.type === 'TT') { return [ 'if exists (', - ' select * from sys.table_types as t', - ' join sys.schemas s on t.schema_id = s.schema_id', - ` where t.name = '${item.name}' and s.name = '${item.schema}'`, + ' select * from sys.table_types as t', + ' join sys.schemas s on t.schema_id = s.schema_id', + ` where t.name = '${item.name}' and s.name = '${item.schema}'`, ')', `drop type [${objectId}]`, 'go', @@ -74,9 +74,9 @@ export function idempotency(item: AbstractRecordSet, type: IdempotencyOption): s if (item.type === 'TT') { return [ 'if not exists (', - ' select * from sys.table_types as t', - ' join sys.schemas s on t.schema_id = s.schema_id', - ` where t.name = '${item.name}' and s.name = '${item.schema}'`, + ' select * from sys.table_types as t', + ' join sys.schemas s on t.schema_id = s.schema_id', + ` where t.name = '${item.name}' and s.name = '${item.schema}'`, ')', '' ].join(EOL); @@ -132,19 +132,19 @@ export function table( // columns for (const col of columns.filter(x => x.object_id === item.object_id)) { - output += ' ' + column(col) + ','; + output += ' ' + column(col) + ','; output += EOL; } // primary keys for (const pk of primaryKeys.filter(x => x.object_id === item.object_id)) { - output += ' ' + primaryKey(pk); + output += ' ' + primaryKey(pk); output += EOL; } // foreign keys for (const fk of foreignKeys.filter(x => x.object_id === item.object_id)) { - output += ' ' + foreignKey(fk); + output += ' ' + foreignKey(fk); output += EOL; } @@ -180,7 +180,7 @@ export function tvp( columns .filter(x => x.object_id === item.object_id) .forEach((col, idx, array) => { - output += ' ' + column(col); + output += ' ' + column(col); // if it is not the last column if (idx !== array.length - 1) {