This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // See http://go.microsoft.com/fwlink/?LinkId=733558 | |
| // for the documentation about the tasks.json format | |
| // ${workspaceRoot} the path of the folder opened in VS Code | |
| // ${file} the current opened file | |
| // ${fileBasename} the current opened file's basename | |
| // ${fileDirname} the current opened file's dirname | |
| // ${fileExtname} the current opened file's extension | |
| // ${cwd} the task runner's current working directory on startup | |
| { | |
| "version": "0.1.0", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // # Be sure to set up virtualenv | |
| // python3 -m venv .env | |
| // source .env/bin/activate | |
| // pip install --upgrade pip | |
| // pip freeze > requirements.txt | |
| // | |
| // ${workspaceRoot} the path of the folder opened in VS Code | |
| // ${file} the current opened file | |
| // ${fileBasename} the current opened file's basename | |
| // ${fileDirname} the current opened file's dirname |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Makefile | |
| // ${workspaceRoot} the path of the folder opened in VS Code | |
| // ${file} the current opened file | |
| // ${fileBasename} the current opened file's basename | |
| // ${fileDirname} the current opened file's dirname | |
| // ${fileExtname} the current opened file's extension | |
| // ${cwd} the task runner's current working directory on startup | |
| { | |
| "version": "0.1.0", | |
| "command": "bash", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| select case when ist.ord = 1 then '' else 'union all ' end + 'select ''' + ist.TABLE_SCHEMA + '.' + ist.TABLE_NAME + ''' as table_name, count(*) as cnt from [' + ist.TABLE_SCHEMA + '].[' + ist.TABLE_NAME + ']' | |
| from ( | |
| select *, row_number() over (order by x.table_schema, x.table_name) as ord | |
| from INFORMATION_SCHEMA.TABLES x | |
| where x.TABLE_TYPE = 'BASE TABLE' | |
| and x.TABLE_NAME not like 'MSreplication[_]%' | |
| and x.TABLE_NAME not like 'MSsaved%' | |
| and x.TABLE_NAME not like 'MSsubscription[_]%' | |
| and x.TABLE_NAME not like 'MSsnapshot%' | |
| ) ist |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| if object_id('{{schema}}.{{table}}') is not null drop table {{schema}}.{{table}} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| if object_id('tempdb..#{{table}}') is not null drop table #{{table}} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| select | |
| @val as str_val | |
| ,case | |
| when isnumeric(@val + '.0e0') = 1 then | |
| case | |
| when convert(float, @val) between 0 and 255 | |
| then cast(@val as tinyint) | |
| else null | |
| end | |
| else null |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| if objectproperty(object_id('{{schema}}.{{proc_name}}'), 'IsProcedure') is not null drop proc {{schema}}.{{proc_name}} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| select pg_terminate_backend(pid) from pg_stat_activity where datname='$DB_NAME'; | |
| DROP DATABASE "$DB_NAME"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| select 'union all select ''' + isc.COLUMN_NAME + ''' as cn, max(len(' + isc.COLUMN_NAME + ')) as length, ' + convert(varchar(5), isc.CHARACTER_MAXIMUM_LENGTH) + ' as maxlen from {{table}} having max(len(' + isc.COLUMN_NAME + ')) > ' + convert(varchar(5), isc.CHARACTER_MAXIMUM_LENGTH) + '' | |
| from INFORMATION_SCHEMA.COLUMNS isc | |
| where isc.TABLE_NAME = '{{table}}' | |
| and isc.CHARACTER_MAXIMUM_LENGTH is not null |